code
stringlengths
3
10M
language
stringclasses
31 values
import std.algorithm; import std.array; import std.conv; import std.exception; import std.file; import std.range; import std.stdio; //import Statement : NestedEntity, Statement, FunctionStatement, readStatements, writeStatements, merge; import Statement : readStatements, writeStatements, merge; import Generate : createCxxFileContent; // Implement the cpp file to a given header void implement(string headerFileName, string sourceFileName) { auto content = createCxxFileContent(readStatements(headerFileName), "", []); auto outfile = sourceFileName == "-" ? stdout : File(sourceFileName, "w"); // If output goes to stdout, there is no implementation file to read and merge if (!sourceFileName.empty) { auto statements = readStatements(content, sourceFileName); auto sourceStatements = readStatements(sourceFileName); // merge with preference to source tokens if available statements = merge(sourceStatements, statements); outfile.writeStatements(statements); } else { outfile.write(content); } outfile.flush; } unittest { auto header = "namespace TestNamespace\n{\n\tclass TestClass\n\t{\n\tpublic:\n\t\texplicit TestClass(int i);\n\t\tvirtual ~TestClass() {}\n\n\t};\n}\n"; auto implementation = "namespace TestNamespace\n{\n\tTestClass::TestClass(int i)\n\t{\n\t\t// FIXME: Implementation missing\n\t}\n\n}\n"; assert(header.tokenize("-").scanTokens.createCxxFileContent("", []) == implementation); } int main(string[] args) { string name = args[0]; string infileName; string outfileName; if (args.length == 1) { writeln("Usage: ", name, " [-o outfile] inputfile"); return 1; } if (args.length > 1) { if (args[1] == "-o" && args.length > 2) { outfileName = args[2]; args = args[3 .. $]; } else { args = args[1 .. $]; } } infileName = args[0]; if (infileName != "-" && outfileName.empty) { outfileName = infileName.splitter('.').dropBack(1).joiner(".").to!string ~ ".cpp"; } implement(infileName, outfileName); return 0; }
D
/Users/cansoykarafakili/Desktop/Hello/build/Intermediates/Hello.build/Debug/SMTP.build/Objects-normal/x86_64/SMTPGreeting.o : /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Utility/NSUUID+SMTPMessageID.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Utility/NSDate+SMTP.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Client/SMTPClient+Send.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Client/SMTPAuthMethod.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Client/SMTPClient+Convenience.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Email/Address/EmailAddressRepresentable.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Email/Attachment/EmailAttachmentRepresentable.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Email/Body/EmailBodyRepresentable.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Email/Address/EmailAddress+StringLiteralConvertible.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Client/SMTPClient+Authorize.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Client/SMTPGreeting.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Client/SMTPCredential.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Email/Email.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Client/EHLOExtension.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Client/SMTPClientError.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Email/Address/EmailAddress.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Client/SMTPClient+Transmit.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Client/SMTPClient.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Email/Attachment/EmailAttachment.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Email/Body/EmailBody.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Client/SMTPClient+Reply.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Users/cansoykarafakili/Desktop/Hello/build/Products/Debug/libc.framework/Modules/libc.swiftmodule/x86_64.swiftmodule /Users/cansoykarafakili/Desktop/Hello/build/Products/Debug/Core.framework/Modules/Core.swiftmodule/x86_64.swiftmodule /Users/cansoykarafakili/Desktop/Hello/build/Products/Debug/Debugging.framework/Modules/Debugging.swiftmodule/x86_64.swiftmodule /Users/cansoykarafakili/Desktop/Hello/build/Products/Debug/Sockets.framework/Modules/Sockets.swiftmodule/x86_64.swiftmodule /Users/cansoykarafakili/Desktop/Hello/build/Products/Debug/Bits.framework/Modules/Bits.swiftmodule/x86_64.swiftmodule /Users/cansoykarafakili/Desktop/Hello/build/Products/Debug/Transport.framework/Modules/Transport.swiftmodule/x86_64.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/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/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 /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 /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/cansoykarafakili/Desktop/Hello/build/Intermediates/Hello.build/Debug/SMTP.build/Objects-normal/x86_64/SMTPGreeting~partial.swiftmodule : /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Utility/NSUUID+SMTPMessageID.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Utility/NSDate+SMTP.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Client/SMTPClient+Send.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Client/SMTPAuthMethod.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Client/SMTPClient+Convenience.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Email/Address/EmailAddressRepresentable.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Email/Attachment/EmailAttachmentRepresentable.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Email/Body/EmailBodyRepresentable.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Email/Address/EmailAddress+StringLiteralConvertible.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Client/SMTPClient+Authorize.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Client/SMTPGreeting.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Client/SMTPCredential.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Email/Email.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Client/EHLOExtension.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Client/SMTPClientError.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Email/Address/EmailAddress.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Client/SMTPClient+Transmit.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Client/SMTPClient.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Email/Attachment/EmailAttachment.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Email/Body/EmailBody.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Client/SMTPClient+Reply.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Users/cansoykarafakili/Desktop/Hello/build/Products/Debug/libc.framework/Modules/libc.swiftmodule/x86_64.swiftmodule /Users/cansoykarafakili/Desktop/Hello/build/Products/Debug/Core.framework/Modules/Core.swiftmodule/x86_64.swiftmodule /Users/cansoykarafakili/Desktop/Hello/build/Products/Debug/Debugging.framework/Modules/Debugging.swiftmodule/x86_64.swiftmodule /Users/cansoykarafakili/Desktop/Hello/build/Products/Debug/Sockets.framework/Modules/Sockets.swiftmodule/x86_64.swiftmodule /Users/cansoykarafakili/Desktop/Hello/build/Products/Debug/Bits.framework/Modules/Bits.swiftmodule/x86_64.swiftmodule /Users/cansoykarafakili/Desktop/Hello/build/Products/Debug/Transport.framework/Modules/Transport.swiftmodule/x86_64.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/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/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 /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 /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/cansoykarafakili/Desktop/Hello/build/Intermediates/Hello.build/Debug/SMTP.build/Objects-normal/x86_64/SMTPGreeting~partial.swiftdoc : /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Utility/NSUUID+SMTPMessageID.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Utility/NSDate+SMTP.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Client/SMTPClient+Send.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Client/SMTPAuthMethod.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Client/SMTPClient+Convenience.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Email/Address/EmailAddressRepresentable.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Email/Attachment/EmailAttachmentRepresentable.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Email/Body/EmailBodyRepresentable.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Email/Address/EmailAddress+StringLiteralConvertible.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Client/SMTPClient+Authorize.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Client/SMTPGreeting.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Client/SMTPCredential.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Email/Email.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Client/EHLOExtension.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Client/SMTPClientError.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Email/Address/EmailAddress.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Client/SMTPClient+Transmit.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Client/SMTPClient.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Email/Attachment/EmailAttachment.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Email/Body/EmailBody.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/engine.git-3311994267206676365/Sources/SMTP/Client/SMTPClient+Reply.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Users/cansoykarafakili/Desktop/Hello/build/Products/Debug/libc.framework/Modules/libc.swiftmodule/x86_64.swiftmodule /Users/cansoykarafakili/Desktop/Hello/build/Products/Debug/Core.framework/Modules/Core.swiftmodule/x86_64.swiftmodule /Users/cansoykarafakili/Desktop/Hello/build/Products/Debug/Debugging.framework/Modules/Debugging.swiftmodule/x86_64.swiftmodule /Users/cansoykarafakili/Desktop/Hello/build/Products/Debug/Sockets.framework/Modules/Sockets.swiftmodule/x86_64.swiftmodule /Users/cansoykarafakili/Desktop/Hello/build/Products/Debug/Bits.framework/Modules/Bits.swiftmodule/x86_64.swiftmodule /Users/cansoykarafakili/Desktop/Hello/build/Products/Debug/Transport.framework/Modules/Transport.swiftmodule/x86_64.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/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/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 /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 /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
instance Mod_1075_VLK_Buergerin_NW (Npc_Default) { // ------ NSC ------ name = Name_Buergerin; guild = GIL_PAL; id = 1075; voice = 17; flags = 0; npctype = NPCTYPE_AMBIENT; // ------ Attribute ------ B_SetAttributesToChapter (self, 1); // ------ Kampf-Taktik ------ fight_tactic = FAI_HUMAN_COWARD; // ------ Equippte Waffen ------ // ------ Inventory ------ B_CreateAmbientInv (self); // ------ visuals ------ B_SetNpcVisual (self, FEMALE, "Hum_Head_Babe", FaceBabe_N_PinkHair, BodyTex_N, ITAR_VlkBabe_H); Mdl_SetModelFatness (self, 0); Mdl_ApplyOverlayMds (self, "Humans_Tired.mds"); // ------ NSC-relevante Talente vergeben ------ B_GiveNpcTalents (self); // ------ Kampf-Talente ------ B_SetFightSkills (self, 30); // ------ TA anmelden ------ daily_routine = Rtn_Start_1075; }; FUNC VOID Rtn_Start_1075 () { TA_Smalltalk (08,00,22,00,"NW_CITY_MAINSTREET_05_B"); TA_Sleep (22,00,08,00,"NW_CITY_UPTOWN_PATH_08"); //FIXME };
D
/** * Semantic analysis of expressions. * * Specification: ($LINK2 https://dlang.org/spec/expression.html, Expressions) * * Copyright: Copyright (C) 1999-2022 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.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.file; 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(); 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, 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; } /****************************** * Check the tail CallExp is really property function call. * Bugs: * This doesn't appear to do anything. */ private bool checkPropertyCall(Expression e) { e = lastComma(e); if (auto ce = e.isCallExp()) { if (ce.f) { auto tf = ce.f.type.isTypeFunction(); /* If a forward reference to ce.f, try to resolve it */ if (!tf.deco && ce.f.semanticRun < PASS.semanticdone) { ce.f.dsymbolSemantic(null); tf = ce.f.type.isTypeFunction(); } } else if (!ce.e1.type.isFunction_Delegate_PtrToFunction()) assert(0); } return false; } /****************************** * 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()) { 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.semanticX(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.semanticY(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.semanticY(sc, 1)) { 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); 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) { checkPropertyCall(ex); ex = new AssignExp(loc, ex, e2); return ex.expressionSemantic(sc); } else { // strict setter prints errors if fails e = e.expressionSemantic(sc); } checkPropertyCall(e); return e; } else { /* f(e1) */ auto arguments = new Expressions(1); (*arguments)[0] = eleft; e = new CallExp(loc, e, arguments); e = e.expressionSemantic(sc); checkPropertyCall(e); return e.expressionSemantic(sc); } } /****************************** * 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; } /*************************************** * Pull out any properties. */ private Expression resolvePropertiesX(Scope* sc, Expression e1, Expression e2 = 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; a.push(e2); for (size_t i = 0; i < os.a.length; i++) { if (FuncDeclaration f = resolveFuncCall(loc, sc, os.a[i], tiargs, tthis, &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, null, 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); 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; a.push(e2); FuncDeclaration fd = resolveFuncCall(loc, sc, s, tiargs, tthis, &a, FuncResolveFlag.quiet); if (fd && fd.type) { if (fd.errors) return ErrorExp.get(); if (!checkSymbolAccess(sc, fd)) { // @@@DEPRECATED_2.105@@@ // When turning into error, uncomment the return statement TypeFunction tf = fd.type.isTypeFunction(); deprecation(loc, "function `%s` of type `%s` is not accessible from module `%s`", fd.toPrettyChars(), tf.toChars, sc._module.toChars); //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, null, FuncResolveFlag.quiet); if (fd && fd.type) { if (fd.errors) return ErrorExp.get(); TypeFunction tf = fd.type.isTypeFunction(); if (!e2 || tf.isref) { if (!checkSymbolAccess(sc, fd)) { // @@@DEPRECATED_2.105@@@ // When turning into error, uncomment the return statement deprecation(loc, "function `%s` of type `%s` is not accessible from module `%s`", fd.toPrettyChars(), tf.toChars, sc._module.toChars); //return ErrorExp.get(); } Expression e = new CallExp(loc, e1); if (e2) e = new AssignExp(loc, e, e2); 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 * as: * array.length = array.length op e2 * or: * auto tmp = &array; * (*tmp).length = (*tmp).length op e2 */ private Expression rewriteOpAssign(BinExp exp) { ArrayLengthExp ale = exp.e1.isArrayLengthExp(); if (ale.e1.isVarExp()) { Expression e = opAssignToOp(exp.loc, exp.op, ale, exp.e2); e = new AssignExp(exp.loc, ale.syntaxCopy(), e); return e; } else { /* auto tmp = &array; * (*tmp).length = (*tmp).length op e2 */ auto tmp = copyToTemp(0, "__arraylength", new AddrExp(ale.loc, ale.e1)); Expression e1 = new ArrayLengthExp(ale.loc, new PtrExp(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. * Input: * reportErrors whether or not to report errors here. Some callers are not * checking actual function params, so they'll do their own error reporting * Output: * exps[] tuples expanded, properties resolved, rewritten in place * Returns: * true a semantic error occurred */ private bool preFunctionParameters(Scope* sc, Expressions* exps, const bool reportErrors = true) { bool err = false; if (exps) { expandTuples(exps); 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 * arguments = 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, Expressions* arguments, FuncDeclaration fd, Type* prettype, Expression* peprefix) { //printf("functionParameters() %s\n", fd ? fd.toChars() : ""); assert(arguments); assert(fd || tf.next); size_t nargs = arguments ? arguments.length : 0; const size_t nparams = tf.parameterList.length; const olderrors = global.errors; bool err = false; *prettype = Type.terror; Expression eprefix = null; *peprefix = null; 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; arg = inlineCopy(arg, sc); // __FILE__, __LINE__, __MODULE__, __FUNCTION__, and __PRETTY_FUNCTION__ arg = arg.resolveLoc(loc, sc); arguments.push(arg); nargs++; } 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 = ((tf.next && tf.next.ty == Tvoid || isCtorCall) && tthis && tthis.isMutable() && tthis.toBasetype().ty == Tstruct && tthis.hasPointers()) ? ethis : null; 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. else if (!(pStc & STC.lazy_)) { /* 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, 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); 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()); /* Determine if this parameter is the "first reference" parameter through which * later "return" arguments can be stored. */ if (i == 0 && !tthis && p.isReference() && p.type && (tf.next && tf.next.ty == Tvoid || isCtorCall)) { Type tb = p.type.baseElemOf(); if (tb.isMutable() && tb.hasPointers()) { firstArg = arg; } } } 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) { 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. order of evaluation - some function push L-to-R, others R-to-L. Until we resolve what array assignment does (which is * implemented by calling a function) we'll defer this for now. * 2. value structs (or static arrays of them) that need to be copy constructed * 3. value structs (or static arrays of them) that have destructors, and subsequent arguments that may throw before the * function gets called. * 4. value structs need to be destructed after the function call for platforms where the caller destroys the arguments. * 2, 3 and 4 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. */ { /* TODO: tackle problem 1) */ const bool leftToRight = true; // TODO: Any cases that need rightToLeft? if (!leftToRight) assert(nargs == nparams); // no variadics for RTL order, as they would probably be evaluated LTR and so add complexity /* Does Problem (4) apply? */ const bool callerDestroysArgs = !target.isCalleeDestroyingArgs(tf); const ptrdiff_t start = (leftToRight ? 0 : cast(ptrdiff_t)nargs - 1); const ptrdiff_t end = (leftToRight ? cast(ptrdiff_t)nargs : -1); const ptrdiff_t step = (leftToRight ? 1 : -1); /* 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 = start; i != end; i += step) { 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 3 or 4? */ const bool needsPrefix = callerDestroysArgs ? firstdtor >= 0 // true if any argument needs destruction : firstdtor >= 0 && lastthrow >= 0 && (lastthrow - firstdtor) * step > 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 = start; i != end; i += step) { 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 2) for * this arg. * 'eprefix' will therefore finally contain all args up to and including 'lastPrefix', * excluding all lazy parameters. */ if (needsPrefix && (lastPrefix - i) * step >= 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 3: 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 3: 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 2) 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 */ if (global.params.useDIP1021 && tf.trust != TRUST.system && tf.trust != TRUST.trusted) 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 Module loadStdMath() { __gshared Import impStdMath = null; __gshared Identifier[1] stdID; if (!impStdMath) { stdID[0] = Id.std; auto s = new Import(Loc.initial, stdID[], Id.math, null, false); // Module.load will call fatal() if there's no std.math available. // Gag the error here, pushing the error handling to the caller. uint errors = global.startGagging(); s.load(null); if (s.mod) { s.mod.importAll(null); s.mod.dsymbolSemantic(null); } global.endGagging(errors); impStdMath = s; } return impStdMath.mod; } private extern (C++) final class ExpressionSemanticVisitor : Visitor { alias visit = Visitor.visit; Scope* sc; Expression result; this(Scope* sc) { 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 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()); goto Lerr; } 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) goto Lerr; 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; return; Lerr: e.error("`this` is only defined in non-static member functions, not `%s`", sc.parent.toChars()); result = ErrorExp.get(); } 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()); goto Lerr; } cd = s.isClassDeclaration(); if (cd) { cd = cd.baseClass; if (!cd) { e.error("class `%s` has no `super`", s.toChars()); goto Lerr; } 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 = 1; 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 = 1; break; case 'c': e.committed = 1; 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 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; } 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.arguments)) { 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; 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) { if (!sc.hasThis) { string msg = "cannot construct " ~ (cd.isAnonymous ? "anonymous nested class" : "nested class `%s`") ~ " because no implicit `this` reference to outer class" ~ (cdn.isAnonymous ? "" : " `%s`") ~ " is available\0"; exp.error(msg.ptr, cd.toChars, cdn.toChars); return setError(); } // Supply an implicit 'this' and try again exp.thisexp = new ThisExp(exp.loc); for (Dsymbol sp = sc.parent; 1; sp = sp.toParentLocal()) { 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.arguments, 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.arguments, 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 (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.arguments, 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.arguments, 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.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(); } 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]; 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 && cast(sinteger_t)arg.toInteger() < 0) { exp.error("negative array index `%s`", arg.toChars()); return setError(); } (*exp.arguments)[i] = arg; tb = tb.isTypeDArray().next.toBasetype(); } } else if (tb.isscalar()) { if (!nargs) { } else if (nargs == 1) { 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(); } 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.arguments)) 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; } } } 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.arguments)) 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(exp.att1, 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: Expression e = new StructLiteralExp(exp.loc, sd, exp.arguments, 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); 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]; if (!e.type.isTypeNoreturn()) e = e.implicitCastTo(sc, 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, Expressions* arguments) { FuncDeclaration f = null; foreach (s; os.a) { if (tiargs && s.isFuncDeclaration()) continue; if (auto f2 = resolveFuncCall(loc, sc, s, tiargs, tthis, arguments, FuncResolveFlag.quiet)) { if (f2.errors) return null; if (f) { /* Error if match in more than one overload set, * even if one is a 'better' match than the other. */ ScopeDsymbol.multiplyDefined(loc, f, f2); } 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.arguments, 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, null, null, 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); checkAccess(exp.loc, sc, ue.e1, exp.f); 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.arguments); else exp.f = resolveFuncCall(exp.loc, sc, ctor, null, tthis, exp.arguments, 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.arguments); 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.arguments, 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.arguments, 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; Expression[] fargs = exp.arguments ? (*exp.arguments)[] : null; if (!tf.callMatch(null, fargs, 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.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.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.arguments, FuncResolveFlag.overloadOnly); else { exp.f = exp.f.toAliasFunc(); TypeFunction tf = cast(TypeFunction)exp.f.type; const(char)* failMessage; Expression[] fargs = exp.arguments ? (*exp.arguments)[] : null; if (!tf.callMatch(null, fargs, 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); .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(); if (hasThis(sc)) { // 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.arguments, 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.arguments, 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); e.type = getTypeInfoType(exp.loc, ta, sc); 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); //printf("targ: %s\n", targ.toChars()); //printf("tspec: %s\n", tspec.toChars()); 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]; scope p = new Parser!ASTCodegen(exp.loc, sc._module, str, false); 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 { auto readResult = File.read(resolvedNamez); if (!readResult.success) { e.error("cannot read file `%s`", resolvedNamez.ptr); return setError(); } else { // take ownership of buffer (probably leaking) auto data = readResult.extractSlice(); se = new StringExp(e.loc, data); global.fileManager.add(fileName, data); } } } 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 && 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 (StatementSemanticVisitor.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 (sc.flags & SCOPE.Cfile) { 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 (sc.flags & SCOPE.Cfile && exp.ident != Id.__sizeof) { result = fieldLookup(exp.e1, sc, exp.ident); return; } Expression e = exp.semanticY(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.semanticY(sc, 1); 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 (e.e1.op == EXP.error) return setError(); 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()) { if (hasThis(sc)) { /* 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 (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.e1.type.isTypeNoreturn() && (!exp.to || !exp.to.isTypeNoreturn())) { result = exp.e1; 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 tuple type `%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.flags & SCOPE.ctfe) == 0) { 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 tuple"); 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 && t1b.ty == Tsarray) { // 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); if (exp.lwr.op == EXP.int64 && exp.upr.op == EXP.int64 && exp.lwr.toInteger() > exp.upr.toInteger()) { exp.error("in slice `%s[%llu .. %llu]`, lower bound is greater than upper bound", exp.e1.toChars, exp.lwr.toInteger(), exp.upr.toInteger()); return setError(); } if (exp.upr.op == EXP.int64 && exp.upr.toInteger() > length) { exp.error("in slice `%s[%llu .. %llu]`, upper bound is greater than array length `%llu`", exp.e1.toChars, exp.lwr.toInteger(), exp.upr.toInteger(), length); return setError(); } } 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 (t1b.ty == Tvector) { // Convert e1 to corresponding static array TypeVector tv1 = cast(TypeVector)t1b; t1b = tv1.basetype; t1b = t1b.castMod(tv1.mod); exp.e1.type = 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); 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]; } 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(ae.att1, 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.semanticY(sc, 1); 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); } else if (auto die = e1x.isDotIdExp()) { Expression e = die.semanticY(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)) 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 tuple 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); } // 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); auto res = ce.expressionSemantic(sc); // if (global.params.verbose) // message("lowered %s =>\n %s", exp.toChars(), res.toChars()); 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; } } } 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()); 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 res = exp.reorderSettingAAElem(sc); 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.flags & (SCOPE.ctfe | SCOPE.compile))) { // 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; } 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 (tb2.ty == Tarray || tb2.ty == Tsarray) { // Make e2 into [e2] exp.e2 = new ArrayLiteralExp(exp.e2.loc, exp.type, exp.e2); } else if (checkNewEscape(sc, exp.e2, false)) return setError(); result = exp.optimize(WANTvalue); 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 (tb1.ty == Tarray || tb1.ty == Tsarray) { // Make e1 into [e1] exp.e1 = new ArrayLiteralExp(exp.e1.loc, exp.type, exp.e1); } else if (checkNewEscape(sc, exp.e1, false)) return setError(); result = exp.optimize(WANTvalue); 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; 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; } 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 = 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 ((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 (t1.isTypeVector()) exp.type = t1; 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) { 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); 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 (t1.isTypeVector()) exp.type = t1; 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; if (t1.ty == Tnoreturn) { exp.type = t2; } else if (t2.ty == Tnoreturn) { exp.type = t1; } // 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; } Expression semanticX(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, exp.noderef ? DotExpFlag.noDeref : 0); } 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 * flag = if 1 then do not emit error messages, just return null * Returns: * resolved expression, null if error */ Expression semanticY(DotIdExp exp, Scope* sc, int flag) { //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 = semanticX(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); } // BUG: handle other cases like in IdentifierExp::semantic() debug { printf("s = '%s', kind = '%s'\n", 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()) { flag = 0; } if (flag) 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 (flag) { 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 (flag && t1bn.ty == Tvoid) return null; Expression e = new PtrExp(exp.loc, exp.e1); e = e.expressionSemantic(sc); return e.type.dotExp(sc, e, exp.ident, flag | (exp.noderef ? DotExpFlag.noDeref : 0)); } 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()) flag = 0; Expression e = exp.e1.type.dotExp(sc, exp.e1, exp.ident, flag | (exp.noderef ? DotExpFlag.noDeref : 0)); if (e) { e = e.expressionSemantic(sc); } return e; } } // Resolve e1.ident!tiargs without seeing UFCS. // If flag == 1, stop "not a property" error and return NULL. Expression semanticY(DotTemplateInstanceExp exp, Scope* sc, int flag) { 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.semanticX(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 (flag) return null; } e = die.semanticY(sc, flag); if (flag) { 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.intypeof || sc.flags & SCOPE.ctfe) { return false; } //printf("checkSharedAccess() `%s` returnRef: %d\n", e.toChars(), returnRef); /* In case we don't know which expression triggered it, * e.g. for `visit(Type)` overload */ Expression original = e; 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) { if (e.type.isShared()) return sharedError(e); return false; } bool visitNew(NewExp e) { if (e.thisexp) check(e.thisexp, false); // Note: This handles things like `new shared(Throwable).msg`, // where accessing `msg` would violate `shared`. if (e.newtype.isShared()) return sharedError(original); return false; } bool visitVar(VarExp e) { // 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 visitThis(ThisExp e) { if (sc.func && sc.func.isSynchronized()) return false; if (!allowRef && e.type.isShared()) return sharedError(e); return false; } bool visitDotVar(DotVarExp e) { //printf("dotvarexp = %s\n", e.toChars()); auto fd = e.var.isFuncDeclaration(); const sharedFunc = fd && fd.type.isShared; // Allow using `DotVarExp` within value types if (!allowRef && e.type.isShared() && !sharedFunc && !(sc.func && sc.func.isSynchronized())) return sharedError(e); 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 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()); case EXP.this_: return visitThis(e.isThisExp()); } } 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: 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
/* * region.d * * This module implements the platform specifics for the Region class. * * Author: Dave Wilkinson * Originated: July 25th, 2009 * */ module platform.vars.region; struct RegionPlatformVars { }
D
import std.algorithm, std.range; pragma(msg, problem_1()); int problem_1() { return iota(1, 1000).filter!"(!(a%3) || !(a%5))".reduce!"a+b"; }
D
/******************************************************************************* * Copyright (c) 2000, 2006 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation * Port to the D programming language: * Frank Benoit <benoit@tionex.de> *******************************************************************************/ module dwtx.jface.text.contentassist.ContextInformation; import dwtx.jface.text.contentassist.ContentAssistEvent; // packageimport import dwtx.jface.text.contentassist.Helper; // packageimport import dwtx.jface.text.contentassist.PopupCloser; // packageimport import dwtx.jface.text.contentassist.IContentAssistant; // packageimport import dwtx.jface.text.contentassist.CompletionProposal; // packageimport import dwtx.jface.text.contentassist.ICompletionProposalExtension5; // packageimport import dwtx.jface.text.contentassist.IContextInformationValidator; // packageimport import dwtx.jface.text.contentassist.IContentAssistListener; // packageimport import dwtx.jface.text.contentassist.ICompletionProposalExtension6; // packageimport import dwtx.jface.text.contentassist.ICompletionListener; // packageimport import dwtx.jface.text.contentassist.ICompletionProposalExtension2; // packageimport import dwtx.jface.text.contentassist.IContentAssistantExtension4; // packageimport import dwtx.jface.text.contentassist.ICompletionProposalExtension3; // packageimport import dwtx.jface.text.contentassist.ContextInformationValidator; // packageimport import dwtx.jface.text.contentassist.ICompletionProposal; // packageimport import dwtx.jface.text.contentassist.IContentAssistProcessor; // packageimport import dwtx.jface.text.contentassist.AdditionalInfoController; // packageimport import dwtx.jface.text.contentassist.IContextInformationPresenter; // packageimport import dwtx.jface.text.contentassist.ICompletionProposalExtension4; // packageimport import dwtx.jface.text.contentassist.ICompletionListenerExtension; // packageimport import dwtx.jface.text.contentassist.ContextInformationPopup; // packageimport import dwtx.jface.text.contentassist.IContextInformationExtension; // packageimport import dwtx.jface.text.contentassist.IContentAssistantExtension2; // packageimport import dwtx.jface.text.contentassist.ContentAssistSubjectControlAdapter; // packageimport import dwtx.jface.text.contentassist.CompletionProposalPopup; // packageimport import dwtx.jface.text.contentassist.ICompletionProposalExtension; // packageimport import dwtx.jface.text.contentassist.IContextInformation; // packageimport import dwtx.jface.text.contentassist.IContentAssistantExtension3; // packageimport import dwtx.jface.text.contentassist.ContentAssistant; // packageimport import dwtx.jface.text.contentassist.IContentAssistantExtension; // packageimport import dwtx.jface.text.contentassist.JFaceTextMessages; // packageimport import dwt.dwthelper.utils; import dwt.graphics.Image; import dwtx.core.runtime.Assert; /** * A default implementation of the <code>IContextInformation</code> interface. */ public final class ContextInformation : IContextInformation { /** The name of the context. */ private const String fContextDisplayString; /** The information to be displayed. */ private const String fInformationDisplayString; /** The image to be displayed. */ private const Image fImage; /** * Creates a new context information without an image. * * @param contextDisplayString the string to be used when presenting the context * @param informationDisplayString the string to be displayed when presenting the context information */ public this(String contextDisplayString, String informationDisplayString) { this(null, contextDisplayString, informationDisplayString); } /** * Creates a new context information with an image. * * @param image the image to display when presenting the context information * @param contextDisplayString the string to be used when presenting the context * @param informationDisplayString the string to be displayed when presenting the context information, * may not be <code>null</code> */ public this(Image image, String contextDisplayString, String informationDisplayString) { Assert.isNotNull(informationDisplayString); fImage= image; fContextDisplayString= contextDisplayString; fInformationDisplayString= informationDisplayString; } /* * @see IContextInformation#equals(Object) */ public bool equals(Object object) { if ( cast(IContextInformation)object ) { IContextInformation contextInformation= cast(IContextInformation) object; bool equals= fInformationDisplayString.equalsIgnoreCase(contextInformation.getInformationDisplayString()); if (fContextDisplayString !is null) equals= equals && fContextDisplayString.equalsIgnoreCase(contextInformation.getContextDisplayString()); return equals; } return false; } /* * @see java.lang.Object#hashCode() * @since 3.1 */ public override hash_t toHash() { int low= fContextDisplayString !is null ? .toHash(fContextDisplayString) : 0; return (.toHash(fInformationDisplayString) << 16) | low; } /* * @see IContextInformation#getInformationDisplayString() */ public String getInformationDisplayString() { return fInformationDisplayString; } /* * @see IContextInformation#getImage() */ public Image getImage() { return fImage; } /* * @see IContextInformation#getContextDisplayString() */ public String getContextDisplayString() { if (fContextDisplayString !is null) return fContextDisplayString; return fInformationDisplayString; } }
D
// ************************************************************ // EXIT // ************************************************************ INSTANCE DIA_Thekla_EXIT (C_INFO) { npc = BAU_913_Thekla; nr = 999; condition = DIA_Thekla_EXIT_Condition; information = DIA_Thekla_EXIT_Info; permanent = TRUE; description = DIALOG_ENDE; }; FUNC INT DIA_Thekla_EXIT_Condition() { return TRUE; }; FUNC VOID DIA_Thekla_EXIT_Info() { AI_StopProcessInfos (self); }; // ************************************************************ // Hallo // ************************************************************ instance DIA_Thekla_HALLO (C_INFO) { npc = BAU_913_Thekla; nr = 1; condition = DIA_Thekla_HALLO_Condition; information = DIA_Thekla_HALLO_Info; permanent = FALSE; important = TRUE; }; func int DIA_Thekla_HALLO_Condition () { return TRUE; }; func void DIA_Thekla_HALLO_Info () { AI_Output (self, other, "DIA_Thekla_HALLO_17_00"); //Co robisz w mojej kuchni? }; // ************************************************************ // Lecker // ************************************************************ instance DIA_Thekla_Lecker (C_INFO) { npc = BAU_913_Thekla; nr = 2; condition = DIA_Thekla_Lecker_Condition; information = DIA_Thekla_Lecker_Info; permanent = FALSE; description = "Coś tutaj wspaniale pachnie!"; }; func int DIA_Thekla_Lecker_Condition () { if (other.guild == GIL_NONE) { return TRUE; }; }; func void DIA_Thekla_Lecker_Info () { AI_Output (other, self, "DIA_Thekla_Lecker_15_00"); //Coś tutaj wspaniale pachnie! AI_Output (self, other, "DIA_Thekla_Lecker_17_01"); //Och tak! Już ja znam takich jak ty! Myszkujecie po całym domu. AI_Output (self, other, "DIA_Thekla_Lecker_17_02"); //Najpierw się przymilacie, a kiedy człowiek chce was o coś poprosić - nikogo nigdy nie ma! }; // ************************************************************ // Hunger // ************************************************************ var int Thekla_GaveStew; // --------------------- instance DIA_Thekla_Hunger (C_INFO) { npc = BAU_913_Thekla; nr = 3; condition = DIA_Thekla_Hunger_Condition; information = DIA_Thekla_Hunger_Info; permanent = FALSE; description = "Jestem głodny!"; }; func int DIA_Thekla_Hunger_Condition () { if (Thekla_GaveStew == FALSE) { return TRUE; }; }; func void DIA_Thekla_Hunger_Info () { AI_Output (other, self, "DIA_Thekla_Hunger_15_00"); //Jestem głodny! if (other.guild == GIL_NONE) { AI_Output (self, other, "DIA_Thekla_Hunger_17_01"); //Nie karmię włóczęgów. Jedzenie jest dla tych, którzy pracują. AI_Output (self, other, "DIA_Thekla_Hunger_17_02"); //I dla tego najemnego motłochu, oczywiście. } else if (other.guild == GIL_SLD) || (other.guild == GIL_DJG) { AI_Output (self, other, "DIA_Thekla_Hunger_17_03"); //Hej, twoje żarcie. B_GiveInvItems (self, other, ItFo_XPStew, 1); Thekla_GaveStew = TRUE; } else if (other.guild == GIL_MIL) { AI_Output (self, other, "DIA_Thekla_Hunger_17_04"); //Nie obsługujemy tu strażników. } else //Pal, Kdf oder Nov { AI_Output (self, other, "DIA_Thekla_Hunger_17_05"); //Jak mogłabym odmówić prośbie przedstawiciela Innosa? B_GiveInvItems (self, other, ItFo_XPStew, 1); Thekla_GaveStew = TRUE; }; }; // ************************************************************ // Arbeit // ************************************************************ instance DIA_Thekla_Arbeit (C_INFO) { npc = BAU_913_Thekla; nr = 4; condition = DIA_Thekla_Arbeit_Condition; information = DIA_Thekla_Arbeit_Info; permanent = FALSE; description = "Szukam pracy."; }; func int DIA_Thekla_Arbeit_Condition () { if (other.guild == GIL_NONE) { return TRUE; }; }; func void DIA_Thekla_Arbeit_Info () { AI_Output (other, self, "DIA_Thekla_Arbeit_15_00"); //Szukam pracy... AI_Output (self, other, "DIA_Thekla_Arbeit_17_01"); //Chcesz pracować na farmie? AI_Output (self, other, "DIA_Thekla_Arbeit_17_02"); //Jedynie Onar może o tym decydować. Farma, jak i cała dolina, należą do niego. }; // ************************************************************ // WannaJoin // ************************************************************ instance DIA_Thekla_WannaJoin (C_INFO) { npc = BAU_913_Thekla; nr = 5; condition = DIA_Thekla_WannaJoin_Condition; information = DIA_Thekla_WannaJoin_Info; permanent = FALSE; description = "Właściwie to chciałem się przyłączyć do najemników..."; }; func int DIA_Thekla_WannaJoin_Condition () { if (other.guild == GIL_NONE) && (Npc_KnowsInfo (other, DIA_Thekla_Arbeit)) { return TRUE; }; }; func void DIA_Thekla_WannaJoin_Info () { AI_Output (other, self, "DIA_Thekla_WannaJoin_15_00"); //Właściwie to chciałem się przyłączyć do najemników... AI_Output (self, other, "DIA_Thekla_WannaJoin_17_01"); //Jesteś więc jednym z tych przestępców z kolonii karnej? AI_Output (self, other, "DIA_Thekla_WannaJoin_17_02"); //Mogłam się domyślić! Zostaw mnie w spokoju! Jest was tu wokoło już dostatecznie wielu! }; // ************************************************************ // Schlafen // ************************************************************ instance DIA_Thekla_Schlafen (C_INFO) { npc = BAU_913_Thekla; nr = 6; condition = DIA_Thekla_Schlafen_Condition; information = DIA_Thekla_Schlafen_Info; permanent = FALSE; description = "Szukam miejsca na nocleg."; }; func int DIA_Thekla_Schlafen_Condition () { if (other.guild == GIL_NONE) { return TRUE; }; }; func void DIA_Thekla_Schlafen_Info () { AI_Output (other, self, "DIA_Thekla_Schlafen_15_00"); //Szukam miejsca na nocleg. AI_Output (self, other, "DIA_Thekla_Schlafen_17_01"); //Wybij sobie z głowy spanie w mojej kuchni. Poszukaj sobie miejsca w stodole. }; // ************************************************************ // Problem // ************************************************************ instance DIA_Thekla_Problem (C_INFO) { npc = BAU_913_Thekla; nr = 7; condition = DIA_Thekla_Problem_Condition; information = DIA_Thekla_Problem_Info; permanent = FALSE; description = "Dlaczego tak nie lubisz najemników?"; }; func int DIA_Thekla_Problem_Condition () { if (kapitel <= 3) && (Npc_KnowsInfo (other, DIA_Thekla_WannaJoin)) { return TRUE; }; }; func void DIA_Thekla_Problem_Info () { AI_Output (other, self, "DIA_Thekla_Problem_15_00"); //Dlaczego tak nie lubisz najemników? AI_Output (self, other, "DIA_Thekla_Problem_17_01"); //Ci durnie strasznie grają mi na nerwach! Szczególnie Sylvio i jego tłusty kumpel, Bullko. AI_Output (self, other, "DIA_Thekla_Problem_17_02"); //Przesiadują tu całymi dniami i uprzykrzają mi życie. AI_Output (self, other, "DIA_Thekla_Problem_17_03"); //Zupa za gorąca, mięso za twarde... I tak dalej, i tak dalej. if (other.guild == GIL_NONE) { AI_Output (other, self, "DIA_Thekla_Problem_15_04"); //Dlaczego więc nic z tym nie zrobisz? AI_Output (self, other, "DIA_Thekla_Problem_17_05"); //A co ja mogę, Panie Mądralo? Pogrozić im wałkiem? Na wieśniaków to może działa, ale na tych śmierdzących drani nie. }; }; // ************************************************************ // Manieren // ************************************************************ instance DIA_Thekla_Manieren (C_INFO) { npc = BAU_913_Thekla; nr = 7; condition = DIA_Thekla_Manieren_Condition; information = DIA_Thekla_Manieren_Info; permanent = FALSE; description = "Może ja nauczyłbym tych dwóch dobrych manier?"; }; func int DIA_Thekla_Manieren_Condition () { if (Npc_KnowsInfo (other, DIA_Thekla_Problem)) && (Sylvio.aivar[AIV_LastFightAgainstPlayer] == FIGHT_NONE) && (Bullco.aivar[AIV_LastFightAgainstPlayer] == FIGHT_NONE) && (Kapitel <= 3) { return TRUE; }; }; func void DIA_Thekla_Manieren_Info () { AI_Output (other, self, "DIA_Thekla_Manieren_15_00"); //Może ja nauczyłbym tych dwóch dobrych manier? AI_Output (self, other, "DIA_Thekla_Manieren_17_01"); //Lepiej uważaj, kochaniutki. Z tego co wiem, Sylvio nosi magiczną zbroję, trudno go pokonać. AI_Output (other, self, "DIA_Thekla_Manieren_15_02"); //A Bullko? AI_Output (self, other, "DIA_Thekla_Manieren_17_03"); //Ten facet jest silny jak wół. Jak dotąd załatwił wszystkich, którzy sprzeciwiali się jemu bądź Sylviowi. }; // ************************************************************ // After Fight // ************************************************************ instance DIA_Thekla_AfterFight (C_INFO) { npc = BAU_913_Thekla; nr = 7; condition = DIA_Thekla_AfterFight_Condition; information = DIA_Thekla_AfterFight_Info; permanent = FALSE; important = TRUE; }; func int DIA_Thekla_AfterFight_Condition () { if (Sylvio.aivar[AIV_LastFightAgainstPlayer] == FIGHT_WON) || (Bullco.aivar[AIV_LastFightAgainstPlayer] == FIGHT_WON) || (Bullco.aivar[AIV_LastFightAgainstPlayer] == FIGHT_LOST) && (Kapitel <= 3) { return TRUE; }; }; func void DIA_Thekla_AfterFight_Info () { if (Bullco.aivar[AIV_LastFightAgainstPlayer] == FIGHT_LOST) { AI_Output (self, other, "DIA_Thekla_AfterFight_17_00"); //Pokazałeś Bullkowi, gdzie jego miejsce, kochaniutki. AI_Output (self, other, "DIA_Thekla_AfterFight_17_01"); //Pokonanie tej opasłej świni musiało być strasznie męczące. } else //Sylvio oder Bullco gewonnen { AI_Output (self, other, "DIA_Thekla_AfterFight_17_02"); //Nieźle ci się oberwało. AI_Output (self, other, "DIA_Thekla_AfterFight_17_03"); //A nie mówiłam? Teraz już wiesz, co miałam na myśli. AI_Output (other, self, "DIA_Thekla_AfterFight_15_04"); //Widzę, że świetnie się bawisz. AI_Output (self, other, "DIA_Thekla_AfterFight_17_05"); //No już, nie rób takiej miny. Nie ty pierwszy oberwałeś od tego śmiecia. }; AI_Output (self, other, "DIA_Thekla_AfterFight_17_06"); //Masz, zjedz coś - to powinno dodać ci sił. B_GiveInvItems (self, other, ItFo_XPStew, 1); Thekla_GaveStew = TRUE; }; // ************************************************************ // PaketSuccess // ************************************************************ instance DIA_Thekla_SagittaPaket (C_INFO) { npc = BAU_913_Thekla; nr = 4; condition = DIA_Thekla_SagittaPaket_Condition; information = DIA_Thekla_SagittaPaket_Info; permanent = TRUE; description = "Mam tu przesyłkę od Sagitty."; }; func int DIA_Thekla_SagittaPaket_Condition () { if (Npc_HasItems (other,ItMi_TheklasPaket)) && (MIS_Thekla_Paket == LOG_RUNNING) { return TRUE; }; }; func void DIA_Thekla_SagittaPaket_Info () { B_GiveInvItems (other, self, ItMi_TheklasPaket, 1); AI_Output (other, self, "DIA_Thekla_SagittaPaket_15_00"); //Mam tu przesyłkę od Sagitty. AI_Output (self, other, "DIA_Thekla_SagittaPaket_17_01"); //Wielkie dzięki. Jednak na coś się przydałeś. MIS_Thekla_Paket = LOG_SUCCESS; B_GivePlayerXP (XP_TheklasPaket); }; // ************************************************************ // PERM // ************************************************************ var int Thekla_MehrEintopfKap1; var int Thekla_MehrEintopfKap3; var int Thekla_MehrEintopfKap5; // ------------------------ instance DIA_Thekla_PERM (C_INFO) { npc = BAU_913_Thekla; nr = 900; condition = DIA_Thekla_PERM_Condition; information = DIA_Thekla_PERM_Info; permanent = TRUE; description = "Dostanę jeszcze trochę gulaszu?"; }; func int DIA_Thekla_PERM_Condition() { if (Thekla_GaveStew == TRUE) { return TRUE; }; }; func void DIA_Thekla_PERM_Info() { AI_Output (other, self, "DIA_Thekla_PERM_15_00"); //Dostanę jeszcze trochę gulaszu? if (MIS_Thekla_Paket == FALSE) { AI_Output (self, other, "DIA_Thekla_PERM_17_01"); //Już nie ma. AI_Output (other, self, "DIA_Thekla_PERM_15_02"); //Nawet małej miseczki? AI_Output (self, other, "DIA_Thekla_PERM_17_03"); //Nawet miseczki. AI_Output (other, self, "DIA_Thekla_PERM_15_04"); //Mogę wylizać garnek? AI_Output (self, other, "DIA_Thekla_PERM_17_05"); //Daj spokój! AI_Output (self, other, "DIA_Thekla_PERM_17_06"); //Skoro tak ci smakuje mój gulasz, będziesz musiał coś zrobić, by go dostać. AI_Output (other, self, "DIA_Thekla_PERM_15_07"); //Co takiego? AI_Output (self, other, "DIA_Thekla_PERM_17_08"); //Udaj się do Sagitty, wiedźmy mieszkającej za farmą Sekoba, i przynieś mi od niej paczkę ziół. AI_Output (self, other, "DIA_Thekla_PERM_17_09"); //Jeśli przyniesiesz zioła, ugotuję gulasz. MIS_Thekla_Paket = LOG_RUNNING; CreateInvItems (Sagitta,ItMi_TheklasPaket,1); Log_CreateTopic (TOPIC_TheklaEintopf,LOG_MISSION); Log_SetTopicStatus (TOPIC_TheklaEintopf,LOG_RUNNING); B_LogEntry (TOPIC_TheklaEintopf,"Jeśli przyniosę Thekli zioła od uzdrawiaczki Sagitty, mogę liczyć na kolejny posiłek. Sagitta mieszka za farmą Sekoba."); } else if (MIS_Thekla_Paket == LOG_SUCCESS) { if (Kapitel <= 2) { if (Thekla_MehrEintopfKap1 == FALSE) { AI_Output (self, other, "DIA_Thekla_PERM_17_10"); //W porządku. Znaj moje dobre serce. Proszę, nie chcę, żebyś się biedaczku zagłodził. B_GiveInvItems (self, other, ItFo_XPStew, 1); Thekla_MehrEintopfKap1 = TRUE; } else { AI_Output (self, other, "DIA_Thekla_PERM_17_11"); //Hej, hej, hej! Nie tak łapczywie! Dam ci znać, jeśli będę miała dla ciebie jakieś zadanie. AI_Output (self, other, "DIA_Thekla_PERM_17_12"); //Wtedy dostaniesz więcej gulaszu, zrozumiano? }; }; if (Kapitel == 3) || (Kapitel == 4) { if (Thekla_MehrEintopfKap3 == FALSE) && (MIS_RescueBennet == LOG_SUCCESS) { AI_Output (self, other, "DIA_Thekla_PERM_17_13"); //Słyszałam, że pomogłeś Bennetowi. Dobra robota, chłopcze. B_GiveInvItems (self, other, ItFo_XPStew, 1); Thekla_MehrEintopfKap3 = TRUE; } else { if (MIS_RescueBennet != LOG_SUCCESS) { AI_Output (self, other, "DIA_Thekla_PERM_17_14"); //Te psubraty ze straży uwięziły Benneta! AI_Output (self, other, "DIA_Thekla_PERM_17_15"); //Zrób coś dla mnie i wyciągnij tego nieszczęśnika. W międzyczasie ugotuję trochę smakowitego gulaszu. } else { AI_Output (self, other, "DIA_Thekla_PERM_17_16"); //Nic już nie zostało. Przyjdź później. }; }; }; if (Kapitel >= 5) { if (Thekla_MehrEintopfKap5 == FALSE) { AI_Output (self, other, "DIA_Thekla_PERM_17_17"); //Nigdy nie przestajesz być głodny? Czym ty się właściwie zajmujesz? AI_Output (other, self, "DIA_Thekla_PERM_15_18"); //Właśnie posiekałem kilka smoków. AI_Output (self, other, "DIA_Thekla_PERM_17_19"); //Och! W takim razie zasłużyłeś chyba na porządną michę gulaszu. B_GiveInvItems (self, other, ItFo_XPStew, 1); Thekla_MehrEintopfKap5 = TRUE; } else { AI_Output (self, other, "DIA_Thekla_PERM_17_20"); //To wszystko, nie ma już więcej. }; }; } else //Running oder Failed { AI_Output (self, other, "DIA_Thekla_PERM_17_21"); //Nie ma ziół, nie ma gulaszu - jasne? }; }; // ************************************************************ // PICK POCKET // ************************************************************ INSTANCE DIA_Thekla_PICKPOCKET (C_INFO) { npc = BAU_913_Thekla; nr = 900; condition = DIA_Thekla_PICKPOCKET_Condition; information = DIA_Thekla_PICKPOCKET_Info; permanent = TRUE; description = Pickpocket_60_Female; }; FUNC INT DIA_Thekla_PICKPOCKET_Condition() { C_Beklauen (53, 60); }; FUNC VOID DIA_Thekla_PICKPOCKET_Info() { Info_ClearChoices (DIA_Thekla_PICKPOCKET); Info_AddChoice (DIA_Thekla_PICKPOCKET, DIALOG_BACK ,DIA_Thekla_PICKPOCKET_BACK); Info_AddChoice (DIA_Thekla_PICKPOCKET, DIALOG_PICKPOCKET ,DIA_Thekla_PICKPOCKET_DoIt); }; func void DIA_Thekla_PICKPOCKET_DoIt() { B_Beklauen (); Info_ClearChoices (DIA_Thekla_PICKPOCKET); }; func void DIA_Thekla_PICKPOCKET_BACK() { Info_ClearChoices (DIA_Thekla_PICKPOCKET); };
D
/** * D header file for C99. * * $(C_HEADER_DESCRIPTION pubs.opengroup.org/onlinepubs/009695399/basedefs/_string.h.html, _string.h) * * Copyright: Copyright Sean Kelly 2005 - 2009. * License: Distributed under the * $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0). * (See accompanying file LICENSE) * Authors: Sean Kelly * Source: $(DRUNTIMESRC core/stdc/_string.d) * Standards: ISO/IEC 9899:1999 (E) */ module core.stdc.string; version (OSX) version = Darwin; else version (iOS) version = Darwin; else version (TVOS) version = Darwin; else version (WatchOS) version = Darwin; // Those libs don't expose the mandated C interface version (CRuntime_Glibc) version = ReturnStrerrorR; else version (CRuntime_UClibc) version = ReturnStrerrorR; extern (C): nothrow: @nogc: /// inout(void)* memchr(return scope inout void* s, int c, size_t n) pure; /// int memcmp(scope const void* s1, scope const void* s2, size_t n) pure; /// void* memcpy(return scope void* s1, scope const void* s2, size_t n) pure; version (Windows) { /// int memicmp(scope const char* s1, scope const char* s2, size_t n); } /// void* memmove(return scope void* s1, scope const void* s2, size_t n) pure; /// void* memset(return scope void* s, int c, size_t n) pure; /// char* strcat(return scope char* s1, scope const char* s2) pure; /// inout(char)* strchr(return scope inout(char)* s, int c) pure; /// int strcmp(scope const char* s1, scope const char* s2) pure; /// int strcoll(scope const char* s1, scope const char* s2); /// char* strcpy(return scope char* s1, scope const char* s2) pure; /// size_t strcspn(scope const char* s1, scope const char* s2) pure; /// char* strdup(scope const char *s); /// char* strerror(int errnum); // This `strerror_r` definition is not following the POSIX standard version (ReturnStrerrorR) { /// const(char)* strerror_r(int errnum, return scope char* buf, size_t buflen); } // This one is else { int strerror_r(int errnum, scope char* buf, size_t buflen); } /// size_t strlen(scope const char* s) pure; /// char* strncat(return scope char* s1, scope const char* s2, size_t n) pure; /// int strncmp(scope const char* s1, scope const char* s2, size_t n) pure; /// char* strncpy(return scope char* s1, scope const char* s2, size_t n) pure; /// inout(char)* strpbrk(return scope inout(char)* s1, scope const char* s2) pure; /// inout(char)* strrchr(return scope inout(char)* s, int c) pure; /// size_t strspn(scope const char* s1, scope const char* s2) pure; /// inout(char)* strstr(return scope inout(char)* s1, scope const char* s2) pure; /// char* strtok(return scope char* s1, scope const char* s2); /// size_t strxfrm(scope char* s1, scope const char* s2, size_t n);
D
const int SPL_Cost_Waterfist = 17; const int SPL_DAMAGE_Waterfist = 125; instance Spell_Waterfist(C_Spell_Proto) { time_per_mana = 0; damage_per_level = SPL_DAMAGE_Waterfist; damagetype = DAM_MAGIC; }; func int Spell_Logic_Waterfist(var int manaInvested) { if(Npc_GetActiveSpellIsScroll(self) && (self.attribute[ATR_MANA] >= SPL_Cost_Scroll)) { return SPL_SENDCAST; } else if(self.attribute[ATR_MANA] >= SPL_Cost_Waterfist) { return SPL_SENDCAST; } else { return SPL_SENDSTOP; }; }; func void Spell_Cast_Waterfist() { if(Npc_GetActiveSpellIsScroll(self)) { self.attribute[ATR_MANA] = self.attribute[ATR_MANA] - SPL_Cost_Scroll; } else { self.attribute[ATR_MANA] = self.attribute[ATR_MANA] - SPL_Cost_Waterfist; }; self.aivar[AIV_SelectSpell] += 1; };
D
// Copyright Brian Schott 2015. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) module dfmt.formatter; import dparse.lexer; import dparse.parser; import dparse.rollback_allocator; import dfmt.config; import dfmt.ast_info; import dfmt.indentation; import dfmt.tokens; import dfmt.wrapping; import std.array; void format(OutputRange)(string source_desc, ubyte[] buffer, OutputRange output, Config* formatterConfig) { LexerConfig config; config.stringBehavior = StringBehavior.source; config.whitespaceBehavior = WhitespaceBehavior.skip; LexerConfig parseConfig; parseConfig.stringBehavior = StringBehavior.source; parseConfig.whitespaceBehavior = WhitespaceBehavior.skip; StringCache cache = StringCache(StringCache.defaultBucketCount); ASTInformation astInformation; RollbackAllocator allocator; auto parseTokens = getTokensForParser(buffer, parseConfig, &cache); auto mod = parseModule(parseTokens, source_desc, &allocator); auto visitor = new FormatVisitor(&astInformation); visitor.visit(mod); astInformation.cleanup(); auto tokens = byToken(buffer, config, &cache).array(); auto depths = generateDepthInfo(tokens); auto tokenFormatter = TokenFormatter!OutputRange(buffer, tokens, depths, output, &astInformation, formatterConfig); tokenFormatter.format(); } immutable(short[]) generateDepthInfo(const Token[] tokens) pure nothrow @trusted { import std.exception : assumeUnique; short[] retVal = new short[](tokens.length); short depth = 0; foreach (i, ref t; tokens) { switch (t.type) { case tok!"[": depth++; goto case; case tok!"{": case tok!"(": depth++; break; case tok!"]": depth--; goto case; case tok!"}": case tok!")": depth--; break; default: break; } retVal[i] = depth; } return cast(immutable) retVal; } struct TokenFormatter(OutputRange) { /** * Params: * rawSource = ? * tokens = the tokens to format * depths = ? * output = the output range that the code will be formatted to * astInformation = information about the AST used to inform formatting * decisions. * config = ? */ this(const ubyte[] rawSource, const(Token)[] tokens, immutable short[] depths, OutputRange output, ASTInformation* astInformation, Config* config) { this.rawSource = rawSource; this.tokens = tokens; this.depths = depths; this.output = output; this.astInformation = astInformation; this.config = config; } /// Runs the formatting process void format() { while (index < tokens.length) formatStep(); } private: /// Current indentation level int indentLevel; /// Current index into the tokens array size_t index; /// Length of the current line (so far) uint currentLineLength = 0; /// Output to write output to OutputRange output; /// Used for skipping parts of the file with `dfmt off` and `dfmt on` comments const ubyte[] rawSource; /// Tokens being formatted const Token[] tokens; /// Paren depth info immutable short[] depths; /// Information about the AST const ASTInformation* astInformation; /// Token indices where line breaks should be placed size_t[] linebreakHints; /// Current indentation stack for the file IndentStack indents; /// Configuration const Config* config; /// Keep track of whether or not an extra newline was just added because of /// an import statement. bool justAddedExtraNewline; /// Current paren depth int parenDepth; /// Current special brace depth. Used for struct initializers and lambdas. int sBraceDepth; /// Current non-indented brace depth. Used for struct initializers and lambdas. int niBraceDepth; /// True if a space should be placed when parenDepth reaches zero bool spaceAfterParens; /// True if we're in an ASM block bool inAsm; void formatStep() { import std.range : assumeSorted; assert(index < tokens.length); if (currentIs(tok!"comment")) { formatComment(); } else if (isStringLiteral(current.type) || isNumberLiteral(current.type) || currentIs(tok!"characterLiteral")) { writeToken(); if (index < tokens.length) { immutable t = tokens[index].type; if (t == tok!"identifier" || isStringLiteral(t) || isNumberLiteral(t) || t == tok!"characterLiteral") write(" "); } } else if (currentIs(tok!"module") || currentIs(tok!"import")) { formatModuleOrImport(); } else if (currentIs(tok!"return")) { writeToken(); if (!currentIs(tok!";") && !currentIs(tok!")")) write(" "); } else if (currentIs(tok!"with")) { if (indents.length == 0 || indents.top != tok!"switch") indents.push(tok!"with"); writeToken(); write(" "); if (currentIs(tok!"(")) writeParens(false); if (!currentIs(tok!"switch") && !currentIs(tok!"with") && !currentIs(tok!"{") && !(currentIs(tok!"final") && peekIs(tok!"switch"))) { newline(); } else if (!currentIs(tok!"{")) write(" "); } else if (currentIs(tok!"switch")) { formatSwitch(); } else if (currentIs(tok!"extern") && peekIs(tok!"(")) { writeToken(); write(" "); } else if ((isBlockHeader() || currentIs(tok!"version") || currentIs(tok!"debug")) && peekIs(tok!"(", false)) { if (!assumeSorted(astInformation.constraintLocations).equalRange(current.index).empty) formatConstraint(); else formatBlockHeader(); } else if (currentIs(tok!"do")) { formatBlockHeader(); } else if (currentIs(tok!"else")) { formatElse(); } else if (currentIs(tok!"asm")) { formatKeyword(); while (index < tokens.length && !currentIs(tok!"{")) formatStep(); if (index < tokens.length) { int depth = 1; formatStep(); inAsm = true; while (index < tokens.length && depth > 0) { if (currentIs(tok!"{")) ++depth; else if (currentIs(tok!"}")) --depth; formatStep(); } inAsm = false; } } else if (isKeyword(current.type)) { formatKeyword(); } else if (isBasicType(current.type)) { writeToken(); if (currentIs(tok!"identifier") || isKeyword(current.type) || inAsm) write(" "); } else if (isOperator(current.type)) { formatOperator(); } else if (currentIs(tok!"identifier")) { writeToken(); if (index < tokens.length && (currentIs(tok!"identifier") || isBasicType(current.type) || currentIs(tok!"@") || currentIs(tok!"if") || isNumberLiteral(tokens[index].type) || (inAsm && peekBack2Is(tok!";") && currentIs(tok!"[")))) { write(" "); } } else if (currentIs(tok!"scriptLine")) { writeToken(); newline(); } else writeToken(); } void formatConstraint() { with (TemplateConstraintStyle) final switch (config.dfmt_template_constraint_style) { case unspecified: assert(false, "Config was not validated properly"); case conditional_newline: immutable l = currentLineLength + betweenParenLength(tokens[index + 1 .. $]); if (l > config.dfmt_soft_max_line_length) newline(); else if (peekBackIs(tok!")")) write(" "); break; case always_newline: newline(); break; case conditional_newline_indent: immutable l = currentLineLength + betweenParenLength(tokens[index + 1 .. $]); if (l > config.dfmt_soft_max_line_length) { pushWrapIndent(tok!"!"); newline(); } else if (peekBackIs(tok!")")) write(" "); break; case always_newline_indent: pushWrapIndent(tok!"!"); newline(); break; } // if writeToken(); // assume that the parens are present, otherwise the parser would not // have told us there was a constraint here write(" "); writeParens(false); } string commentText(size_t i) { import std.string : strip; assert(tokens[i].type == tok!"comment"); string commentText = tokens[i].text; if (commentText[0 .. 2] == "//") commentText = commentText[2 .. $]; else commentText = commentText[2 .. $ - 2]; return commentText.strip(); } void skipFormatting() { size_t dfmtOff = index; size_t dfmtOn = index; foreach (i; dfmtOff + 1 .. tokens.length) { dfmtOn = i; if (tokens[i].type != tok!"comment") continue; immutable string commentText = commentText(i); if (commentText == "dfmt on") break; } write(cast(string) rawSource[tokens[dfmtOff].index .. tokens[dfmtOn].index]); index = dfmtOn; } void formatComment() { if (commentText(index) == "dfmt off") { skipFormatting(); return; } immutable bool currIsSlashSlash = tokens[index].text[0 .. 2] == "//"; immutable prevTokenEndLine = index == 0 ? size_t.max : tokenEndLine(tokens[index - 1]); immutable size_t currTokenLine = tokens[index].line; if (index > 0) { immutable t = tokens[index - 1].type; immutable canAddNewline = currTokenLine - prevTokenEndLine < 1; if (peekBackIsOperator() && !isSeparationToken(t)) pushWrapIndent(t); else if (peekBackIs(tok!",") && prevTokenEndLine == currTokenLine && indents.indentToMostRecent(tok!"enum") == -1) pushWrapIndent(tok!","); if (peekBackIsOperator() && !peekBackIsOneOf(false, tok!"comment", tok!"{", tok!"}", tok!":", tok!";", tok!",", tok!"[", tok!"(") && !canAddNewline && prevTokenEndLine < currTokenLine) write(" "); else if (prevTokenEndLine == currTokenLine || (t == tok!")" && peekIs(tok!"{"))) write(" "); else if (canAddNewline || (peekIs(tok!"{") && t == tok!"}")) newline(); } writeToken(); immutable j = justAddedExtraNewline; if (currIsSlashSlash) { newline(); justAddedExtraNewline = j; } else if (index < tokens.length) { if (index < tokens.length && prevTokenEndLine == tokens[index].line) { if (currentIs(tok!"}")) { if (indents.topIs(tok!"{")) indents.pop(); write(" "); } else if (!currentIs(tok!"{")) write(" "); } else if (!currentIs(tok!"{")) { if (currentIs(tok!")") && indents.topIs(tok!",")) indents.pop(); else if (peekBack2Is(tok!",") && !indents.topIs(tok!",") && indents.indentToMostRecent(tok!"enum") == -1) pushWrapIndent(tok!","); newline(); } } else newline(); } void formatModuleOrImport() { immutable t = current.type; writeToken(); if (currentIs(tok!"(")) { writeParens(false); return; } write(" "); while (index < tokens.length) { if (currentIs(tok!";")) { writeToken(); if (index >= tokens.length) { newline(); break; } if (currentIs(tok!"comment") && current.line == peekBack().line) { break; } else if (currentIs(tok!"{") && config.dfmt_brace_style == BraceStyle.allman) break; else if (t == tok!"import" && !currentIs(tok!"import") && !currentIs(tok!"}") && !(currentIs(tok!"public") && peekIs(tok!"import")) && !indents.topIsOneOf(tok!"if", tok!"debug", tok!"version")) { simpleNewline(); currentLineLength = 0; justAddedExtraNewline = true; newline(); } else newline(); break; } else if (currentIs(tok!":")) { if (config.dfmt_selective_import_space) write(" "); writeToken(); write(" "); } else if (currentIs(tok!",")) { // compute length until next ',' or ';' int lengthOfNextChunk; for (size_t i = index + 1; i < tokens.length; i++) { if (tokens[i].type == tok!"," || tokens[i].type == tok!";") break; const len = tokenLength(tokens[i]); assert(len >= 0); lengthOfNextChunk += len; } assert(lengthOfNextChunk > 0); writeToken(); if (currentLineLength + 1 + lengthOfNextChunk >= config.dfmt_soft_max_line_length) { pushWrapIndent(tok!","); newline(); } else write(" "); } else formatStep(); } } void formatLeftParenOrBracket() in { assert(currentIs(tok!"(") || currentIs(tok!"[")); } body { immutable p = current.type; regenLineBreakHintsIfNecessary(index); writeToken(); if (p == tok!"(") { if (isBlockHeaderToken(tokens[index - 2].type)) indents.push(tok!")"); else indents.push(p); spaceAfterParens = true; parenDepth++; } immutable bool arrayInitializerStart = p == tok!"[" && linebreakHints.length != 0 && astInformation.arrayStartLocations.canFindIndex(tokens[index - 1].index); if (arrayInitializerStart) { // Use the close bracket as the indent token to distinguish // the array initialiazer from an array index in the newline // handling code pushWrapIndent(tok!"]"); newline(); immutable size_t j = expressionEndIndex(index); linebreakHints = chooseLineBreakTokens(index, tokens[index .. j], depths[index .. j], config, currentLineLength, indentLevel); } else if (!currentIs(tok!")") && !currentIs(tok!"]") && (linebreakHints.canFindIndex(index - 1) || (linebreakHints.length == 0 && currentLineLength > config.max_line_length))) { newline(); } } void formatRightParen() in { assert(currentIs(tok!")")); } body { parenDepth--; indents.popWrapIndents(); while (indents.topIsOneOf(tok!"!", tok!")")) indents.pop(); if (indents.topIs(tok!"(")) indents.pop(); if (parenDepth == 0 && (peekIs(tok!"is") || peekIs(tok!"in") || peekIs(tok!"out") || peekIs(tok!"body"))) writeToken(); else if (peekIsLiteralOrIdent() || peekIsBasicType()) { writeToken(); if (spaceAfterParens || parenDepth > 0) write(" "); } else if ((peekIsKeyword() || peekIs(tok!"@")) && spaceAfterParens && !peekIs(tok!"in") && !peekIs(tok!"is") && !peekIs(tok!"if")) { writeToken(); write(" "); } else writeToken(); } void formatAt() { writeToken(); if (currentIs(tok!"identifier")) writeToken(); if (currentIs(tok!"(")) { writeParens(false); if (tokens[index].type == tok!"{") return; if (index < tokens.length && tokens[index - 1].line < tokens[index].line) newline(); else write(" "); } else if (index < tokens.length && (currentIs(tok!"@") || isBasicType(tokens[index].type) || currentIs(tok!"identifier") || currentIs(tok!"if"))) write(" "); } void formatColon() { import dfmt.editorconfig : OptionalBoolean; immutable bool isCase = astInformation.caseEndLocations.canFindIndex(current.index); immutable bool isAttribute = astInformation.attributeDeclarationLines.canFindIndex( current.line); if (isCase || isAttribute) { writeToken(); if (!currentIs(tok!"{")) { if (isCase && !indents.topIs(tok!"case") && config.dfmt_align_switch_statements == OptionalBoolean.f) indents.push(tok!"case"); else if (isAttribute && !indents.topIs(tok!"@") && config.dfmt_outdent_attributes == OptionalBoolean.f) indents.push(tok!"@"); newline(); } } else if (peekBackIs(tok!"identifier") && (peekBack2Is(tok!"{", true) || peekBack2Is(tok!"}", true) || peekBack2Is(tok!";", true) || peekBack2Is(tok!":", true)) && !(isBlockHeader(1) && !peekIs(tok!"if"))) { writeToken(); if (!currentIs(tok!"{")) newline(); } else { regenLineBreakHintsIfNecessary(index); if (peekIs(tok!"..")) writeToken(); else if (isBlockHeader(1) && !peekIs(tok!"if")) { writeToken(); if (config.dfmt_compact_labeled_statements) write(" "); else newline(); } else if (linebreakHints.canFindIndex(index)) { pushWrapIndent(); newline(); writeToken(); write(" "); } else { write(" : "); index++; } } } void formatSemicolon() { if ((parenDepth > 0 && sBraceDepth == 0) || (sBraceDepth > 0 && niBraceDepth > 0)) { if (currentLineLength > config.dfmt_soft_max_line_length) { writeToken(); pushWrapIndent(tok!";"); newline(); } else { if (!(peekIs(tok!";") || peekIs(tok!")") || peekIs(tok!"}"))) write("; "); else write(";"); index++; } } else { writeToken(); linebreakHints = []; while (indents.topIs(tok!"enum")) indents.pop(); if (indents.topAre(tok!"static", tok!"else")) { indents.pop(); indents.pop(); } if (config.dfmt_brace_style == BraceStyle.allman) { if (!currentIs(tok!"{")) newline(); } else { if (currentIs(tok!"{")) indents.popTempIndents(); indentLevel = indents.indentLevel; newline(); } } } void formatLeftBrace() { import std.algorithm : map, sum, canFind; if (astInformation.structInitStartLocations.canFindIndex(tokens[index].index)) { sBraceDepth++; auto e = expressionEndIndex(index); immutable int l = currentLineLength + tokens[index .. e].map!(a => tokenLength(a)) .sum(); writeToken(); if (l > config.dfmt_soft_max_line_length) { indents.push(tok!"{"); newline(); } else niBraceDepth++; } else if (astInformation.funLitStartLocations.canFindIndex(tokens[index].index)) { sBraceDepth++; if (peekBackIs(tok!")")) write(" "); auto e = expressionEndIndex(index); immutable int l = currentLineLength + tokens[index .. e].map!(a => tokenLength(a)) .sum(); immutable bool multiline = l > config.dfmt_soft_max_line_length || tokens[index .. e].canFind!(a => a.type == tok!"comment" || isBlockHeaderToken(a.type))(); writeToken(); if (multiline) { indents.push(tok!"{"); newline(); } else { niBraceDepth++; write(" "); } } else { if (peekBackIsSlashSlash()) { if (peekBack2Is(tok!";")) { indents.popTempIndents(); indentLevel = indents.indentLevel - 1; } writeToken(); } else { if (indents.topIsTemp && indents.indentToMostRecent(tok!"static") == -1) indentLevel = indents.indentLevel - 1; else indentLevel = indents.indentLevel; if (config.dfmt_brace_style == BraceStyle.allman || peekBackIsOneOf(true, tok!"{", tok!"}")) newline(); else if (!peekBackIsOneOf(true, tok!"{", tok!"}", tok!";")) write(" "); writeToken(); } indents.push(tok!"{"); if (!currentIs(tok!"{")) newline(); linebreakHints = []; } } void formatRightBrace() { if (astInformation.structInitEndLocations.canFindIndex(tokens[index].index)) { if (sBraceDepth > 0) sBraceDepth--; if (niBraceDepth > 0) niBraceDepth--; writeToken(); } else if (astInformation.funLitEndLocations.canFindIndex(tokens[index].index)) { if (niBraceDepth > 0) { if (!peekBackIsSlashSlash()) write(" "); niBraceDepth--; } if (sBraceDepth > 0) sBraceDepth--; writeToken(); } else { // Silly hack to format enums better. if ((peekBackIsLiteralOrIdent() || peekBackIsOneOf(true, tok!")", tok!",")) && !peekBackIsSlashSlash()) newline(); write("}"); if (index + 1 < tokens.length && astInformation.doubleNewlineLocations.canFindIndex(tokens[index].index) && !peekIs(tok!"}") && !peekIs(tok!"else") && !peekIs(tok!";") && !peekIs(tok!"comment", false)) { simpleNewline(); currentLineLength = 0; justAddedExtraNewline = true; } if (config.dfmt_brace_style == BraceStyle.otbs && peekIs(tok!"else") && !indents.topAre(tok!"static", tok!"if")) { write(" "); index++; } else { if (!peekIs(tok!",") && !peekIs(tok!")") && !peekIs(tok!";") && !peekIs(tok!"{")) { index++; if (indents.topIs(tok!"static")) indents.pop(); newline(); } else index++; } } } void formatSwitch() { while (indents.topIs(tok!"with")) indents.pop(); indents.push(tok!"switch"); writeToken(); // switch write(" "); } void formatBlockHeader() { if (indents.topIs(tok!"!")) indents.pop(); immutable bool a = !currentIs(tok!"version") && !currentIs(tok!"debug"); immutable bool b = a || astInformation.conditionalWithElseLocations.canFindIndex(current.index); immutable bool c = b || astInformation.conditionalStatementLocations.canFindIndex(current.index); immutable bool shouldPushIndent = (c || peekBackIs(tok!"else")) && !(currentIs(tok!"if") && indents.topIsWrap()); if (currentIs(tok!"out") && !peekBackIs(tok!"}")) newline(); if (shouldPushIndent) { if (peekBackIs(tok!"static")) { if (indents.topIs(tok!"else")) indents.pop(); if (!indents.topIs(tok!"static")) indents.push(tok!"static"); } indents.push(current.type); } writeToken(); if (currentIs(tok!"(")) { write(" "); writeParens(false); } if (currentIs(tok!"switch") || (currentIs(tok!"final") && peekIs(tok!"switch"))) write(" "); else if (currentIs(tok!"comment")) formatStep(); else if (!shouldPushIndent) { if (!currentIs(tok!"{") && !currentIs(tok!";")) write(" "); } else if (!currentIs(tok!"{") && !currentIs(tok!";") && !currentIs(tok!"in") && !currentIs(tok!"out") && !currentIs(tok!"body")) newline(); else if (currentIs(tok!"{") && indents.topAre(tok!"static", tok!"if")) { // Hacks to format braced vs non-braced static if declarations. indents.pop(); indents.pop(); indents.push(tok!"if"); formatLeftBrace(); } } void formatElse() { writeToken(); if (currentIs(tok!"if") || currentIs(tok!"version") || (currentIs(tok!"static") && peekIs(tok!"if"))) { if (indents.topIs(tok!"if") || indents.topIs(tok!"version")) indents.pop(); write(" "); } else if (currentIs(tok!":")) { writeToken(); newline(); } else if (!currentIs(tok!"{") && !currentIs(tok!"comment")) { if (indents.topIsOneOf(tok!"if", tok!"version")) indents.pop(); indents.push(tok!"else"); newline(); } else if (currentIs(tok!"{") && indents.topAre(tok!"static", tok!"if")) { indents.pop(); indents.pop(); indents.push(tok!"else"); } } void formatKeyword() { import dfmt.editorconfig : OptionalBoolean; switch (current.type) { case tok!"default": writeToken(); break; case tok!"cast": writeToken(); if (currentIs(tok!"(")) writeParens(config.dfmt_space_after_cast == OptionalBoolean.t); break; case tok!"out": if (!peekBackIs(tok!"}") && astInformation.contractLocations.canFindIndex(current.index)) newline(); else if (peekBackIsKeyword) write(" "); writeToken(); if (!currentIs(tok!"(") && !currentIs(tok!"{")) write(" "); break; case tok!"try": if (peekIs(tok!"{")) writeToken(); else { writeToken(); indents.push(tok!"try"); newline(); } break; case tok!"body": if (!peekBackIs(tok!"}")) newline(); writeToken(); break; case tok!"in": immutable isContract = astInformation.contractLocations.canFindIndex(current.index); if (isContract) { indents.popTempIndents(); newline(); } else if (!peekBackIsOneOf(false, tok!"(", tok!",", tok!"!")) write(" "); writeToken(); immutable isFunctionLit = astInformation.funLitStartLocations.canFindIndex( current.index); if (isFunctionLit && config.dfmt_brace_style == BraceStyle.allman) newline(); else if (!isContract) write(" "); break; case tok!"is": if (!peekBackIsOneOf(false, tok!"!", tok!"(", tok!",", tok!"}", tok!"=", tok!"&&", tok!"||") && !peekBackIsKeyword()) write(" "); writeToken(); if (!currentIs(tok!"(") && !currentIs(tok!"{")) write(" "); break; case tok!"case": writeToken(); if (!currentIs(tok!";")) write(" "); break; case tok!"enum": if (peekIs(tok!")") || peekIs(tok!"==")) { writeToken(); } else { if (peekBackIs(tok!"identifier")) write(" "); indents.push(tok!"enum"); writeToken(); if (!currentIs(tok!":") && !currentIs(tok!"{")) write(" "); } break; default: if (peekBackIs(tok!"identifier")) write(" "); if (index + 1 < tokens.length) { if (!peekIs(tok!"@") && (peekIsOperator() || peekIs(tok!"out") || peekIs(tok!"in"))) writeToken(); else { writeToken(); write(" "); } } else writeToken(); break; } } void formatOperator() { import std.algorithm : canFind; switch (current.type) { case tok!"*": if (astInformation.spaceAfterLocations.canFindIndex(current.index)) { writeToken(); if (!currentIs(tok!"*") && !currentIs(tok!")") && !currentIs(tok!"[") && !currentIs(tok!",") && !currentIs(tok!";")) { write(" "); } break; } else if (astInformation.unaryLocations.canFindIndex(current.index)) { writeToken(); break; } regenLineBreakHintsIfNecessary(index); goto binary; case tok!"~": if (peekIs(tok!"this")) { if (!(index == 0 || peekBackIs(tok!"{", true) || peekBackIs(tok!"}", true) || peekBackIs(tok!";", true))) { write(" "); } writeToken(); break; } goto case; case tok!"&": case tok!"+": case tok!"-": if (astInformation.unaryLocations.canFindIndex(current.index)) { writeToken(); break; } regenLineBreakHintsIfNecessary(index); goto binary; case tok!"[": case tok!"(": formatLeftParenOrBracket(); break; case tok!")": formatRightParen(); break; case tok!"@": formatAt(); break; case tok!"!": if (((peekIs(tok!"is") || peekIs(tok!"in")) && !peekBackIsOperator()) || peekBackIs(tok!")")) write(" "); goto case; case tok!"...": case tok!"++": case tok!"--": case tok!"$": writeToken(); break; case tok!":": formatColon(); break; case tok!"]": indents.popWrapIndents(); if (indents.topIs(tok!"]")) newline(); writeToken(); if (currentIs(tok!"identifier")) write(" "); break; case tok!";": formatSemicolon(); break; case tok!"{": formatLeftBrace(); break; case tok!"}": formatRightBrace(); break; case tok!".": regenLineBreakHintsIfNecessary(index); if (linebreakHints.canFind(index) || (linebreakHints.length == 0 && currentLineLength + nextTokenLength() > config.max_line_length)) { pushWrapIndent(); newline(); } writeToken(); break; case tok!",": formatComma(); break; case tok!"&&": case tok!"||": case tok!"|": regenLineBreakHintsIfNecessary(index); goto case; case tok!"=": case tok!">=": case tok!">>=": case tok!">>>=": case tok!"|=": case tok!"-=": case tok!"/=": case tok!"*=": case tok!"&=": case tok!"%=": case tok!"+=": case tok!"^^": case tok!"^=": case tok!"^": case tok!"~=": case tok!"<<=": case tok!"<<": case tok!"<=": case tok!"<>=": case tok!"<>": case tok!"<": case tok!"==": case tok!"=>": case tok!">>>": case tok!">>": case tok!">": case tok!"!<=": case tok!"!<>=": case tok!"!<>": case tok!"!<": case tok!"!=": case tok!"!>=": case tok!"!>": case tok!"?": case tok!"/": case tok!"..": case tok!"%": binary: immutable bool isWrapToken = linebreakHints.canFind(index); if (config.dfmt_split_operator_at_line_end) { if (isWrapToken) { pushWrapIndent(); write(" "); writeToken(); newline(); } else { write(" "); writeToken(); if (!currentIs(tok!"comment")) write(" "); } } else { if (isWrapToken) { pushWrapIndent(); newline(); writeToken(); } else { write(" "); writeToken(); } if (!currentIs(tok!"comment")) write(" "); } break; default: writeToken(); break; } } void formatComma() { import std.algorithm : canFind; regenLineBreakHintsIfNecessary(index); if (indents.indentToMostRecent(tok!"enum") != -1 && !peekIs(tok!"}") && indents.topIs(tok!"{") && parenDepth == 0) { writeToken(); newline(); } else if (!peekIs(tok!"}") && (linebreakHints.canFind(index) || (linebreakHints.length == 0 && currentLineLength > config.max_line_length))) { pushWrapIndent(); writeToken(); newline(); } else { writeToken(); if (!currentIs(tok!")") && !currentIs(tok!"]") && !currentIs(tok!"}") && !currentIs(tok!"comment")) { write(" "); } } regenLineBreakHintsIfNecessary(index - 1); } void regenLineBreakHints(immutable size_t i) { immutable size_t j = expressionEndIndex(i); // Use magical negative value for array literals and wrap indents immutable inLvl = (indents.topIsWrap() || indents.topIs(tok!"]")) ? -indentLevel : indentLevel; linebreakHints = chooseLineBreakTokens(i, tokens[i .. j], depths[i .. j], config, currentLineLength, inLvl); } void regenLineBreakHintsIfNecessary(immutable size_t i) { if (linebreakHints.length == 0 || linebreakHints[$ - 1] <= i - 1) regenLineBreakHints(i); } void simpleNewline() { import dfmt.editorconfig : EOL; final switch (config.end_of_line) { case EOL.cr: output.put("\r"); break; case EOL.lf: output.put("\n"); break; case EOL.crlf: output.put("\r\n"); break; case EOL.unspecified: assert(false, "config.end_of_line was unspecified"); } } void newline() { import std.range : assumeSorted; import std.algorithm : max; import dfmt.editorconfig : OptionalBoolean; if (currentIs(tok!"comment") && index > 0 && current.line == tokenEndLine(tokens[index - 1])) return; immutable bool hasCurrent = index < tokens.length; if (niBraceDepth > 0 && !peekBackIsSlashSlash() && hasCurrent && tokens[index].type == tok!"}" && !assumeSorted(astInformation.funLitEndLocations).equalRange( tokens[index].index).empty) { write(" "); return; } simpleNewline(); if (!justAddedExtraNewline && index > 0 && hasCurrent && tokens[index].line - tokenEndLine(tokens[index - 1]) > 1) { simpleNewline(); } justAddedExtraNewline = false; currentLineLength = 0; if (hasCurrent) { if (currentIs(tok!"else")) { immutable i = indents.indentToMostRecent(tok!"if"); immutable v = indents.indentToMostRecent(tok!"version"); immutable mostRecent = max(i, v); if (mostRecent != -1) indentLevel = mostRecent; } else if (currentIs(tok!"identifier") && peekIs(tok!":")) { if (peekBackIs(tok!"}", true) || peekBackIs(tok!";", true)) indents.popTempIndents(); immutable l = indents.indentToMostRecent(tok!"switch"); if (l != -1 && config.dfmt_align_switch_statements == OptionalBoolean.t) indentLevel = l; else if (config.dfmt_compact_labeled_statements == OptionalBoolean.f || !isBlockHeader(2) || peek2Is(tok!"if")) { immutable l2 = indents.indentToMostRecent(tok!"{"); indentLevel = l2 != -1 ? l2 : indents.indentLevel - 1; } else indentLevel = indents.indentLevel; } else if (currentIs(tok!"case") || currentIs(tok!"default")) { if (peekBackIs(tok!"}", true) || peekBackIs(tok!";", true)) { indents.popTempIndents(); if (indents.topIs(tok!"case")) indents.pop(); } immutable l = indents.indentToMostRecent(tok!"switch"); if (l != -1) indentLevel = config.dfmt_align_switch_statements == OptionalBoolean.t ? l : indents.indentLevel; } else if (currentIs(tok!")")) { if (indents.topIs(tok!"(")) indents.pop(); indentLevel = indents.indentLevel; } else if (currentIs(tok!"{")) { indents.popWrapIndents(); if (peekBackIsSlashSlash() && peekBack2Is(tok!";")) { indents.popTempIndents(); indentLevel = indents.indentLevel; } } else if (currentIs(tok!"}")) { indents.popTempIndents(); while (indents.topIsOneOf(tok!"case", tok!"@", tok!"static")) indents.pop(); if (indents.topIs(tok!"{")) { indentLevel = indents.indentToMostRecent(tok!"{"); indents.pop(); } while (sBraceDepth == 0 && indents.topIsTemp() && ((!indents.topIsOneOf(tok!"else", tok!"if", tok!"static", tok!"version")) || !peekIs(tok!"else"))) { indents.pop(); } } else if (currentIs(tok!"]")) { indents.popWrapIndents(); if (indents.topIs(tok!"]")) { indents.pop(); indentLevel = indents.indentLevel; } } else if (astInformation.attributeDeclarationLines.canFindIndex(current.line)) { if (config.dfmt_outdent_attributes == OptionalBoolean.t) { immutable l = indents.indentToMostRecent(tok!"{"); if (l != -1) indentLevel = l; } else { if (indents.topIs(tok!"@")) indents.pop(); indentLevel = indents.indentLevel; } } else { if (indents.topIsTemp() && (peekBackIsOneOf(true, tok!"}", tok!";") && indents.top != tok!";")) indents.popTempIndents(); indentLevel = indents.indentLevel; } indent(); } } void write(string str) { currentLineLength += str.length; output.put(str); } void writeToken() { import std.range:retro; import std.algorithm.searching:countUntil; if (current.text is null) { immutable s = str(current.type); currentLineLength += s.length; output.put(str(current.type)); } else { // You know what's awesome? Windows can't handle its own line // endings correctly. version (Windows) output.put(current.text.replace("\r", "")); else output.put(current.text); switch (current.type) { case tok!"stringLiteral": case tok!"wstringLiteral": case tok!"dstringLiteral": immutable o = current.text.retro().countUntil('\n'); currentLineLength += o == -1 ? current.text.length : o; break; default: currentLineLength += current.text.length; break; } } index++; } void writeParens(bool spaceAfter) in { assert(currentIs(tok!"("), str(current.type)); } body { immutable int depth = parenDepth; immutable int startingNiBraceDepth = niBraceDepth; immutable int startingSBraceDepth = sBraceDepth; parenDepth = 0; do { spaceAfterParens = spaceAfter; if (currentIs(tok!";") && niBraceDepth <= startingNiBraceDepth && sBraceDepth <= startingSBraceDepth) { if (currentLineLength >= config.dfmt_soft_max_line_length) { pushWrapIndent(); writeToken(); newline(); } else { writeToken(); if (!currentIs(tok!")") && !currentIs(tok!";")) write(" "); } } else formatStep(); } while (index < tokens.length && parenDepth > 0); if (indents.topIs(tok!"!")) indents.pop(); parenDepth = depth; spaceAfterParens = spaceAfter; } void indent() { import dfmt.editorconfig : IndentStyle; if (config.indent_style == IndentStyle.tab) { foreach (i; 0 .. indentLevel) { currentLineLength += config.tab_width; output.put("\t"); } } else { foreach (i; 0 .. indentLevel) foreach (j; 0 .. config.indent_size) { output.put(" "); currentLineLength++; } } } void pushWrapIndent(IdType type = tok!"") { immutable t = type == tok!"" ? tokens[index].type : type; if (parenDepth == 0) { if (indents.wrapIndents == 0) indents.push(t); } else if (indents.wrapIndents < 1) indents.push(t); } const pure @safe @nogc: size_t expressionEndIndex(size_t i) nothrow { immutable bool braces = i < tokens.length && tokens[i].type == tok!"{"; immutable d = depths[i]; while (true) { if (i >= tokens.length) break; if (depths[i] < d) break; if (!braces && (tokens[i].type == tok!";" || tokens[i].type == tok!"{")) break; i++; } return i; } bool peekIsKeyword() nothrow { return index + 1 < tokens.length && isKeyword(tokens[index + 1].type); } bool peekIsBasicType() nothrow { return index + 1 < tokens.length && isBasicType(tokens[index + 1].type); } bool peekIsLabel() nothrow { return peekIs(tok!"identifier") && peek2Is(tok!":"); } int currentTokenLength() { return tokenLength(tokens[index]); } int nextTokenLength() { immutable size_t i = index + 1; if (i >= tokens.length) return INVALID_TOKEN_LENGTH; return tokenLength(tokens[i]); } ref current() nothrow in { assert(index < tokens.length); } body { return tokens[index]; } const(Token) peekBack() nothrow { assert(index > 0); return tokens[index - 1]; } bool peekBackIsLiteralOrIdent() nothrow { if (index == 0) return false; switch (tokens[index - 1].type) { case tok!"doubleLiteral": case tok!"floatLiteral": case tok!"idoubleLiteral": case tok!"ifloatLiteral": case tok!"intLiteral": case tok!"longLiteral": case tok!"realLiteral": case tok!"irealLiteral": case tok!"uintLiteral": case tok!"ulongLiteral": case tok!"characterLiteral": case tok!"identifier": case tok!"stringLiteral": case tok!"wstringLiteral": case tok!"dstringLiteral": return true; default: return false; } } bool peekIsLiteralOrIdent() nothrow { if (index + 1 >= tokens.length) return false; switch (tokens[index + 1].type) { case tok!"doubleLiteral": case tok!"floatLiteral": case tok!"idoubleLiteral": case tok!"ifloatLiteral": case tok!"intLiteral": case tok!"longLiteral": case tok!"realLiteral": case tok!"irealLiteral": case tok!"uintLiteral": case tok!"ulongLiteral": case tok!"characterLiteral": case tok!"identifier": case tok!"stringLiteral": case tok!"wstringLiteral": case tok!"dstringLiteral": return true; default: return false; } } bool peekBackIs(IdType tokenType, bool ignoreComments = false) nothrow { return peekImplementation(tokenType, -1, ignoreComments); } bool peekBackIsKeyword(bool ignoreComments = true) nothrow { if (index == 0) return false; auto i = index - 1; if (ignoreComments) while (tokens[i].type == tok!"comment") { if (i == 0) return false; i--; } return isKeyword(tokens[i].type); } bool peekBackIsOperator() nothrow { return index == 0 ? false : isOperator(tokens[index - 1].type); } bool peekBackIsOneOf(bool ignoreComments, IdType[] tokenTypes...) nothrow { if (index == 0) return false; auto i = index - 1; if (ignoreComments) while (tokens[i].type == tok!"comment") { if (i == 0) return false; i--; } immutable t = tokens[i].type; foreach (tt; tokenTypes) if (tt == t) return true; return false; } bool peekBack2Is(IdType tokenType, bool ignoreComments = false) nothrow { return peekImplementation(tokenType, -2, ignoreComments); } bool peekImplementation(IdType tokenType, int n, bool ignoreComments = true) nothrow { auto i = index + n; if (ignoreComments) while (n != 0 && i < tokens.length && tokens[i].type == tok!"comment") i = n > 0 ? i + 1 : i - 1; return i < tokens.length && tokens[i].type == tokenType; } bool peek2Is(IdType tokenType, bool ignoreComments = true) nothrow { return peekImplementation(tokenType, 2, ignoreComments); } bool peekIsOperator() nothrow { return index + 1 < tokens.length && isOperator(tokens[index + 1].type); } bool peekIs(IdType tokenType, bool ignoreComments = true) nothrow { return peekImplementation(tokenType, 1, ignoreComments); } bool peekBackIsSlashSlash() nothrow { return index > 0 && tokens[index - 1].type == tok!"comment" && tokens[index - 1].text[0 .. 2] == "//"; } bool currentIs(IdType tokenType) nothrow { return index < tokens.length && tokens[index].type == tokenType; } /// Bugs: not unicode correct size_t tokenEndLine(const Token t) { import std.algorithm : count; switch (t.type) { case tok!"comment": case tok!"stringLiteral": case tok!"wstringLiteral": case tok!"dstringLiteral": return t.line + t.text.count('\n'); default: return t.line; } } bool isBlockHeaderToken(IdType t) { return t == tok!"for" || t == tok!"foreach" || t == tok!"foreach_reverse" || t == tok!"while" || t == tok!"if" || t == tok!"out" || t == tok!"do" || t == tok!"catch" || t == tok!"with" || t == tok!"synchronized" || t == tok!"scope"; } bool isBlockHeader(int i = 0) nothrow { if (i + index < 0 || i + index >= tokens.length) return false; auto t = tokens[i + index].type; return isBlockHeaderToken(t); } bool isSeparationToken(IdType t) nothrow { return t == tok!"," || t == tok!";" || t == tok!":" || t == tok!"(" || t == tok!")" || t == tok!"[" || t == tok!"]" || t == tok!"{" || t == tok!"}"; } } bool canFindIndex(const size_t[] items, size_t index) pure @safe @nogc { import std.range : assumeSorted; return !assumeSorted(items).equalRange(index).empty; }
D
{% if helpers.exists('OPNsense.IDS.general') and OPNsense.IDS.general.enabled|default("0") == "1" %} suricata_enable="YES" {% if OPNsense.IDS.general.ips|default("0") == "1" %} # IPS mode, switch to netmap {% for intfName in OPNsense.IDS.general.interfaces.split(',') %} {% if loop.index == 1 %} suricata_startup_flags="--netmap --pidfile /var/run/suricata_{{helpers.getNodeByTag('interfaces.'+intfName).if}}.pid" {% endif %} {% endfor %} {% else %} # IDS mode, pcap live mode {% set addFlags=[] %} {% for intfName in OPNsense.IDS.general.interfaces.split(',') %} {% if loop.index == 1 %} {# enable first interface #} suricata_interface="{{helpers.getNodeByTag('interfaces.'+intfName).if}}" {% else %} {# store additional interfaces to addFlags #} {% do addFlags.append(helpers.getNodeByTag('interfaces.'+intfName).if) %} {% endif %} {% endfor %} {# append additional interfaces #} suricata_flags="-D {% for intf in addFlags %} -i {{ intf }} {% endfor %} " {% endif %} {% else %} suricata_enable="NO" {% endif %} suricata_opnsense_bootup_run="/usr/local/opnsense/scripts/suricata/setup.sh"
D
// Written in the D programming language. /++ This module defines functions related to exceptions and general error handling. It also defines functions intended to aid in unit testing. Synopsis of some of std.exception's functions: -------------------- string synopsis() { FILE* f = enforce(fopen("some/file")); // f is not null from here on FILE* g = enforce!WriteException(fopen("some/other/file", "w")); // g is not null from here on Exception e = collectException(write(g, readln(f))); if (e) { ... an exception occurred... ... We have the exception to play around with... } string msg = collectExceptionMsg(write(g, readln(f))); if (msg) { ... an exception occurred... ... We have the message from the exception but not the exception... } char[] line; enforce(readln(f, line)); return assumeUnique(line); } -------------------- Macros: WIKI = Phobos/StdException Copyright: Copyright Andrei Alexandrescu 2008-, Jonathan M Davis 2011-. License: $(WEB boost.org/LICENSE_1_0.txt, Boost License 1.0) Authors: $(WEB erdani.org, Andrei Alexandrescu) and Jonathan M Davis Source: $(PHOBOSSRC std/_exception.d) +/ module std.exception; import std.range; import std.traits; import core.stdc.errno; import core.stdc.string; /++ Asserts that the given expression does $(I not) throw the given type of $(D Throwable). If a $(D Throwable) of the given type is thrown, it is caught and does not escape assertNotThrown. Rather, an $(D AssertError) is thrown. However, any other $(D Throwable)s will escape. Params: T = The $(D Throwable) to test for. expression = The expression to test. msg = Optional message to output on test failure. If msg is empty, and the thrown exception has a non-empty msg field, the exception's msg field will be output on test failure. file = The file where the error occurred. Defaults to $(D __FILE__). line = The line where the error occurred. Defaults to $(D __LINE__). Throws: $(D AssertError) if the given $(D Throwable) is thrown. Returns: the result of `expression`. +/ auto assertNotThrown(T : Throwable = Exception, E) (lazy E expression, string msg = null, string file = __FILE__, size_t line = __LINE__) { import core.exception : AssertError; try { return expression(); } catch (T t) { immutable message = msg.length == 0 ? t.msg : msg; immutable tail = message.length == 0 ? "." : ": " ~ message; throw new AssertError("assertNotThrown failed: " ~ T.stringof ~ " was thrown" ~ tail, file, line, t); } } /// unittest { import core.exception : AssertError; import std.string; assertNotThrown!StringException(enforce!StringException(true, "Error!")); //Exception is the default. assertNotThrown(enforce!StringException(true, "Error!")); assert(collectExceptionMsg!AssertError(assertNotThrown!StringException( enforce!StringException(false, "Error!"))) == `assertNotThrown failed: StringException was thrown: Error!`); } unittest { import core.exception : AssertError; import std.string; assert(collectExceptionMsg!AssertError(assertNotThrown!StringException( enforce!StringException(false, ""), "Error!")) == `assertNotThrown failed: StringException was thrown: Error!`); assert(collectExceptionMsg!AssertError(assertNotThrown!StringException( enforce!StringException(false, ""))) == `assertNotThrown failed: StringException was thrown.`); assert(collectExceptionMsg!AssertError(assertNotThrown!StringException( enforce!StringException(false, ""), "")) == `assertNotThrown failed: StringException was thrown.`); } unittest { import core.exception : AssertError; void throwEx(Throwable t) { throw t; } bool nothrowEx() { return true; } try { assert(assertNotThrown!Exception(nothrowEx())); } catch (AssertError) assert(0); try { assert(assertNotThrown!Exception(nothrowEx(), "It's a message")); } catch (AssertError) assert(0); try { assert(assertNotThrown!AssertError(nothrowEx())); } catch (AssertError) assert(0); try { assert(assertNotThrown!AssertError(nothrowEx(), "It's a message")); } catch (AssertError) assert(0); { bool thrown = false; try { assertNotThrown!Exception( throwEx(new Exception("It's an Exception"))); } catch (AssertError) thrown = true; assert(thrown); } { bool thrown = false; try { assertNotThrown!Exception( throwEx(new Exception("It's an Exception")), "It's a message"); } catch (AssertError) thrown = true; assert(thrown); } { bool thrown = false; try { assertNotThrown!AssertError( throwEx(new AssertError("It's an AssertError", __FILE__, __LINE__))); } catch (AssertError) thrown = true; assert(thrown); } { bool thrown = false; try { assertNotThrown!AssertError( throwEx(new AssertError("It's an AssertError", __FILE__, __LINE__)), "It's a message"); } catch (AssertError) thrown = true; assert(thrown); } } /++ Asserts that the given expression throws the given type of $(D Throwable). The $(D Throwable) is caught and does not escape assertThrown. However, any other $(D Throwable)s $(I will) escape, and if no $(D Throwable) of the given type is thrown, then an $(D AssertError) is thrown. Params: T = The $(D Throwable) to test for. expression = The expression to test. msg = Optional message to output on test failure. file = The file where the error occurred. Defaults to $(D __FILE__). line = The line where the error occurred. Defaults to $(D __LINE__). Throws: $(D AssertError) if the given $(D Throwable) is not thrown. +/ void assertThrown(T : Throwable = Exception, E) (lazy E expression, string msg = null, string file = __FILE__, size_t line = __LINE__) { import core.exception : AssertError; try expression(); catch (T) return; throw new AssertError("assertThrown failed: No " ~ T.stringof ~ " was thrown" ~ (msg.length == 0 ? "." : ": ") ~ msg, file, line); } /// unittest { import core.exception : AssertError; import std.string; assertThrown!StringException(enforce!StringException(false, "Error!")); //Exception is the default. assertThrown(enforce!StringException(false, "Error!")); assert(collectExceptionMsg!AssertError(assertThrown!StringException( enforce!StringException(true, "Error!"))) == `assertThrown failed: No StringException was thrown.`); } unittest { import core.exception : AssertError; void throwEx(Throwable t) { throw t; } void nothrowEx() { } try { assertThrown!Exception(throwEx(new Exception("It's an Exception"))); } catch (AssertError) assert(0); try { assertThrown!Exception(throwEx(new Exception("It's an Exception")), "It's a message"); } catch(AssertError) assert(0); try { assertThrown!AssertError(throwEx(new AssertError("It's an AssertError", __FILE__, __LINE__))); } catch (AssertError) assert(0); try { assertThrown!AssertError(throwEx(new AssertError("It's an AssertError", __FILE__, __LINE__)), "It's a message"); } catch (AssertError) assert(0); { bool thrown = false; try assertThrown!Exception(nothrowEx()); catch(AssertError) thrown = true; assert(thrown); } { bool thrown = false; try assertThrown!Exception(nothrowEx(), "It's a message"); catch(AssertError) thrown = true; assert(thrown); } { bool thrown = false; try assertThrown!AssertError(nothrowEx()); catch(AssertError) thrown = true; assert(thrown); } { bool thrown = false; try assertThrown!AssertError(nothrowEx(), "It's a message"); catch(AssertError) thrown = true; assert(thrown); } } /++ Enforces that the given value is true. Params: value = The value to test. E = Exception type to throw if the value evalues to false. msg = The error message to put in the exception if it is thrown. file = The source file of the caller. line = The line number of the caller. Returns: $(D value), if `cast(bool)value` is true. Otherwise, $(D new Exception(msg)) is thrown. Note: $(D enforce) is used to throw exceptions and is therefore intended to aid in error handling. It is $(I not) intended for verifying the logic of your program. That is what $(D assert) is for. Also, do not use $(D enforce) inside of contracts (i.e. inside of $(D in) and $(D out) blocks and $(D invariant)s), because they will be compiled out when compiling with $(I -release). Use $(D assert) in contracts. Example: -------------------- auto f = enforce(fopen("data.txt")); auto line = readln(f); enforce(line.length, "Expected a non-empty line."); -------------------- +/ T enforce(E : Throwable = Exception, T)(T value, lazy const(char)[] msg = null, string file = __FILE__, size_t line = __LINE__) if (is(typeof({ if (!value) {} }))) { if (!value) bailOut!E(file, line, msg); return value; } // Explicitly undocumented. It will be removed in August 2016. @@@DEPRECATED_2016-08@@@ deprecated("Use the overload of enforce that takes file and line as function arguments.") T enforce(T, string file, size_t line = __LINE__) (T value, lazy const(char)[] msg = null) if (is(typeof({ if (!value) {} }))) { if (!value) bailOut(file, line, msg); return value; } /++ Enforces that the given value is true. Params: value = The value to test. dg = The delegate to be called if the value evaluates to false. file = The source file of the caller. line = The line number of the caller. Returns: $(D value), if `cast(bool)value` is true. Otherwise, the given delegate is called. The safety and purity of this function are inferred from $(D Dg)'s safety and purity. +/ T enforce(T, Dg, string file = __FILE__, size_t line = __LINE__) (T value, scope Dg dg) if (isSomeFunction!Dg && is(typeof( dg() )) && is(typeof({ if (!value) {} }))) { if (!value) dg(); return value; } private void bailOut(E : Throwable = Exception)(string file, size_t line, in char[] msg) { static if (is(typeof(new E(string.init, string.init, size_t.init)))) { throw new E(msg.ptr ? msg.idup : "Enforcement failed", file, line); } else static if (is(typeof(new E(string.init, size_t.init)))) { throw new E(file, line); } else { static assert(0, "Expected this(string, string, size_t) or this(string, size_t)" ~ " constructor for " ~ __traits(identifier, E)); } } unittest { assert (enforce(123) == 123); try { enforce(false, "error"); assert (false); } catch (Exception e) { assert (e.msg == "error"); assert (e.file == __FILE__); assert (e.line == __LINE__-7); } } unittest { // Issue 10510 extern(C) void cFoo() { } enforce(false, &cFoo); } // purity and safety inference test unittest { import std.meta : AliasSeq; foreach (EncloseSafe; AliasSeq!(false, true)) foreach (EnclosePure; AliasSeq!(false, true)) { foreach (BodySafe; AliasSeq!(false, true)) foreach (BodyPure; AliasSeq!(false, true)) { enum code = "delegate void() " ~ (EncloseSafe ? "@safe " : "") ~ (EnclosePure ? "pure " : "") ~ "{ enforce(true, { " ~ "int n; " ~ (BodySafe ? "" : "auto p = &n + 10; " ) ~ // unsafe code (BodyPure ? "" : "static int g; g = 10; ") ~ // impure code "}); " ~ "}"; enum expect = (BodySafe || !EncloseSafe) && (!EnclosePure || BodyPure); version(none) pragma(msg, "safe = ", EncloseSafe?1:0, "/", BodySafe?1:0, ", ", "pure = ", EnclosePure?1:0, "/", BodyPure?1:0, ", ", "expect = ", expect?"OK":"NG", ", ", "code = ", code); static assert(__traits(compiles, mixin(code)()) == expect); } } } // Test for bugzilla 8637 unittest { struct S { static int g; ~this() {} // impure & unsafe destructor bool opCast(T:bool)() { int* p = cast(int*)0; // unsafe operation int n = g; // impure operation return true; } } S s; enforce(s); enforce(s, {}); enforce(s, new Exception("")); errnoEnforce(s); alias E1 = Exception; static class E2 : Exception { this(string fn, size_t ln) { super("", fn, ln); } } static class E3 : Exception { this(string msg) { super(msg, __FILE__, __LINE__); } } enforce!E1(s); enforce!E2(s); } deprecated unittest { struct S { static int g; ~this() {} // impure & unsafe destructor bool opCast(T:bool)() { int* p = cast(int*)0; // unsafe operation int n = g; // impure operation return true; } } S s; enforce!(S, __FILE__, __LINE__)(s, ""); } unittest { // Issue 14685 class E : Exception { this() { super("Not found"); } } static assert(!__traits(compiles, { enforce!E(false); })); } /++ Enforces that the given value is true. Params: value = The value to test. ex = The exception to throw if the value evaluates to false. Returns: $(D value), if `cast(bool)value` is true. Otherwise, $(D ex) is thrown. Example: -------------------- auto f = enforce(fopen("data.txt")); auto line = readln(f); enforce(line.length, new IOException); // expect a non-empty line -------------------- +/ T enforce(T)(T value, lazy Throwable ex) { if (!value) throw ex(); return value; } unittest { assertNotThrown(enforce(true, new Exception("this should not be thrown"))); assertThrown(enforce(false, new Exception("this should be thrown"))); } /++ Enforces that the given value is true, throwing an `ErrnoException` if it is not. Params: value = The value to test. msg = The message to include in the `ErrnoException` if it is thrown. Returns: $(D value), if `cast(bool)value` is true. Otherwise, $(D new ErrnoException(msg)) is thrown. It is assumed that the last operation set $(D errno) to an error code corresponding with the failed condition. Example: -------------------- auto f = errnoEnforce(fopen("data.txt")); auto line = readln(f); enforce(line.length); // expect a non-empty line -------------------- +/ T errnoEnforce(T, string file = __FILE__, size_t line = __LINE__) (T value, lazy string msg = null) { if (!value) throw new ErrnoException(msg, file, line); return value; } /++ If $(D !value) is $(D false), $(D value) is returned. Otherwise, $(D new E(msg, file, line)) is thrown. Or if $(D E) doesn't take a message and can be constructed with $(D new E(file, line)), then $(D new E(file, line)) will be thrown. This is legacy name, it is recommended to use $(D enforce!E) instead. Example: -------------------- auto f = enforceEx!FileMissingException(fopen("data.txt")); auto line = readln(f); enforceEx!DataCorruptionException(line.length); -------------------- +/ template enforceEx(E : Throwable) if (is(typeof(new E("", __FILE__, __LINE__)))) { /++ Ditto +/ T enforceEx(T)(T value, lazy string msg = "", string file = __FILE__, size_t line = __LINE__) { if (!value) throw new E(msg, file, line); return value; } } /++ Ditto +/ template enforceEx(E : Throwable) if (is(typeof(new E(__FILE__, __LINE__))) && !is(typeof(new E("", __FILE__, __LINE__)))) { /++ Ditto +/ T enforceEx(T)(T value, string file = __FILE__, size_t line = __LINE__) { if (!value) throw new E(file, line); return value; } } unittest { import std.array : empty; import core.exception : OutOfMemoryError; assertNotThrown(enforceEx!Exception(true)); assertNotThrown(enforceEx!Exception(true, "blah")); assertNotThrown(enforceEx!OutOfMemoryError(true)); { auto e = collectException(enforceEx!Exception(false)); assert(e !is null); assert(e.msg.empty); assert(e.file == __FILE__); assert(e.line == __LINE__ - 4); } { auto e = collectException(enforceEx!Exception(false, "hello", "file", 42)); assert(e !is null); assert(e.msg == "hello"); assert(e.file == "file"); assert(e.line == 42); } { auto e = collectException!Error(enforceEx!OutOfMemoryError(false)); assert(e !is null); assert(e.msg == "Memory allocation failed"); assert(e.file == __FILE__); assert(e.line == __LINE__ - 4); } { auto e = collectException!Error(enforceEx!OutOfMemoryError(false, "file", 42)); assert(e !is null); assert(e.msg == "Memory allocation failed"); assert(e.file == "file"); assert(e.line == 42); } static assert(!is(typeof(enforceEx!int(true)))); } unittest { alias enf = enforceEx!Exception; assertNotThrown(enf(true)); assertThrown(enf(false, "blah")); } /++ Catches and returns the exception thrown from the given expression. If no exception is thrown, then null is returned and $(D result) is set to the result of the expression. Note that while $(D collectException) $(I can) be used to collect any $(D Throwable) and not just $(D Exception)s, it is generally ill-advised to catch anything that is neither an $(D Exception) nor a type derived from $(D Exception). So, do not use $(D collectException) to collect non-$(D Exception)s unless you're sure that that's what you really want to do. Params: T = The type of exception to catch. expression = The expression which may throw an exception. result = The result of the expression if no exception is thrown. +/ T collectException(T = Exception, E)(lazy E expression, ref E result) { try { result = expression(); } catch (T e) { return e; } return null; } /// unittest { int b; int foo() { throw new Exception("blah"); } assert(collectException(foo(), b)); int[] a = new int[3]; import core.exception : RangeError; assert(collectException!RangeError(a[4], b)); } /++ Catches and returns the exception thrown from the given expression. If no exception is thrown, then null is returned. $(D E) can be $(D void). Note that while $(D collectException) $(I can) be used to collect any $(D Throwable) and not just $(D Exception)s, it is generally ill-advised to catch anything that is neither an $(D Exception) nor a type derived from $(D Exception). So, do not use $(D collectException) to collect non-$(D Exception)s unless you're sure that that's what you really want to do. Params: T = The type of exception to catch. expression = The expression which may throw an exception. +/ T collectException(T : Throwable = Exception, E)(lazy E expression) { try { expression(); } catch (T t) { return t; } return null; } unittest { int foo() { throw new Exception("blah"); } assert(collectException(foo())); } /++ Catches the exception thrown from the given expression and returns the msg property of that exception. If no exception is thrown, then null is returned. $(D E) can be $(D void). If an exception is thrown but it has an empty message, then $(D emptyExceptionMsg) is returned. Note that while $(D collectExceptionMsg) $(I can) be used to collect any $(D Throwable) and not just $(D Exception)s, it is generally ill-advised to catch anything that is neither an $(D Exception) nor a type derived from $(D Exception). So, do not use $(D collectExceptionMsg) to collect non-$(D Exception)s unless you're sure that that's what you really want to do. Params: T = The type of exception to catch. expression = The expression which may throw an exception. +/ string collectExceptionMsg(T = Exception, E)(lazy E expression) { import std.array : empty; try { expression(); return cast(string)null; } catch(T e) return e.msg.empty ? emptyExceptionMsg : e.msg; } /// unittest { void throwFunc() { throw new Exception("My Message."); } assert(collectExceptionMsg(throwFunc()) == "My Message."); void nothrowFunc() {} assert(collectExceptionMsg(nothrowFunc()) is null); void throwEmptyFunc() { throw new Exception(""); } assert(collectExceptionMsg(throwEmptyFunc()) == emptyExceptionMsg); } /++ Value that collectExceptionMsg returns when it catches an exception with an empty exception message. +/ enum emptyExceptionMsg = "<Empty Exception Message>"; /** * Casts a mutable array to an immutable array in an idiomatic * manner. Technically, $(D assumeUnique) just inserts a cast, * but its name documents assumptions on the part of the * caller. $(D assumeUnique(arr)) should only be called when * there are no more active mutable aliases to elements of $(D * arr). To strengthen this assumption, $(D assumeUnique(arr)) * also clears $(D arr) before returning. Essentially $(D * assumeUnique(arr)) indicates commitment from the caller that there * is no more mutable access to any of $(D arr)'s elements * (transitively), and that all future accesses will be done through * the immutable array returned by $(D assumeUnique). * * Typically, $(D assumeUnique) is used to return arrays from * functions that have allocated and built them. * * Params: * array = The array to cast to immutable. * * Returns: The immutable array. * * Example: * * ---- * string letters() * { * char[] result = new char['z' - 'a' + 1]; * foreach (i, ref e; result) * { * e = cast(char)('a' + i); * } * return assumeUnique(result); * } * ---- * * The use in the example above is correct because $(D result) * was private to $(D letters) and is inaccessible in writing * after the function returns. The following example shows an * incorrect use of $(D assumeUnique). * * Bad: * * ---- * private char[] buffer; * string letters(char first, char last) * { * if (first >= last) return null; // fine * auto sneaky = buffer; * sneaky.length = last - first + 1; * foreach (i, ref e; sneaky) * { * e = cast(char)('a' + i); * } * return assumeUnique(sneaky); // BAD * } * ---- * * The example above wreaks havoc on client code because it is * modifying arrays that callers considered immutable. To obtain an * immutable array from the writable array $(D buffer), replace * the last line with: * ---- * return to!(string)(sneaky); // not that sneaky anymore * ---- * * The call will duplicate the array appropriately. * * Note that checking for uniqueness during compilation is * possible in certain cases, especially when a function is * marked as a pure function. The following example does not * need to call assumeUnique because the compiler can infer the * uniqueness of the array in the pure function: * ---- * string letters() pure * { * char[] result = new char['z' - 'a' + 1]; * foreach (i, ref e; result) * { * e = cast(char)('a' + i); * } * return result; * } * ---- * * For more on infering uniqueness see the $(B unique) and * $(B lent) keywords in the * $(WEB archjava.fluid.cs.cmu.edu/papers/oopsla02.pdf, ArchJava) * language. * * The downside of using $(D assumeUnique)'s * convention-based usage is that at this time there is no * formal checking of the correctness of the assumption; * on the upside, the idiomatic use of $(D assumeUnique) is * simple and rare enough to be tolerable. * */ immutable(T)[] assumeUnique(T)(T[] array) pure nothrow { return .assumeUnique(array); // call ref version } /// ditto immutable(T)[] assumeUnique(T)(ref T[] array) pure nothrow { auto result = cast(immutable(T)[]) array; array = null; return result; } unittest { int[] arr = new int[1]; auto arr1 = assumeUnique(arr); assert(is(typeof(arr1) == immutable(int)[]) && arr == null); } immutable(T[U]) assumeUnique(T, U)(ref T[U] array) pure nothrow { auto result = cast(immutable(T[U])) array; array = null; return result; } // @@@BUG@@@ version(none) unittest { int[string] arr = ["a":1]; auto arr1 = assumeUnique(arr); assert(is(typeof(arr1) == immutable(int[string])) && arr == null); } /** * Wraps a possibly-throwing expression in a $(D nothrow) wrapper so that it * can be called by a $(D nothrow) function. * * This wrapper function documents commitment on the part of the caller that * the appropriate steps have been taken to avoid whatever conditions may * trigger an exception during the evaluation of $(D expr). If it turns out * that the expression $(I does) throw at runtime, the wrapper will throw an * $(D AssertError). * * (Note that $(D Throwable) objects such as $(D AssertError) that do not * subclass $(D Exception) may be thrown even from $(D nothrow) functions, * since they are considered to be serious runtime problems that cannot be * recovered from.) * * Params: * expr = The expression asserted not to throw. * msg = The message to include in the `AssertError` if the assumption turns * out to be false. * file = The source file name of the caller. * line = The line number of the caller. * * Returns: * The value of `expr`, if any. */ T assumeWontThrow(T)(lazy T expr, string msg = null, string file = __FILE__, size_t line = __LINE__) nothrow { import core.exception : AssertError; try { return expr; } catch(Exception e) { import std.range.primitives : empty; immutable tail = msg.empty ? "." : ": " ~ msg; throw new AssertError("assumeWontThrow failed: Expression did throw" ~ tail, file, line); } } /// unittest { import std.math : sqrt; // This function may throw. int squareRoot(int x) { if (x < 0) throw new Exception("Tried to take root of negative number"); return cast(int)sqrt(cast(double)x); } // This function never throws. int computeLength(int x, int y) nothrow { // Since x*x + y*y is always positive, we can safely assume squareRoot // won't throw, and use it to implement this nothrow function. If it // does throw (e.g., if x*x + y*y overflows a 32-bit value), then the // program will terminate. return assumeWontThrow(squareRoot(x*x + y*y)); } assert(computeLength(3, 4) == 5); } unittest { import core.exception : AssertError; void alwaysThrows() { throw new Exception("I threw up"); } void bad() nothrow { assumeWontThrow(alwaysThrows()); } assertThrown!AssertError(bad()); } /** Checks whether a given source object contains pointers or references to a given target object. Params: source = The source object target = The target object Returns: $(D true) if $(D source)'s representation embeds a pointer that points to $(D target)'s representation or somewhere inside it. If $(D source) is or contains a dynamic array, then, then these functions will check if there is overlap between the dynamic array and $(D target)'s representation. If $(D source) is a class, then it will be handled as a pointer. If $(D target) is a pointer, a dynamic array or a class, then these functions will only check if $(D source) points to $(D target), $(I not) what $(D target) references. If $(D source) is or contains a union, then there may be either false positives or false negatives: $(D doesPointTo) will return $(D true) if it is absolutely certain $(D source) points to $(D target). It may produce false negatives, but never false positives. This function should be prefered when trying to validate input data. $(D mayPointTo) will return $(D false) if it is absolutely certain $(D source) does not point to $(D target). It may produce false positives, but never false negatives. This function should be prefered for defensively choosing a code path. Note: Evaluating $(D doesPointTo(x, x)) checks whether $(D x) has internal pointers. This should only be done as an assertive test, as the language is free to assume objects don't have internal pointers (TDPL 7.1.3.5). */ bool doesPointTo(S, T, Tdummy=void)(auto ref const S source, ref const T target) @trusted pure nothrow if (__traits(isRef, source) || isDynamicArray!S || isPointer!S || is(S == class)) { static if (isPointer!S || is(S == class) || is(S == interface)) { const m = *cast(void**) &source; const b = cast(void*) &target; const e = b + target.sizeof; return b <= m && m < e; } else static if (is(S == struct) || is(S == union)) { foreach (i, Subobj; typeof(source.tupleof)) static if (!isUnionAliased!(S, i)) if (doesPointTo(source.tupleof[i], target)) return true; return false; } else static if (isStaticArray!S) { foreach (size_t i; 0 .. S.length) if (doesPointTo(source[i], target)) return true; return false; } else static if (isDynamicArray!S) { import std.array : overlap; return overlap(cast(void[])source, cast(void[])(&target)[0 .. 1]).length != 0; } else { return false; } } // for shared objects /// ditto bool doesPointTo(S, T)(auto ref const shared S source, ref const shared T target) @trusted pure nothrow { return doesPointTo!(shared S, shared T, void)(source, target); } /// ditto bool mayPointTo(S, T, Tdummy=void)(auto ref const S source, ref const T target) @trusted pure nothrow if (__traits(isRef, source) || isDynamicArray!S || isPointer!S || is(S == class)) { static if (isPointer!S || is(S == class) || is(S == interface)) { const m = *cast(void**) &source; const b = cast(void*) &target; const e = b + target.sizeof; return b <= m && m < e; } else static if (is(S == struct) || is(S == union)) { foreach (i, Subobj; typeof(source.tupleof)) if (mayPointTo(source.tupleof[i], target)) return true; return false; } else static if (isStaticArray!S) { foreach (size_t i; 0 .. S.length) if (mayPointTo(source[i], target)) return true; return false; } else static if (isDynamicArray!S) { import std.array : overlap; return overlap(cast(void[])source, cast(void[])(&target)[0 .. 1]).length != 0; } else { return false; } } // for shared objects /// ditto bool mayPointTo(S, T)(auto ref const shared S source, ref const shared T target) @trusted pure nothrow { return mayPointTo!(shared S, shared T, void)(source, target); } /// Pointers unittest { int i = 0; int* p = null; assert(!p.doesPointTo(i)); p = &i; assert( p.doesPointTo(i)); } /// Structs and Unions unittest { struct S { int v; int* p; } int i; auto s = S(0, &i); // structs and unions "own" their members // pointsTo will answer true if one of the members pointsTo. assert(!s.doesPointTo(s.v)); //s.v is just v member of s, so not pointed. assert( s.p.doesPointTo(i)); //i is pointed by s.p. assert( s .doesPointTo(i)); //which means i is pointed by s itself. // Unions will behave exactly the same. Points to will check each "member" // individually, even if they share the same memory } /// Arrays (dynamic and static) unittest { int i; int[] slice = [0, 1, 2, 3, 4]; int[5] arr = [0, 1, 2, 3, 4]; int*[] slicep = [&i]; int*[1] arrp = [&i]; // A slice points to all of its members: assert( slice.doesPointTo(slice[3])); assert(!slice[0 .. 2].doesPointTo(slice[3])); // Object 3 is outside of the // slice [0 .. 2] // Note that a slice will not take into account what its members point to. assert( slicep[0].doesPointTo(i)); assert(!slicep .doesPointTo(i)); // static arrays are objects that own their members, just like structs: assert(!arr.doesPointTo(arr[0])); // arr[0] is just a member of arr, so not // pointed. assert( arrp[0].doesPointTo(i)); // i is pointed by arrp[0]. assert( arrp .doesPointTo(i)); // which means i is pointed by arrp // itself. // Notice the difference between static and dynamic arrays: assert(!arr .doesPointTo(arr[0])); assert( arr[].doesPointTo(arr[0])); assert( arrp .doesPointTo(i)); assert(!arrp[].doesPointTo(i)); } /// Classes unittest { class C { this(int* p){this.p = p;} int* p; } int i; C a = new C(&i); C b = a; // Classes are a bit particular, as they are treated like simple pointers // to a class payload. assert( a.p.doesPointTo(i)); // a.p points to i. assert(!a .doesPointTo(i)); // Yet a itself does not point i. //To check the class payload itself, iterate on its members: () { foreach (index, _; Fields!C) if (doesPointTo(a.tupleof[index], i)) return; assert(0); }(); // To check if a class points a specific payload, a direct memmory check // can be done: auto aLoc = cast(ubyte[__traits(classInstanceSize, C)]*) a; assert(b.doesPointTo(*aLoc)); // b points to where a is pointing } unittest { struct S1 { int a; S1 * b; } S1 a1; S1 * p = &a1; assert(doesPointTo(p, a1)); S1 a2; a2.b = &a1; assert(doesPointTo(a2, a1)); struct S3 { int[10] a; } S3 a3; auto a4 = a3.a[2 .. 3]; assert(doesPointTo(a4, a3)); auto a5 = new double[4]; auto a6 = a5[1 .. 2]; assert(!doesPointTo(a5, a6)); auto a7 = new double[3]; auto a8 = new double[][1]; a8[0] = a7; assert(!doesPointTo(a8[0], a8[0])); // don't invoke postblit on subobjects { static struct NoCopy { this(this) { assert(0); } } static struct Holder { NoCopy a, b, c; } Holder h; cast(void)doesPointTo(h, h); } shared S3 sh3; shared sh3sub = sh3.a[]; assert(doesPointTo(sh3sub, sh3)); int[] darr = [1, 2, 3, 4]; //dynamic arrays don't point to each other, or slices of themselves assert(!doesPointTo(darr, darr)); assert(!doesPointTo(darr[0 .. 1], darr)); //But they do point their elements foreach (i; 0 .. 4) assert(doesPointTo(darr, darr[i])); assert(doesPointTo(darr[0..3], darr[2])); assert(!doesPointTo(darr[0..3], darr[3])); } unittest { //tests with static arrays //Static arrays themselves are just objects, and don't really *point* to anything. //They aggregate their contents, much the same way a structure aggregates its attributes. //*However* The elements inside the static array may themselves point to stuff. //Standard array int[2] k; assert(!doesPointTo(k, k)); //an array doesn't point to itself //Technically, k doesn't point its elements, although it does alias them assert(!doesPointTo(k, k[0])); assert(!doesPointTo(k, k[1])); //But an extracted slice will point to the same array. assert(doesPointTo(k[], k)); assert(doesPointTo(k[], k[1])); //An array of pointers int*[2] pp; int a; int b; pp[0] = &a; assert( doesPointTo(pp, a)); //The array contains a pointer to a assert(!doesPointTo(pp, b)); //The array does NOT contain a pointer to b assert(!doesPointTo(pp, pp)); //The array does not point itslef //A struct containing a static array of pointers static struct S { int*[2] p; } S s; s.p[0] = &a; assert( doesPointTo(s, a)); //The struct contains an array that points a assert(!doesPointTo(s, b)); //But doesn't point b assert(!doesPointTo(s, s)); //The struct doesn't actually point itslef. //An array containing structs that have pointers static struct SS { int* p; } SS[2] ss = [SS(&a), SS(null)]; assert( doesPointTo(ss, a)); //The array contains a struct that points to a assert(!doesPointTo(ss, b)); //The array doesn't contains a struct that points to b assert(!doesPointTo(ss, ss)); //The array doesn't point itself. } unittest //Unions { int i; union U //Named union { size_t asInt = 0; int* asPointer; } struct S { union //Anonymous union { size_t asInt = 0; int* asPointer; } } U u; S s; assert(!doesPointTo(u, i)); assert(!doesPointTo(s, i)); assert(!mayPointTo(u, i)); assert(!mayPointTo(s, i)); u.asPointer = &i; s.asPointer = &i; assert(!doesPointTo(u, i)); assert(!doesPointTo(s, i)); assert( mayPointTo(u, i)); assert( mayPointTo(s, i)); u.asInt = cast(size_t)&i; s.asInt = cast(size_t)&i; assert(!doesPointTo(u, i)); assert(!doesPointTo(s, i)); assert( mayPointTo(u, i)); assert( mayPointTo(s, i)); } unittest //Classes { int i; static class A { int* p; } A a = new A, b = a; assert(!doesPointTo(a, b)); //a does not point to b a.p = &i; assert(!doesPointTo(a, i)); //a does not point to i } unittest //alias this test { static int i; static int j; struct S { int* p; @property int* foo(){return &i;} alias foo this; } assert(is(S : int*)); S s = S(&j); assert(!doesPointTo(s, i)); assert( doesPointTo(s, j)); assert( doesPointTo(cast(int*)s, i)); assert(!doesPointTo(cast(int*)s, j)); } unittest //more alias this opCast { void* p; class A { void* opCast(T)() if (is(T == void*)) { return p; } alias foo = opCast!(void*); alias foo this; } assert(!doesPointTo(A.init, p)); assert(!mayPointTo(A.init, p)); } /+ Returns true if the field at index $(D i) in ($D T) shares its address with another field. Note: This does not merelly check if the field is a member of an union, but also that it is not a single child. +/ package enum isUnionAliased(T, size_t i) = isUnionAliasedImpl!T(T.tupleof[i].offsetof); private bool isUnionAliasedImpl(T)(size_t offset) { int count = 0; foreach (i, U; typeof(T.tupleof)) if (T.tupleof[i].offsetof == offset) ++count; return count >= 2; } // unittest { static struct S { int a0; //Not aliased union { int a1; //Not aliased } union { int a2; //Aliased int a3; //Aliased } union A4 { int b0; //Not aliased } A4 a4; union A5 { int b0; //Aliased int b1; //Aliased } A5 a5; } static assert(!isUnionAliased!(S, 0)); //a0; static assert(!isUnionAliased!(S, 1)); //a1; static assert( isUnionAliased!(S, 2)); //a2; static assert( isUnionAliased!(S, 3)); //a3; static assert(!isUnionAliased!(S, 4)); //a4; static assert(!isUnionAliased!(S.A4, 0)); //a4.b0; static assert(!isUnionAliased!(S, 5)); //a5; static assert( isUnionAliased!(S.A5, 0)); //a5.b0; static assert( isUnionAliased!(S.A5, 1)); //a5.b1; } /********************* * Thrown if errors that set $(D errno) occur. */ class ErrnoException : Exception { final @property uint errno() { return _errno; } /// Operating system error code. private uint _errno; this(string msg, string file = null, size_t line = 0) @trusted { _errno = .errno; version (CRuntime_Glibc) { char[1024] buf = void; auto s = core.stdc.string.strerror_r(errno, buf.ptr, buf.length); } else { auto s = core.stdc.string.strerror(errno); } super(msg ~ " (" ~ s[0..s.strlen].idup ~ ")", file, line); } } /++ ML-style functional exception handling. Runs the supplied expression and returns its result. If the expression throws a $(D Throwable), runs the supplied error handler instead and return its result. The error handler's type must be the same as the expression's type. Params: E = The type of $(D Throwable)s to catch. Defaults to $(D Exception) T1 = The type of the expression. T2 = The return type of the error handler. expression = The expression to run and return its result. errorHandler = The handler to run if the expression throwed. Returns: expression, if it does not throw. Otherwise, returns the result of errorHandler. Example: -------------------- //Revert to a default value upon an error: assert("x".to!int().ifThrown(0) == 0); -------------------- You can also chain multiple calls to ifThrown, each capturing errors from the entire preceding expression. Example: -------------------- //Chaining multiple calls to ifThrown to attempt multiple things in a row: string s="true"; assert(s.to!int(). ifThrown(cast(int)s.to!double()). ifThrown(cast(int)s.to!bool()) == 1); //Respond differently to different types of errors assert(enforce("x".to!int() < 1).to!string() .ifThrown!ConvException("not a number") .ifThrown!Exception("number too small") == "not a number"); -------------------- The expression and the errorHandler must have a common type they can both be implicitly casted to, and that type will be the type of the compound expression. Example: -------------------- //null and new Object have a common type(Object). static assert(is(typeof(null.ifThrown(new Object())) == Object)); static assert(is(typeof((new Object()).ifThrown(null)) == Object)); //1 and new Object do not have a common type. static assert(!__traits(compiles, 1.ifThrown(new Object()))); static assert(!__traits(compiles, (new Object()).ifThrown(1))); -------------------- If you need to use the actual thrown exception, you can use a delegate. Example: -------------------- //Use a lambda to get the thrown object. assert("%s".format().ifThrown!Exception(e => e.classinfo.name) == "std.format.FormatException"); -------------------- +/ //lazy version CommonType!(T1, T2) ifThrown(E : Throwable = Exception, T1, T2)(lazy scope T1 expression, lazy scope T2 errorHandler) { static assert(!is(typeof(return) == void), "The error handler's return value(" ~ T2.stringof ~ ") does not have a common type with the expression(" ~ T1.stringof ~ ")." ); try { return expression(); } catch(E) { return errorHandler(); } } ///ditto //delegate version CommonType!(T1, T2) ifThrown(E : Throwable, T1, T2)(lazy scope T1 expression, scope T2 delegate(E) errorHandler) { static assert(!is(typeof(return) == void), "The error handler's return value(" ~ T2.stringof ~ ") does not have a common type with the expression(" ~ T1.stringof ~ ")." ); try { return expression(); } catch(E e) { return errorHandler(e); } } ///ditto //delegate version, general overload to catch any Exception CommonType!(T1, T2) ifThrown(T1, T2)(lazy scope T1 expression, scope T2 delegate(Exception) errorHandler) { static assert(!is(typeof(return) == void), "The error handler's return value(" ~ T2.stringof ~ ") does not have a common type with the expression(" ~ T1.stringof ~ ")." ); try { return expression(); } catch(Exception e) { return errorHandler(e); } } //Verify Examples unittest { import std.string; import std.conv; //Revert to a default value upon an error: assert("x".to!int().ifThrown(0) == 0); //Chaining multiple calls to ifThrown to attempt multiple things in a row: string s="true"; assert(s.to!int(). ifThrown(cast(int)s.to!double()). ifThrown(cast(int)s.to!bool()) == 1); //Respond differently to different types of errors assert(enforce("x".to!int() < 1).to!string() .ifThrown!ConvException("not a number") .ifThrown!Exception("number too small") == "not a number"); //null and new Object have a common type(Object). static assert(is(typeof(null.ifThrown(new Object())) == Object)); static assert(is(typeof((new Object()).ifThrown(null)) == Object)); //1 and new Object do not have a common type. static assert(!__traits(compiles, 1.ifThrown(new Object()))); static assert(!__traits(compiles, (new Object()).ifThrown(1))); //Use a lambda to get the thrown object. assert("%s".format().ifThrown(e => e.classinfo.name) == "std.format.FormatException"); } unittest { import std.string; import std.conv; import core.exception; //Basic behaviour - all versions. assert("1".to!int().ifThrown(0) == 1); assert("x".to!int().ifThrown(0) == 0); assert("1".to!int().ifThrown!ConvException(0) == 1); assert("x".to!int().ifThrown!ConvException(0) == 0); assert("1".to!int().ifThrown(e=>0) == 1); assert("x".to!int().ifThrown(e=>0) == 0); static if (__traits(compiles, 0.ifThrown!Exception(e => 0))) //This will only work with a fix that was not yet pulled { assert("1".to!int().ifThrown!ConvException(e=>0) == 1); assert("x".to!int().ifThrown!ConvException(e=>0) == 0); } //Exceptions other than stated not caught. assert("x".to!int().ifThrown!StringException(0).collectException!ConvException() !is null); static if (__traits(compiles, 0.ifThrown!Exception(e => 0))) //This will only work with a fix that was not yet pulled { assert("x".to!int().ifThrown!StringException(e=>0).collectException!ConvException() !is null); } //Default does not include errors. int throwRangeError() { throw new RangeError; } assert(throwRangeError().ifThrown(0).collectException!RangeError() !is null); assert(throwRangeError().ifThrown(e=>0).collectException!RangeError() !is null); //Incompatible types are not accepted. static assert(!__traits(compiles, 1.ifThrown(new Object()))); static assert(!__traits(compiles, (new Object()).ifThrown(1))); static assert(!__traits(compiles, 1.ifThrown(e=>new Object()))); static assert(!__traits(compiles, (new Object()).ifThrown(e=>1))); } version(unittest) package @property void assertCTFEable(alias dg)() { static assert({ cast(void)dg(); return true; }()); cast(void)dg(); } /** This $(D enum) is used to select the primitives of the range to handle by the $(LREF handle) range wrapper. The values of the $(D enum) can be $(D OR)'d to select multiple primitives to be handled. $(D RangePrimitive.access) is a shortcut for the access primitives; $(D front), $(D back) and $(D opIndex). $(D RangePrimitive.pop) is a shortcut for the mutating primitives; $(D popFront) and $(D popBack). */ enum RangePrimitive { front = 0b00_0000_0001, /// back = 0b00_0000_0010, /// Ditto popFront = 0b00_0000_0100, /// Ditto popBack = 0b00_0000_1000, /// Ditto empty = 0b00_0001_0000, /// Ditto save = 0b00_0010_0000, /// Ditto length = 0b00_0100_0000, /// Ditto opDollar = 0b00_1000_0000, /// Ditto opIndex = 0b01_0000_0000, /// Ditto opSlice = 0b10_0000_0000, /// Ditto access = front | back | opIndex, /// Ditto pop = popFront | popBack, /// Ditto } /** Handle exceptions thrown from range primitives. Use the $(LREF RangePrimitive) enum to specify which primitives to _handle. Multiple range primitives can be handled at once by using the $(D OR) operator or the pseudo-primitives $(D RangePrimitive.access) and $(D RangePrimitive.pop). All handled primitives must have return types or values compatible with the user-supplied handler. Params: E = The type of $(D Throwable) to _handle. primitivesToHandle = Set of range primitives to _handle. handler = The callable that is called when a handled primitive throws a $(D Throwable) of type $(D E). The handler must accept arguments of the form $(D E, ref IRange) and its return value is used as the primitive's return value whenever $(D E) is thrown. For $(D opIndex), the handler can optionally recieve a third argument; the index that caused the exception. input = The range to _handle. Returns: A wrapper $(D struct) that preserves the range interface of $(D input). opSlice: Infinite ranges with slicing support must return an instance of $(XREF range, Take) when sliced with a specific lower and upper bound (see $(XREF_PACK range,primitives,hasSlicing)); $(D handle) deals with this by $(D take)ing 0 from the return value of the handler function and returning that when an exception is caught. */ auto handle(E : Throwable, RangePrimitive primitivesToHandle, alias handler, Range)(Range input) if (isInputRange!Range) { static struct Handler { private Range range; static if (isForwardRange!Range) { @property typeof(this) save() { static if (primitivesToHandle & RangePrimitive.save) { try { return typeof(this)(range.save); } catch(E exception) { return typeof(this)(handler(exception, this.range)); } } else return typeof(this)(range.save); } } static if (isInfinite!Range) { enum bool empty = false; } else { @property bool empty() { static if (primitivesToHandle & RangePrimitive.empty) { try { return this.range.empty; } catch(E exception) { return handler(exception, this.range); } } else return this.range.empty; } } @property auto ref front() { static if (primitivesToHandle & RangePrimitive.front) { try { return this.range.front; } catch(E exception) { return handler(exception, this.range); } } else return this.range.front; } void popFront() { static if (primitivesToHandle & RangePrimitive.popFront) { try { this.range.popFront(); } catch(E exception) { handler(exception, this.range); } } else this.range.popFront(); } static if (isBidirectionalRange!Range) { @property auto ref back() { static if (primitivesToHandle & RangePrimitive.back) { try { return this.range.back; } catch(E exception) { return handler(exception, this.range); } } else return this.range.back; } void popBack() { static if (primitivesToHandle & RangePrimitive.popBack) { try { this.range.popBack(); } catch(E exception) { handler(exception, this.range); } } else this.range.popBack(); } } static if (isRandomAccessRange!Range) { auto ref opIndex(size_t index) { static if (primitivesToHandle & RangePrimitive.opIndex) { try { return this.range[index]; } catch(E exception) { static if (__traits(compiles, handler(exception, this.range, index))) return handler(exception, this.range, index); else return handler(exception, this.range); } } else return this.range[index]; } } static if (hasLength!Range) { @property auto length() { static if (primitivesToHandle & RangePrimitive.length) { try { return this.range.length; } catch(E exception) { return handler(exception, this.range); } } else return this.range.length; } } static if (hasSlicing!Range) { static if (hasLength!Range) { typeof(this) opSlice(size_t lower, size_t upper) { static if (primitivesToHandle & RangePrimitive.opSlice) { try { return typeof(this)(this.range[lower .. upper]); } catch(E exception) { return typeof(this)(handler(exception, this.range)); } } else return typeof(this)(this.range[lower .. upper]); } } else static if (is(typeof(Range.init[size_t.init .. $]))) { static struct DollarToken {} enum opDollar = DollarToken.init; typeof(this) opSlice(size_t lower, DollarToken) { static if (primitivesToHandle & RangePrimitive.opSlice) { try { return typeof(this)(this.range[lower .. $]); } catch(E exception) { return typeof(this)(handler(exception, this.range)); } } else return typeof(this)(this.range[lower .. $]); } Take!Handler opSlice(size_t lower, size_t upper) { static if (primitivesToHandle & RangePrimitive.opSlice) { try { return takeExactly(typeof(this)(this.range[lower .. $]), upper - 1); } catch(E exception) { return takeExactly(typeof(this)(handler(exception, this.range)), 0); } } else return takeExactly(typeof(this)(this.range[lower .. $]), upper - 1); } } } } return Handler(input); } /// pure @safe unittest { import std.algorithm : equal, map, splitter; import std.conv : to, ConvException; auto s = "12,1337z32,54,2,7,9,1z,6,8"; // The next line composition will throw when iterated // as some elements of the input do not convert to integer auto r = s.splitter(',').map!(a => to!int(a)); // Substitute 0 for cases of ConvException auto h = r.handle!(ConvException, RangePrimitive.front, (e, r) => 0); assert(h.equal([12, 0, 54, 2, 7, 9, 0, 6, 8])); } /// pure @safe unittest { import std.algorithm : equal; import std.range : retro; import std.utf : UTFException; auto str = "hello\xFFworld"; // 0xFF is an invalid UTF-8 code unit auto handled = str.handle!(UTFException, RangePrimitive.access, (e, r) => ' '); // Replace invalid code points with spaces assert(handled.equal("hello world")); // `front` is handled, assert(handled.retro.equal("dlrow olleh")); // as well as `back` } pure nothrow @safe unittest { static struct ThrowingRange { pure @safe: @property bool empty() { throw new Exception("empty has thrown"); } @property int front() { throw new Exception("front has thrown"); } @property int back() { throw new Exception("back has thrown"); } void popFront() { throw new Exception("popFront has thrown"); } void popBack() { throw new Exception("popBack has thrown"); } int opIndex(size_t) { throw new Exception("opIndex has thrown"); } ThrowingRange opSlice(size_t, size_t) { throw new Exception("opSlice has thrown"); } @property size_t length() { throw new Exception("length has thrown"); } alias opDollar = length; @property ThrowingRange save() { throw new Exception("save has thrown"); } } static assert(isInputRange!ThrowingRange); static assert(isForwardRange!ThrowingRange); static assert(isBidirectionalRange!ThrowingRange); static assert(hasSlicing!ThrowingRange); static assert(hasLength!ThrowingRange); auto f = ThrowingRange(); auto fb = f.handle!(Exception, RangePrimitive.front | RangePrimitive.back, (e, r) => -1)(); assert(fb.front == -1); assert(fb.back == -1); assertThrown(fb.popFront()); assertThrown(fb.popBack()); assertThrown(fb.empty); assertThrown(fb.save); assertThrown(fb[0]); auto accessRange = f.handle!(Exception, RangePrimitive.access, (e, r) => -1); assert(accessRange.front == -1); assert(accessRange.back == -1); assert(accessRange[0] == -1); assertThrown(accessRange.popFront()); assertThrown(accessRange.popBack()); auto pfb = f.handle!(Exception, RangePrimitive.pop, (e, r) => -1)(); pfb.popFront(); // this would throw otherwise pfb.popBack(); // this would throw otherwise auto em = f.handle!(Exception, RangePrimitive.empty, (e, r) => false)(); assert(!em.empty); auto arr = f.handle!(Exception, RangePrimitive.opIndex, (e, r) => 1337)(); assert(arr[0] == 1337); auto arr2 = f.handle!(Exception, RangePrimitive.opIndex, (e, r, i) => i)(); assert(arr2[0] == 0); assert(arr2[1337] == 1337); auto save = f.handle!(Exception, RangePrimitive.save, function(Exception e, ref ThrowingRange r) { return ThrowingRange(); })(); save.save; auto slice = f.handle!(Exception, RangePrimitive.opSlice, (e, r) => ThrowingRange())(); auto sliced = slice[0 .. 1337]; // this would throw otherwise static struct Infinite { pure @safe: enum bool empty = false; int front() { assert(false); } void popFront() { assert(false); } Infinite save() @property { assert(false); } static struct DollarToken {} enum opDollar = DollarToken.init; Take!Infinite opSlice(size_t, size_t) { assert(false); } Infinite opSlice(size_t, DollarToken) { throw new Exception("opSlice has thrown"); } } static assert(isInputRange!Infinite); static assert(isInfinite!Infinite); static assert(hasSlicing!Infinite); assertThrown(Infinite()[0 .. $]); auto infinite = Infinite.init.handle!(Exception, RangePrimitive.opSlice, (e, r) => Infinite())(); auto infSlice = infinite[0 .. $]; // this would throw otherwise } /++ Convenience mixin for trivially sub-classing exceptions Even trivially sub-classing an exception involves writing boilerplate code for the constructor to: 1) correctly pass in the source file and line number the exception was thrown from; 2) be usable with $(LREF enforce) which expects exception constructors to take arguments in a fixed order. This mixin provides that boilerplate code. Note however that you need to mark the $(B mixin) line with at least a minimal (i.e. just $(B ///)) DDoc comment if you want the mixed-in constructors to be documented in the newly created Exception subclass. $(RED Current limitation): Due to $(LINK2 https://issues.dlang.org/show_bug.cgi?id=11500, bug #11500), currently the constructors specified in this mixin cannot be overloaded with any other custom constructors. Thus this mixin can currently only be used when no such custom constructors need to be explicitly specified. +/ mixin template basicExceptionCtors() { /++ Params: msg = The message for the exception. file = The file where the exception occurred. line = The line number where the exception occurred. next = The previous exception in the chain of exceptions, if any. +/ this(string msg, string file = __FILE__, size_t line = __LINE__, Throwable next = null) @nogc @safe pure nothrow { super(msg, file, line, next); } /++ Params: msg = The message for the exception. next = The previous exception in the chain of exceptions. file = The file where the exception occurred. line = The line number where the exception occurred. +/ this(string msg, Throwable next, string file = __FILE__, size_t line = __LINE__) @nogc @safe pure nothrow { super(msg, file, line, next); } } /// unittest { class MeaCulpa: Exception { /// mixin basicExceptionCtors; } try throw new MeaCulpa("test"); catch (MeaCulpa e) { assert(e.msg == "test"); assert(e.file == __FILE__); assert(e.line == __LINE__ - 5); } } @safe pure nothrow unittest { class TestException : Exception { mixin basicExceptionCtors; } auto e = new Exception("msg"); auto te1 = new TestException("foo"); auto te2 = new TestException("foo", e); } unittest { class TestException : Exception { mixin basicExceptionCtors; } auto e = new Exception("!!!"); auto te1 = new TestException("message", "file", 42, e); assert(te1.msg == "message"); assert(te1.file == "file"); assert(te1.line == 42); assert(te1.next is e); auto te2 = new TestException("message", e, "file", 42); assert(te2.msg == "message"); assert(te2.file == "file"); assert(te2.line == 42); assert(te2.next is e); auto te3 = new TestException("foo"); assert(te3.msg == "foo"); assert(te3.file == __FILE__); assert(te3.line == __LINE__ - 3); assert(te3.next is null); auto te4 = new TestException("foo", e); assert(te4.msg == "foo"); assert(te4.file == __FILE__); assert(te4.line == __LINE__ - 3); assert(te4.next is e); }
D
/* Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef QWEBELEMENT_H #define QWEBELEMENT_H public import qt.QtCore.qstring; public import qt.QtCore.qstringlist; public import qt.QtCore.qrect; public import qt.QtCore.qvariant; public import qt.QtCore.qshareddata; public import qt.qwebkitglobal; namespace WebCore { class Element; class Node; } QT_BEGIN_NAMESPACE class QPainter; QT_END_NAMESPACE class QWebFrame; class QWebElementCollection; class QWebElementPrivate; class QWEBKIT_EXPORT QWebElement { public: QWebElement(); QWebElement(ref const(QWebElement)); QWebElement &operator=(ref const(QWebElement)); ~QWebElement(); bool operator==(ref const(QWebElement) o) const; bool operator!=(ref const(QWebElement) o) const; bool isNull() const; QWebElementCollection findAll(ref const(QString) selectorQuery) const; QWebElement findFirst(ref const(QString) selectorQuery) const; void setPlainText(ref const(QString) text); QString toPlainText() const; void setOuterXml(ref const(QString) markup); QString toOuterXml() const; void setInnerXml(ref const(QString) markup); QString toInnerXml() const; void setAttribute(ref const(QString) name, ref const(QString) value); void setAttributeNS(ref const(QString) namespaceUri, ref const(QString) name, ref const(QString) value); QString attribute(ref const(QString) name, ref const(QString) defaultValue = QString()) const; QString attributeNS(ref const(QString) namespaceUri, ref const(QString) name, ref const(QString) defaultValue = QString()) const; bool hasAttribute(ref const(QString) name) const; bool hasAttributeNS(ref const(QString) namespaceUri, ref const(QString) name) const; void removeAttribute(ref const(QString) name); void removeAttributeNS(ref const(QString) namespaceUri, ref const(QString) name); bool hasAttributes() const; QStringList attributeNames(ref const(QString) namespaceUri = QString()) const; QStringList classes() const; bool hasClass(ref const(QString) name) const; void addClass(ref const(QString) name); void removeClass(ref const(QString) name); void toggleClass(ref const(QString) name); bool hasFocus() const; void setFocus(); QRect geometry() const; QString tagName() const; QString prefix() const; QString localName() const; QString namespaceUri() const; QWebElement parent() const; QWebElement firstChild() const; QWebElement lastChild() const; QWebElement nextSibling() const; QWebElement previousSibling() const; QWebElement document() const; QWebFrame *webFrame() const; // TODO: Add QWebElementCollection overloads // docs need example snippet void appendInside(ref const(QString) markup); void appendInside(ref const(QWebElement) element); // docs need example snippet void prependInside(ref const(QString) markup); void prependInside(ref const(QWebElement) element); // docs need example snippet void appendOutside(ref const(QString) markup); void appendOutside(ref const(QWebElement) element); // docs need example snippet void prependOutside(ref const(QString) markup); void prependOutside(ref const(QWebElement) element); // docs need example snippet void encloseContentsWith(ref const(QWebElement) element); void encloseContentsWith(ref const(QString) markup); void encloseWith(ref const(QString) markup); void encloseWith(ref const(QWebElement) element); void replace(ref const(QString) markup); void replace(ref const(QWebElement) element); QWebElement clone() const; QWebElement& takeFromDocument(); void removeFromDocument(); void removeAllChildren(); QVariant evaluateJavaScript(ref const(QString) scriptSource); enum StyleResolveStrategy { InlineStyle, CascadedStyle, ComputedStyle }; QString styleProperty(ref const(QString) name, StyleResolveStrategy strategy) const; void setStyleProperty(ref const(QString) name, ref const(QString) value); void render(QPainter* painter); void render(QPainter* painter, ref const(QRect) clipRect); private: explicit QWebElement(WebCore::Element*); explicit QWebElement(WebCore::Node*); static QWebElement enclosingElement(WebCore::Node*); friend class DumpRenderTreeSupportQt; friend class QWebFrameAdapter; friend class QWebElementCollection; friend class QWebHitTestResult; friend class QWebHitTestResultPrivate; friend class QWebPage; friend class QWebPagePrivate; friend class QtWebElementRuntime; QWebElementPrivate* d; WebCore::Element* m_element; }; class QWebElementCollectionPrivate; class QWEBKIT_EXPORT QWebElementCollection { public: QWebElementCollection(); QWebElementCollection(ref const(QWebElement) contextElement, ref const(QString) query); QWebElementCollection(ref const(QWebElementCollection) ); QWebElementCollection &operator=(ref const(QWebElementCollection) ); ~QWebElementCollection(); QWebElementCollection operator+(ref const(QWebElementCollection) other) const; /+inline+/ QWebElementCollection &operator+=(ref const(QWebElementCollection) other) { append(other); return *this; } void append(ref const(QWebElementCollection) collection); int count() const; QWebElement at(int i) const; /+inline+/ QWebElement operator[](int i) const { return at(i); } /+inline+/ QWebElement first() const { return at(0); } /+inline+/ QWebElement last() const { return at(count() - 1); } QList<QWebElement> toList() const; class const_iterator { public: /+inline+/ const_iterator(const(QWebElementCollection)* collection_, int index) : i(index), collection(collection_) {} /+inline+/ const_iterator(ref const(const_iterator) o) : i(o.i), collection(o.collection) {} /+inline+/ const QWebElement operator*() const { return collection->at(i); } /+inline+/ bool operator==(ref const(const_iterator) o) const { return i == o.i && collection == o.collection; } /+inline+/ bool operator!=(ref const(const_iterator) o) const { return i != o.i || collection != o.collection; } /+inline+/ bool operator<(ref const(const_iterator) o) const { return i < o.i; } /+inline+/ bool operator<=(ref const(const_iterator) o) const { return i <= o.i; } /+inline+/ bool operator>(ref const(const_iterator) o) const { return i > o.i; } /+inline+/ bool operator>=(ref const(const_iterator) o) const { return i >= o.i; } /+inline+/ const_iterator& operator++() { ++i; return *this; } /+inline+/ const_iterator operator++(int) { const_iterator n(collection, i); ++i; return n; } /+inline+/ const_iterator& operator--() { i--; return *this; } /+inline+/ const_iterator operator--(int) { const_iterator n(collection, i); i--; return n; } /+inline+/ const_iterator& operator+=(int j) { i += j; return *this; } /+inline+/ const_iterator& operator-=(int j) { i -= j; return *this; } /+inline+/ const_iterator operator+(int j) const { return const_iterator(collection, i + j); } /+inline+/ const_iterator operator-(int j) const { return const_iterator(collection, i - j); } /+inline+/ int operator-(const_iterator j) const { return i - j.i; } private: int i; const(QWebElementCollection)* const collection; }; friend class const_iterator; /+inline+/ const_iterator begin() const { return constBegin(); } /+inline+/ const_iterator end() const { return constEnd(); } /+inline+/ const_iterator constBegin() const { return const_iterator(this, 0); } /+inline+/ const_iterator constEnd() const { return const_iterator(this, count()); }; class iterator { public: /+inline+/ iterator(const(QWebElementCollection)* collection_, int index) : i(index), collection(collection_) {} /+inline+/ iterator(ref const(iterator) o) : i(o.i), collection(o.collection) {} /+inline+/ QWebElement operator*() const { return collection->at(i); } /+inline+/ bool operator==(ref const(iterator) o) const { return i == o.i && collection == o.collection; } /+inline+/ bool operator!=(ref const(iterator) o) const { return i != o.i || collection != o.collection; } /+inline+/ bool operator<(ref const(iterator) o) const { return i < o.i; } /+inline+/ bool operator<=(ref const(iterator) o) const { return i <= o.i; } /+inline+/ bool operator>(ref const(iterator) o) const { return i > o.i; } /+inline+/ bool operator>=(ref const(iterator) o) const { return i >= o.i; } /+inline+/ iterator& operator++() { ++i; return *this; } /+inline+/ iterator operator++(int) { iterator n(collection, i); ++i; return n; } /+inline+/ iterator& operator--() { i--; return *this; } /+inline+/ iterator operator--(int) { iterator n(collection, i); i--; return n; } /+inline+/ iterator& operator+=(int j) { i += j; return *this; } /+inline+/ iterator& operator-=(int j) { i -= j; return *this; } /+inline+/ iterator operator+(int j) const { return iterator(collection, i + j); } /+inline+/ iterator operator-(int j) const { return iterator(collection, i - j); } /+inline+/ int operator-(iterator j) const { return i - j.i; } private: int i; const(QWebElementCollection)* const collection; }; friend class iterator; /+inline+/ iterator begin() { return iterator(this, 0); } /+inline+/ iterator end() { return iterator(this, count()); } private: QExplicitlySharedDataPointer<QWebElementCollectionPrivate> d; }; Q_DECLARE_METATYPE(QWebElement) #endif // QWEBELEMENT_H
D
/++ 文字列操作についてまとめます。 TODO: 置換(replace), 削除(remove), 分割(split) +/ module string_example; /++ 文字列の連結 事前に長さの分からない文字列を構築する場合、`std.array` の `appender` を使います。 `appender` : https://dlang.org/phobos/std_array.html#appender +/ unittest { assert("ABC" ~ "DEF" == "ABCDEF"); // 多くの文字を連結するときはappenderを使います import std.array : appender; auto buffer = appender!string; buffer.put("https://"); buffer.put("github.com"); buffer.put("/dlang"); assert(buffer.data == "https://github.com/dlang"); } /++ 書式化文字列 `std.format` の `format` を使います。 https://dlang.org/phobos/std_format.html#.format +/ unittest { import std.format : format; int n = 10; float f = 1.5; string url = "https://github.com"; auto text = format!"%d, %f, %s"(n, f, url); assert(text == "10, 1.500000, https://github.com", text); } /++ 完全一致、辞書順での比較 +/ unittest { auto text = "ABC"; assert(text == "ABC"); assert(text < "abc"); } /++ 大文字小文字を無視して比較 `std.uni` の `icmp` を使います `icmp` : https://dlang.org/phobos/std_uni.html#icmp +/ unittest { import std.uni; auto text = "ABC"; assert(icmp(text, "abc") == 0); assert(icmp(text, "ab") == 1); assert(icmp(text, "abcd") == -1); // 使い方、戻り値のイメージ // "ABC" > "ab" // "ABC" - "ab" > 0 assert(icmp(text, "abc") == 0); assert(icmp(text, "ab") > 0); assert(icmp(text, "abcd") < 0); } /++ 「で始まる」「で終わる」の例 `std.algorithm` の `startsWith`, `endsWith` を使います。 `startsWith` : $(LINK https://dlang.org/phobos/std_algorithm_searching.html#.startsWith)$(BR) `endsWith` : $(LINK https://dlang.org/phobos/std_algorithm_searching.html#.endsWith) +/ unittest { import std.algorithm : startsWith, endsWith; auto text = "std.algorithm"; // ~で始まる assert(startsWith(text, "std.")); assert(text.startsWith("std.")); // ~で終わる assert(endsWith(text, ".algorithm")); assert(text.endsWith(".algorithm")); } /++ 文字列が出現する位置を検索します。 `std.string` の `indexOf` を使用します。 `indexOf` : https://dlang.org/phobos/std_string.html#.indexOf +/ unittest { import std.string : indexOf; auto text = "std.algorithm.searching"; assert(indexOf(text, "search") == 14); assert(text.indexOf("search") == 14); // 大文字小文字を無視することもできます // std.typeconsからYesやNoをimportして使います import std.typecons : Yes, No; import std.string : CaseSensitive; auto url = "https://github.com/dlang/dmd"; assert(url.indexOf("GITHUB", No.CaseSensitive)); }
D
const int Value_TrollTooth = 300; instance ItAt_TrollTooth(C_Item) { name = "Troll tusk"; mainflag = ITEM_KAT_NONE; flags = ITEM_MULTI; value = Value_TrollTooth; visual = "ItAt_TrollTooth.3DS"; material = MAT_LEATHER; description = name; text[0] = ""; text[1] = ""; text[2] = ""; text[3] = ""; text[5] = NAME_Value; count[5] = value; inv_zbias = INVCAM_ENTF_RING_STANDARD; };
D
/Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Vapor.build/Response/ApplicationResponder.swift.o : /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Utilities/FileIO.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Content/FormDataCoder+HTTP.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Sessions/SessionData.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Utilities/Thread.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Content/URLEncoded.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Deprecated.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Commands/ServeCommand.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Commands/RoutesCommand.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Commands/BootCommand.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Routing/Router+Method.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Sessions/SessionCache.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Response/ResponseCodable.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Request/RequestCodable.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Routing/Router+Middleware.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Middleware/Middleware.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Middleware/CORSMiddleware.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Middleware/FileMiddleware.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Middleware/DateMiddleware.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Middleware/ErrorMiddleware.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Sessions/SessionsMiddleware.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Routing/Router+LazyMiddleware.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Response/Response.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Utilities/AnyResponse.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Middleware/MiddlewareConfig.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Server/NIOServerConfig.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Sessions/SessionsConfig.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Content/ContentConfig.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Request/HTTPMethod+String.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Routing/Router+Path.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Content/JSONCoder+Custom.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Sessions/Request+Session.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Sessions/Session.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Application.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Routing/RouteCollection.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Routing/Router+Function.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Services/VaporProvider.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Response/Responder.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Response/BasicResponder.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Response/ApplicationResponder.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/WebSocket/WebSocketResponder.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Content/PlaintextEncoder.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Content/HTTPMessageContainer.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Routing/ParametersContainer.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Content/ContentContainer.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Content/QueryContainer.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Routing/Router.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Routing/EngineRouter.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Server/Server.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Server/NIOServer.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Server/RunningServer.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/WebSocket/WebSocketServer.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/WebSocket/NIOWebSocketServer.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Error/Error.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Logging/Logger+LogError.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Error/AbortError.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Sessions/Sessions.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Sessions/KeyedCacheSessions.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Sessions/MemorySessions.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Content/ContentCoders.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Utilities/Exports.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Response/HTTPStatus.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Response/Redirect.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Content/SingleValueGet.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Services/Config+Default.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Commands/CommandConfig+Default.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Services/Services+Default.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Client/Client.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Client/FoundationClient.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/WebSocket/WebSocketClient.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/WebSocket/NIOWebSocketClient.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Routing/Router+Content.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Content/Content.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Error/Abort.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Request/Request.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/View/Vapor+View.swift /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/XPC.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/ObjectiveC.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/Dispatch.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/Darwin.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/Foundation.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/CoreFoundation.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/CoreGraphics.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/Swift.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/IOKit.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/SwiftOnoneSupport.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Combine.framework/Modules/Combine.swiftmodule/x86_64-apple-macos.swiftinterface /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/NIOHTTP1.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/NIOOpenSSL.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/NIO.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/HTTP.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/NIOTLS.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Async.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Command.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Service.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Console.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Core.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Logging.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Debugging.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Routing.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/COperatingSystem.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Random.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/URLEncodedForm.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Validation.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Crypto.swiftmodule /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/Swift.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/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Bits.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/NIOFoundationCompat.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/WebSocket.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/NIOWebSocket.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/DatabaseKit.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/TemplateKit.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Multipart.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOSHA1/include/CNIOSHA1.h /usr/local/Cellar/libressl/3.0.2/include/openssl/asn1.h /usr/local/Cellar/libressl/3.0.2/include/openssl/tls1.h /usr/local/Cellar/libressl/3.0.2/include/openssl/dtls1.h /usr/local/Cellar/libressl/3.0.2/include/openssl/pkcs12.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ssl2.h /usr/local/Cellar/libressl/3.0.2/include/openssl/pem2.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ssl23.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ssl3.h /usr/local/Cellar/libressl/3.0.2/include/openssl/x509v3.h /usr/local/Cellar/libressl/3.0.2/include/openssl/md5.h /usr/local/Cellar/libressl/3.0.2/include/openssl/pkcs7.h /usr/local/Cellar/libressl/3.0.2/include/openssl/x509.h /usr/local/Cellar/libressl/3.0.2/include/openssl/sha.h /usr/local/Cellar/libressl/3.0.2/include/openssl/dsa.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ecdsa.h /usr/local/Cellar/libressl/3.0.2/include/openssl/rsa.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOZlib/include/CNIOZlib.h /usr/local/Cellar/libressl/3.0.2/include/openssl/obj_mac.h /usr/local/Cellar/libressl/3.0.2/include/openssl/hmac.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ec.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/cpp_magic.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOLinux/include/ifaddrs-android.h /usr/local/Cellar/libressl/3.0.2/include/openssl/rand.h /usr/local/Cellar/libressl/3.0.2/include/openssl/conf.h /usr/local/Cellar/libressl/3.0.2/include/openssl/opensslconf.h /usr/local/Cellar/libressl/3.0.2/include/openssl/dh.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ecdh.h /usr/local/Cellar/libressl/3.0.2/include/openssl/lhash.h /usr/local/Cellar/libressl/3.0.2/include/openssl/stack.h /usr/local/Cellar/libressl/3.0.2/include/openssl/safestack.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ssl.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio-ssl/Sources/CNIOOpenSSL/include/c_nio_openssl.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/crypto/Sources/CCryptoOpenSSL/include/c_crypto_openssl.h /usr/local/Cellar/libressl/3.0.2/include/openssl/pem.h /usr/local/Cellar/libressl/3.0.2/include/openssl/bn.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIODarwin/include/CNIODarwin.h /usr/local/Cellar/libressl/3.0.2/include/openssl/bio.h /usr/local/Cellar/libressl/3.0.2/include/openssl/crypto.h /usr/local/Cellar/libressl/3.0.2/include/openssl/srtp.h /usr/local/Cellar/libressl/3.0.2/include/openssl/evp.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ossl_typ.h /usr/local/Cellar/libressl/3.0.2/include/openssl/buffer.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOHTTPParser/include/CNIOHTTPParser.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOHTTPParser/include/c_nio_http_parser.h /usr/local/Cellar/libressl/3.0.2/include/openssl/err.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /usr/local/Cellar/libressl/3.0.2/include/openssl/opensslfeatures.h /usr/local/Cellar/libressl/3.0.2/include/openssl/objects.h /usr/local/Cellar/libressl/3.0.2/include/openssl/opensslv.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.h /usr/local/Cellar/libressl/3.0.2/include/openssl/x509_vfy.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOSHA1.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOOpenSSL.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CCryptoOpenSSL.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOZlib.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIODarwin.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOHTTPParser.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOAtomics.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOLinux.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/crypto/Sources/CBase32/include/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/crypto/Sources/CBcrypt/include/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio-zlib-support/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio-ssl-support/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/xpc/XPC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.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/MacOSX10.15.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Vapor.build/Response/ApplicationResponder~partial.swiftmodule : /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Utilities/FileIO.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Content/FormDataCoder+HTTP.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Sessions/SessionData.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Utilities/Thread.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Content/URLEncoded.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Deprecated.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Commands/ServeCommand.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Commands/RoutesCommand.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Commands/BootCommand.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Routing/Router+Method.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Sessions/SessionCache.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Response/ResponseCodable.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Request/RequestCodable.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Routing/Router+Middleware.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Middleware/Middleware.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Middleware/CORSMiddleware.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Middleware/FileMiddleware.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Middleware/DateMiddleware.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Middleware/ErrorMiddleware.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Sessions/SessionsMiddleware.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Routing/Router+LazyMiddleware.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Response/Response.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Utilities/AnyResponse.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Middleware/MiddlewareConfig.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Server/NIOServerConfig.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Sessions/SessionsConfig.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Content/ContentConfig.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Request/HTTPMethod+String.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Routing/Router+Path.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Content/JSONCoder+Custom.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Sessions/Request+Session.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Sessions/Session.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Application.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Routing/RouteCollection.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Routing/Router+Function.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Services/VaporProvider.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Response/Responder.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Response/BasicResponder.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Response/ApplicationResponder.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/WebSocket/WebSocketResponder.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Content/PlaintextEncoder.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Content/HTTPMessageContainer.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Routing/ParametersContainer.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Content/ContentContainer.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Content/QueryContainer.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Routing/Router.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Routing/EngineRouter.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Server/Server.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Server/NIOServer.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Server/RunningServer.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/WebSocket/WebSocketServer.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/WebSocket/NIOWebSocketServer.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Error/Error.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Logging/Logger+LogError.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Error/AbortError.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Sessions/Sessions.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Sessions/KeyedCacheSessions.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Sessions/MemorySessions.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Content/ContentCoders.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Utilities/Exports.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Response/HTTPStatus.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Response/Redirect.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Content/SingleValueGet.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Services/Config+Default.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Commands/CommandConfig+Default.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Services/Services+Default.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Client/Client.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Client/FoundationClient.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/WebSocket/WebSocketClient.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/WebSocket/NIOWebSocketClient.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Routing/Router+Content.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Content/Content.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Error/Abort.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Request/Request.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/View/Vapor+View.swift /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/XPC.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/ObjectiveC.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/Dispatch.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/Darwin.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/Foundation.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/CoreFoundation.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/CoreGraphics.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/Swift.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/IOKit.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/SwiftOnoneSupport.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Combine.framework/Modules/Combine.swiftmodule/x86_64-apple-macos.swiftinterface /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/NIOHTTP1.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/NIOOpenSSL.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/NIO.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/HTTP.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/NIOTLS.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Async.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Command.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Service.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Console.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Core.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Logging.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Debugging.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Routing.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/COperatingSystem.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Random.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/URLEncodedForm.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Validation.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Crypto.swiftmodule /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/Swift.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/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Bits.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/NIOFoundationCompat.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/WebSocket.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/NIOWebSocket.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/DatabaseKit.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/TemplateKit.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Multipart.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOSHA1/include/CNIOSHA1.h /usr/local/Cellar/libressl/3.0.2/include/openssl/asn1.h /usr/local/Cellar/libressl/3.0.2/include/openssl/tls1.h /usr/local/Cellar/libressl/3.0.2/include/openssl/dtls1.h /usr/local/Cellar/libressl/3.0.2/include/openssl/pkcs12.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ssl2.h /usr/local/Cellar/libressl/3.0.2/include/openssl/pem2.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ssl23.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ssl3.h /usr/local/Cellar/libressl/3.0.2/include/openssl/x509v3.h /usr/local/Cellar/libressl/3.0.2/include/openssl/md5.h /usr/local/Cellar/libressl/3.0.2/include/openssl/pkcs7.h /usr/local/Cellar/libressl/3.0.2/include/openssl/x509.h /usr/local/Cellar/libressl/3.0.2/include/openssl/sha.h /usr/local/Cellar/libressl/3.0.2/include/openssl/dsa.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ecdsa.h /usr/local/Cellar/libressl/3.0.2/include/openssl/rsa.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOZlib/include/CNIOZlib.h /usr/local/Cellar/libressl/3.0.2/include/openssl/obj_mac.h /usr/local/Cellar/libressl/3.0.2/include/openssl/hmac.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ec.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/cpp_magic.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOLinux/include/ifaddrs-android.h /usr/local/Cellar/libressl/3.0.2/include/openssl/rand.h /usr/local/Cellar/libressl/3.0.2/include/openssl/conf.h /usr/local/Cellar/libressl/3.0.2/include/openssl/opensslconf.h /usr/local/Cellar/libressl/3.0.2/include/openssl/dh.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ecdh.h /usr/local/Cellar/libressl/3.0.2/include/openssl/lhash.h /usr/local/Cellar/libressl/3.0.2/include/openssl/stack.h /usr/local/Cellar/libressl/3.0.2/include/openssl/safestack.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ssl.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio-ssl/Sources/CNIOOpenSSL/include/c_nio_openssl.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/crypto/Sources/CCryptoOpenSSL/include/c_crypto_openssl.h /usr/local/Cellar/libressl/3.0.2/include/openssl/pem.h /usr/local/Cellar/libressl/3.0.2/include/openssl/bn.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIODarwin/include/CNIODarwin.h /usr/local/Cellar/libressl/3.0.2/include/openssl/bio.h /usr/local/Cellar/libressl/3.0.2/include/openssl/crypto.h /usr/local/Cellar/libressl/3.0.2/include/openssl/srtp.h /usr/local/Cellar/libressl/3.0.2/include/openssl/evp.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ossl_typ.h /usr/local/Cellar/libressl/3.0.2/include/openssl/buffer.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOHTTPParser/include/CNIOHTTPParser.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOHTTPParser/include/c_nio_http_parser.h /usr/local/Cellar/libressl/3.0.2/include/openssl/err.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /usr/local/Cellar/libressl/3.0.2/include/openssl/opensslfeatures.h /usr/local/Cellar/libressl/3.0.2/include/openssl/objects.h /usr/local/Cellar/libressl/3.0.2/include/openssl/opensslv.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.h /usr/local/Cellar/libressl/3.0.2/include/openssl/x509_vfy.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOSHA1.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOOpenSSL.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CCryptoOpenSSL.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOZlib.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIODarwin.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOHTTPParser.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOAtomics.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOLinux.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/crypto/Sources/CBase32/include/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/crypto/Sources/CBcrypt/include/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio-zlib-support/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio-ssl-support/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/xpc/XPC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.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/MacOSX10.15.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Vapor.build/Response/ApplicationResponder~partial.swiftdoc : /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Utilities/FileIO.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Content/FormDataCoder+HTTP.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Sessions/SessionData.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Utilities/Thread.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Content/URLEncoded.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Deprecated.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Commands/ServeCommand.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Commands/RoutesCommand.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Commands/BootCommand.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Routing/Router+Method.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Sessions/SessionCache.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Response/ResponseCodable.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Request/RequestCodable.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Routing/Router+Middleware.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Middleware/Middleware.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Middleware/CORSMiddleware.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Middleware/FileMiddleware.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Middleware/DateMiddleware.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Middleware/ErrorMiddleware.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Sessions/SessionsMiddleware.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Routing/Router+LazyMiddleware.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Response/Response.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Utilities/AnyResponse.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Middleware/MiddlewareConfig.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Server/NIOServerConfig.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Sessions/SessionsConfig.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Content/ContentConfig.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Request/HTTPMethod+String.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Routing/Router+Path.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Content/JSONCoder+Custom.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Sessions/Request+Session.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Sessions/Session.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Application.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Routing/RouteCollection.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Routing/Router+Function.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Services/VaporProvider.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Response/Responder.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Response/BasicResponder.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Response/ApplicationResponder.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/WebSocket/WebSocketResponder.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Content/PlaintextEncoder.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Content/HTTPMessageContainer.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Routing/ParametersContainer.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Content/ContentContainer.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Content/QueryContainer.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Routing/Router.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Routing/EngineRouter.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Server/Server.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Server/NIOServer.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Server/RunningServer.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/WebSocket/WebSocketServer.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/WebSocket/NIOWebSocketServer.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Error/Error.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Logging/Logger+LogError.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Error/AbortError.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Sessions/Sessions.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Sessions/KeyedCacheSessions.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Sessions/MemorySessions.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Content/ContentCoders.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Utilities/Exports.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Response/HTTPStatus.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Response/Redirect.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Content/SingleValueGet.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Services/Config+Default.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Commands/CommandConfig+Default.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Services/Services+Default.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Client/Client.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Client/FoundationClient.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/WebSocket/WebSocketClient.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/WebSocket/NIOWebSocketClient.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Routing/Router+Content.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Content/Content.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Error/Abort.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/Request/Request.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/vapor/Sources/Vapor/View/Vapor+View.swift /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/XPC.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/ObjectiveC.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/Dispatch.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/Darwin.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/Foundation.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/CoreFoundation.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/CoreGraphics.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/Swift.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/IOKit.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/SwiftOnoneSupport.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Combine.framework/Modules/Combine.swiftmodule/x86_64-apple-macos.swiftinterface /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/NIOHTTP1.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/NIOOpenSSL.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/NIO.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/HTTP.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/NIOTLS.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Async.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Command.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Service.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Console.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Core.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Logging.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Debugging.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Routing.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/COperatingSystem.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Random.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/URLEncodedForm.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Validation.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Crypto.swiftmodule /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/Swift.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/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Bits.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/NIOFoundationCompat.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/WebSocket.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/NIOWebSocket.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/DatabaseKit.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/TemplateKit.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Multipart.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOSHA1/include/CNIOSHA1.h /usr/local/Cellar/libressl/3.0.2/include/openssl/asn1.h /usr/local/Cellar/libressl/3.0.2/include/openssl/tls1.h /usr/local/Cellar/libressl/3.0.2/include/openssl/dtls1.h /usr/local/Cellar/libressl/3.0.2/include/openssl/pkcs12.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ssl2.h /usr/local/Cellar/libressl/3.0.2/include/openssl/pem2.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ssl23.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ssl3.h /usr/local/Cellar/libressl/3.0.2/include/openssl/x509v3.h /usr/local/Cellar/libressl/3.0.2/include/openssl/md5.h /usr/local/Cellar/libressl/3.0.2/include/openssl/pkcs7.h /usr/local/Cellar/libressl/3.0.2/include/openssl/x509.h /usr/local/Cellar/libressl/3.0.2/include/openssl/sha.h /usr/local/Cellar/libressl/3.0.2/include/openssl/dsa.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ecdsa.h /usr/local/Cellar/libressl/3.0.2/include/openssl/rsa.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOZlib/include/CNIOZlib.h /usr/local/Cellar/libressl/3.0.2/include/openssl/obj_mac.h /usr/local/Cellar/libressl/3.0.2/include/openssl/hmac.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ec.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/cpp_magic.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOLinux/include/ifaddrs-android.h /usr/local/Cellar/libressl/3.0.2/include/openssl/rand.h /usr/local/Cellar/libressl/3.0.2/include/openssl/conf.h /usr/local/Cellar/libressl/3.0.2/include/openssl/opensslconf.h /usr/local/Cellar/libressl/3.0.2/include/openssl/dh.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ecdh.h /usr/local/Cellar/libressl/3.0.2/include/openssl/lhash.h /usr/local/Cellar/libressl/3.0.2/include/openssl/stack.h /usr/local/Cellar/libressl/3.0.2/include/openssl/safestack.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ssl.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio-ssl/Sources/CNIOOpenSSL/include/c_nio_openssl.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/crypto/Sources/CCryptoOpenSSL/include/c_crypto_openssl.h /usr/local/Cellar/libressl/3.0.2/include/openssl/pem.h /usr/local/Cellar/libressl/3.0.2/include/openssl/bn.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIODarwin/include/CNIODarwin.h /usr/local/Cellar/libressl/3.0.2/include/openssl/bio.h /usr/local/Cellar/libressl/3.0.2/include/openssl/crypto.h /usr/local/Cellar/libressl/3.0.2/include/openssl/srtp.h /usr/local/Cellar/libressl/3.0.2/include/openssl/evp.h /usr/local/Cellar/libressl/3.0.2/include/openssl/ossl_typ.h /usr/local/Cellar/libressl/3.0.2/include/openssl/buffer.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOHTTPParser/include/CNIOHTTPParser.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOHTTPParser/include/c_nio_http_parser.h /usr/local/Cellar/libressl/3.0.2/include/openssl/err.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /usr/local/Cellar/libressl/3.0.2/include/openssl/opensslfeatures.h /usr/local/Cellar/libressl/3.0.2/include/openssl/objects.h /usr/local/Cellar/libressl/3.0.2/include/openssl/opensslv.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.h /usr/local/Cellar/libressl/3.0.2/include/openssl/x509_vfy.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOSHA1.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOOpenSSL.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CCryptoOpenSSL.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOZlib.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIODarwin.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOHTTPParser.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOAtomics.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOLinux.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/crypto/Sources/CBase32/include/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/crypto/Sources/CBcrypt/include/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio-zlib-support/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio-ssl-support/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/xpc/XPC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.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/MacOSX10.15.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
D
a person who is stranded (as on an island a dark purplish-red to dark brownish-red color an exploding firework used as a warning signal leave stranded or isolated with little hope of rescue leave stranded on a desert island without resources of dark brownish to purplish red
D
import accessors; void main() { } // Issue #11: https://github.com/funkwerk/accessors/issues/11 @nogc nothrow pure @safe unittest { import PersonId : AnotherPersonId = PersonId; class PersonId { } class Foo { @ConstRead private AnotherPersonId anotherPersonId_; @Read private AnotherPersonId[] personIdArray_; mixin(GenerateFieldAccessors); } }
D
import std.stdio, std.algorithm, std.conv, std.array, std.string, std.math, std.typecons, std.numeric, std.container, std.range; void get(Args...)(ref Args args) { import std.traits, std.meta, std.typecons; static if (Args.length == 1) { alias Arg = Args[0]; static if (isArray!Arg) { static if (isSomeChar!(ElementType!Arg)) { args[0] = readln.chomp.to!Arg; } else { args[0] = readln.split.to!Arg; } } else static if (isTuple!Arg) { auto input = readln.split; static foreach (i; 0..Fields!Arg.length) { args[0][i] = input[i].to!(Fields!Arg[i]); } } else { args[0] = readln.chomp.to!Arg; } } else { auto input = readln.split; assert(input.length == Args.length); static foreach (i; 0..Args.length) { args[i] = input[i].to!(Args[i]); } } } void get_lines(Args...)(size_t N, ref Args args) { import std.traits, std.range; static foreach (i; 0..Args.length) { static assert(isArray!(Args[i])); args[i].length = N; } foreach (i; 0..N) { static if (Args.length == 1) { get(args[0][i]); } else { auto input = readln.split; static foreach (j; 0..Args.length) { args[j][i] = input[j].to!(ElementType!(Args[j])); } } } } void main() { int N, Q; get(N, Q); long[] hs; get(hs); int[long] ds; foreach (i; 1..N) { if (i % 2 == 1) { ++ds[hs[i-1] - hs[i]]; } else { ++ds[hs[i] - hs[i-1]]; } } long b; while (Q--) { string q; get(q); if (q[0] == '1') { auto v = q.split[1].to!long; b -= v; } else if (q[0] == '2') { auto v = q.split[1].to!long; b += v; } else { auto uv = q.split[1..$]; auto u = uv[0].to!int - 1; auto v = uv[1].to!long; if (u != 0) { if (u % 2 == 0) { --ds[hs[u] - hs[u-1]]; } else { --ds[hs[u-1] - hs[u]]; } } if (u != N-1) { if (u % 2 == 0) { --ds[hs[u] - hs[u+1]]; } else { --ds[hs[u+1] - hs[u]]; } } hs[u] += v; if (u != 0) { if (u % 2 == 0) { ++ds[hs[u] - hs[u-1]]; } else { ++ds[hs[u-1] - hs[u]]; } } if (u != N-1) { if (u % 2 == 0) { ++ds[hs[u] - hs[u+1]]; } else { ++ds[hs[u+1] - hs[u]]; } } } writeln(b in ds ? ds[b] : 0); } }
D
/Users/Matt/iOS/RoadInfo/DerivedData/RoadInfo/Build/Intermediates/RoadInfo.build/Debug-iphonesimulator/RoadInfo.build/Objects-normal/x86_64/URLConnection.o : /Users/Matt/iOS/RoadInfo/RoadInfo/ChristchurchEvent.swift /Users/Matt/iOS/RoadInfo/RoadInfo/URLConnection.swift /Users/Matt/iOS/RoadInfo/RoadInfo/EventViewController.swift /Users/Matt/iOS/RoadInfo/RoadInfo/XMLParser.swift /Users/Matt/iOS/RoadInfo/RoadInfo/MapController.swift /Users/Matt/iOS/RoadInfo/RoadInfo/Complex.swift /Users/Matt/iOS/RoadInfo/RoadInfo/NZMGConverter.swift /Users/Matt/iOS/RoadInfo/RoadInfo/Location.swift /Users/Matt/iOS/RoadInfo/RoadInfo/ChristchurchXML.swift /Users/Matt/iOS/RoadInfo/RoadInfo/RoadEvent.swift /Users/Matt/iOS/RoadInfo/RoadInfo/Annotation.swift /Users/Matt/iOS/RoadInfo/RoadInfo/AppDelegate.swift /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/Foundation.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/Dispatch.swiftmodule /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/CoreGraphics.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/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreLocation.swiftmodule /Users/Matt/iOS/RoadInfo/DerivedData/RoadInfo/Build/Intermediates/RoadInfo.build/Debug-iphonesimulator/RoadInfo.build/Objects-normal/x86_64/URLConnection~partial.swiftmodule : /Users/Matt/iOS/RoadInfo/RoadInfo/ChristchurchEvent.swift /Users/Matt/iOS/RoadInfo/RoadInfo/URLConnection.swift /Users/Matt/iOS/RoadInfo/RoadInfo/EventViewController.swift /Users/Matt/iOS/RoadInfo/RoadInfo/XMLParser.swift /Users/Matt/iOS/RoadInfo/RoadInfo/MapController.swift /Users/Matt/iOS/RoadInfo/RoadInfo/Complex.swift /Users/Matt/iOS/RoadInfo/RoadInfo/NZMGConverter.swift /Users/Matt/iOS/RoadInfo/RoadInfo/Location.swift /Users/Matt/iOS/RoadInfo/RoadInfo/ChristchurchXML.swift /Users/Matt/iOS/RoadInfo/RoadInfo/RoadEvent.swift /Users/Matt/iOS/RoadInfo/RoadInfo/Annotation.swift /Users/Matt/iOS/RoadInfo/RoadInfo/AppDelegate.swift /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/Foundation.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/Dispatch.swiftmodule /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/CoreGraphics.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/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreLocation.swiftmodule /Users/Matt/iOS/RoadInfo/DerivedData/RoadInfo/Build/Intermediates/RoadInfo.build/Debug-iphonesimulator/RoadInfo.build/Objects-normal/x86_64/URLConnection~partial.swiftdoc : /Users/Matt/iOS/RoadInfo/RoadInfo/ChristchurchEvent.swift /Users/Matt/iOS/RoadInfo/RoadInfo/URLConnection.swift /Users/Matt/iOS/RoadInfo/RoadInfo/EventViewController.swift /Users/Matt/iOS/RoadInfo/RoadInfo/XMLParser.swift /Users/Matt/iOS/RoadInfo/RoadInfo/MapController.swift /Users/Matt/iOS/RoadInfo/RoadInfo/Complex.swift /Users/Matt/iOS/RoadInfo/RoadInfo/NZMGConverter.swift /Users/Matt/iOS/RoadInfo/RoadInfo/Location.swift /Users/Matt/iOS/RoadInfo/RoadInfo/ChristchurchXML.swift /Users/Matt/iOS/RoadInfo/RoadInfo/RoadEvent.swift /Users/Matt/iOS/RoadInfo/RoadInfo/Annotation.swift /Users/Matt/iOS/RoadInfo/RoadInfo/AppDelegate.swift /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/Foundation.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/Dispatch.swiftmodule /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/CoreGraphics.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/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreLocation.swiftmodule
D
instance PAL_262_Wache(Npc_Default) { name[0] = NAME_Wache; guild = GIL_PAL; id = 262; voice = 10; flags = 0; npcType = NPCTYPE_OCMAIN; B_SetAttributesToChapter(self,4); fight_tactic = FAI_HUMAN_STRONG; EquipItem(self,ItMw_1h_Pal_Sword); EquipItem(self,ItRw_Mil_Crossbow); B_CreateAmbientInv(self); B_SetNpcVisual(self,MALE,"Hum_Head_Fighter",Face_N_NormalBart17,BodyTex_N,ItAr_PAL_M); Mdl_SetModelFatness(self,0); Mdl_ApplyOverlayMds(self,"Humans_Militia.mds"); B_GiveNpcTalents(self); B_SetFightSkills(self,65); daily_routine = Rtn_Start_262; }; func void Rtn_Start_262() { TA_Stand_ArmsCrossed(8,0,23,0,"OC_EBR_GUARDPASSAGE_01"); TA_Stand_ArmsCrossed(23,0,8,0,"OC_EBR_GUARDPASSAGE_01"); };
D
/home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Core.build/DataFile.swift.o : /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/RFC1123.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/String+Polymorphic.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/Sequence.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/Collection+Safe.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/Cache.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/Extendable.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/EmptyInitializable.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/DataFile.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/String+CaseInsensitiveCompare.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/Semaphore.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/String.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/Dispatch.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/Lock.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/Portal.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/FileProtocol.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/StaticDataBuffer.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/DispatchTime+Utilities.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/Bits.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/Exports.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/Result.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/Int+Hex.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/Array.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/WorkingDirectory.swift /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/libc.swiftmodule /usr/lib/swift/linux/x86_64/Glibc.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Debugging.swiftmodule /usr/lib/swift/linux/x86_64/Dispatch.swiftmodule /usr/lib/swift/linux/x86_64/Foundation.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Bits.swiftmodule /usr/lib/swift/linux/x86_64/Swift.swiftmodule /usr/lib/swift/linux/x86_64/SwiftOnoneSupport.swiftmodule /usr/lib/swift/linux/x86_64/glibc.modulemap /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/CHTTP.build/module.modulemap /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/CSQLite.build/module.modulemap /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Core.build/DataFile~partial.swiftmodule : /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/RFC1123.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/String+Polymorphic.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/Sequence.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/Collection+Safe.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/Cache.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/Extendable.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/EmptyInitializable.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/DataFile.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/String+CaseInsensitiveCompare.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/Semaphore.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/String.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/Dispatch.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/Lock.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/Portal.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/FileProtocol.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/StaticDataBuffer.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/DispatchTime+Utilities.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/Bits.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/Exports.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/Result.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/Int+Hex.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/Array.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/WorkingDirectory.swift /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/libc.swiftmodule /usr/lib/swift/linux/x86_64/Glibc.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Debugging.swiftmodule /usr/lib/swift/linux/x86_64/Dispatch.swiftmodule /usr/lib/swift/linux/x86_64/Foundation.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Bits.swiftmodule /usr/lib/swift/linux/x86_64/Swift.swiftmodule /usr/lib/swift/linux/x86_64/SwiftOnoneSupport.swiftmodule /usr/lib/swift/linux/x86_64/glibc.modulemap /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/CHTTP.build/module.modulemap /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/CSQLite.build/module.modulemap /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Core.build/DataFile~partial.swiftdoc : /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/RFC1123.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/String+Polymorphic.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/Sequence.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/Collection+Safe.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/Cache.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/Extendable.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/EmptyInitializable.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/DataFile.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/String+CaseInsensitiveCompare.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/Semaphore.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/String.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/Dispatch.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/Lock.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/Portal.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/FileProtocol.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/StaticDataBuffer.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/DispatchTime+Utilities.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/Bits.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/Exports.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/Result.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/Int+Hex.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/Array.swift /home/albertfega/Desktop/LaSalleChat/.build/checkouts/core.git-4369016638413795800/Sources/Core/WorkingDirectory.swift /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/libc.swiftmodule /usr/lib/swift/linux/x86_64/Glibc.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Debugging.swiftmodule /usr/lib/swift/linux/x86_64/Dispatch.swiftmodule /usr/lib/swift/linux/x86_64/Foundation.swiftmodule /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/Bits.swiftmodule /usr/lib/swift/linux/x86_64/Swift.swiftmodule /usr/lib/swift/linux/x86_64/SwiftOnoneSupport.swiftmodule /usr/lib/swift/linux/x86_64/glibc.modulemap /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/CHTTP.build/module.modulemap /home/albertfega/Desktop/LaSalleChat/.build/x86_64-unknown-linux/debug/CSQLite.build/module.modulemap
D
module foo.bar; import core.vararg; import std.stdio; pragma (lib, "test"); pragma (msg, "Hello World"); static assert(true, "message"); alias mydbl = double; alias fl = function () in { } do { } ; int testmain(); struct S { int m; int n; } template Foo(T, int V) { void foo(...) { static if (is(Object _ : X!TL, alias X, TL...)) { } auto x = __traits(hasMember, Object, "noMember"); auto y = is(Object : X!TL, alias X, TL...); assert(!x && !y, "message"); S s = {1, 2}; auto a = [1, 2, 3]; auto aa = [1:1, 2:2, 3:3]; int n, m; } int bar(double d, int x) { if (d) { d++; } else d--; asm { naked; } asm { mov EAX,3; } for (;;) { { d = d + 1; } } for (int i = 0; i < 10; i++) { { d = i ? d + 1 : 5; } } char[] s; foreach (char c; s) { d *= 2; if (d) break; else continue; } switch (V) { case 1: { } case 2: { break; } case 3: { goto case 1; } case 4: { goto default; } default: { d /= 8; break; } } enum Label { A, B, C, } void fswitch(Label l); loop: while (x) { x--; if (x) break loop; else continue loop; } do { x++; } while (x < 10); try { try { bar(1, 2); } catch(Object o) { x++; } } finally { x--; } try { try bar(1, 2); catch(Object o) { x++; } } finally x--; Object o; synchronized(o) { x = ~x; } synchronized { x = x < 3; } with (o) { toString(); } } } static this(); static ~this(); nothrow pure @nogc @safe static this(); nothrow pure @nogc @safe static ~this(); nothrow pure @nogc @safe static this(); nothrow pure @nogc @safe static ~this(); nothrow pure @nogc @safe shared static this(); nothrow pure @nogc @safe shared static ~this(); nothrow pure @nogc @safe shared static this(); nothrow pure @nogc @safe shared static ~this(); interface iFoo { } class xFoo : iFoo { } interface iFoo2 { } class xFoo2 : iFoo, iFoo2 { } class Foo3 { this(int a, ...) { } this(int* a) { } } alias myint = int; static notquit = 1; class Test { void a(); void b(); void c(); void d(); void e(); void f(); void g(); void h(); void i(); void j(); void k(); void l(); void m(); void n(); void o(); void p(); void q(); void r(); void s(); void t(); void u(); void v(); void w(); void x(); void y(); void z(); void aa(); void bb(); void cc(); void dd(); void ee(); template A(T) { } alias getHUint = A!uint; alias getHInt = A!int; alias getHFloat = A!float; alias getHUlong = A!ulong; alias getHLong = A!long; alias getHDouble = A!double; alias getHByte = A!byte; alias getHUbyte = A!ubyte; alias getHShort = A!short; alias getHUShort = A!ushort; alias getHReal = A!real; alias void F(); nothrow pure @nogc @safe new(size_t sz); nothrow pure @nogc @safe delete(void* p); } void templ(T)(T val) { pragma (msg, "Invalid destination type."); } static char[] charArray = ['"', '\'']; class Point { auto x = 10; uint y = 20; } template Foo2(bool bar) { void test() { static if (bar) { int i; } else { } static if (!bar) { } else { } } } template Foo4() { void bar() { } } template Foo4x(T...) { } class Baz4 { mixin Foo4!() foo; mixin Foo4x!(int, "str") foox; alias baz = foo.bar; } int test(T)(T t) { if (auto o = cast(Object)t) return 1; return 0; } enum x6 = 1; bool foo6(int a, int b, int c, int d); auto foo7(int x) { return 5; } class D8 { } void func8(); T func9(T)() if (true) { T i; scope(exit) i = 1; scope(success) i = 2; scope(failure) i = 3; return i; } template V10(T) { void func() { for (int i, j = 4; i < 3; i++) { { } } } } int foo11(int function() fn); int bar11(T)() { return foo11(function int() { return 0; } ); } struct S6360 { const pure nothrow @property long weeks1(); const pure nothrow @property long weeks2(); } struct S12 { nothrow this(int n) { } nothrow this(string s) { } } struct T12 { immutable this()(int args) { } immutable this(A...)(A args) { } } import std.stdio : writeln, F = File; void foo6591()() { import std.stdio : writeln, F = File; } version (unittest) { public {} extern (C) {} align {} } template Foo10334(T) if (Bar10334!()) { } template Foo10334(T) if (Bar10334!100) { } template Foo10334(T) if (Bar10334!3.14) { } template Foo10334(T) if (Bar10334!"str") { } template Foo10334(T) if (Bar10334!1.4i) { } template Foo10334(T) if (Bar10334!null) { } template Foo10334(T) if (Bar10334!true) { } template Foo10334(T) if (Bar10334!false) { } template Foo10334(T) if (Bar10334!'A') { } template Foo10334(T) if (Bar10334!int) { } template Foo10334(T) if (Bar10334!string) { } template Foo10334(T) if (Bar10334!wstring) { } template Foo10334(T) if (Bar10334!dstring) { } template Foo10334(T) if (Bar10334!this) { } template Foo10334(T) if (Bar10334!([1, 2, 3])) { } template Foo10334(T) if (Bar10334!(Baz10334!())) { } template Foo10334(T) if (Bar10334!(Baz10334!T)) { } template Foo10334(T) if (Bar10334!(Baz10334!100)) { } template Foo10334(T) if (Bar10334!(.foo)) { } template Foo10334(T) if (Bar10334!(const(int))) { } template Foo10334(T) if (Bar10334!(shared(T))) { } template Test10334(T...) { } mixin Test10334!int a; mixin Test10334!(int, long) b; mixin Test10334!"str" c; auto clamp12266a(T1, T2, T3)(T1 x, T2 min_val, T3 max_val) { return 0; } pure clamp12266b(T1, T2, T3)(T1 x, T2 min_val, T3 max_val) { return 0; } @disable pure clamp12266c(T1, T2, T3)(T1 x, T2 min_val, T3 max_val) { return 0; } alias Dg13832 = ref int delegate(); class TestClass { int aa; int b1; int b2; this(int b1, int b2) { this.b1 = b1; this.b2 = b2; } ref foo() { return aa; } ref return retFunc() { return aa; } @trusted @nogc @disable ~this(); } class FooA { protected void method42(); @safe ~this(); } class Bar : FooA { override void method42(); } @trusted double foo(); struct Foo1(size_t Size = 42 / magic()) { } size_t magic(); class Foo2A { immutable(FooA) Dummy = new immutable(FooA); private immutable pure nothrow @nogc @safe this() { } } struct Foo3A(T) { @disable this(this); @disable this(); } ref @safe int foo(return ref int a); @safe int* foo(return scope int* a); ref @safe int* foo(return ref scope int* a); struct SafeS { @safe { ref return SafeS foo(); return scope SafeS foo2(); ref return scope SafeS foo3(); int* p; } }
D
import std.random; import globals; int isNull(T)(T[] arr) { foreach (i; 0 .. arr.length) { if (arr[i] !is null) return 0; } return 1; } class Cell { Vector2f pos; //Top, left, bottom, right RectangleShape[4] sides; bool[4] shown = [true, true, true, true]; bool visited = false; RectangleShape visitedRect; this(int x, int y) { this.pos.x = x; this.pos.y = y; foreach (i; 0 .. 4) { this.sides[i] = new RectangleShape(); this.sides[i].fillColor(Color(255, 255, 255, 100)); } this.setPositions(); this.visitedRect = new RectangleShape(); this.visitedRect.position = this.pos; this.visitedRect.size(Vector2f(cellHeight, cellHeight)); this.visitedRect.fillColor(Color(255, 0, 0, 150)); } void draw(RenderWindow window) { foreach(i; 0 .. this.sides.length) if (this.shown[i]) window.draw(this.sides[i]); } void highlight(RenderWindow window) { this.visitedRect.position = this.pos; window.draw(this.visitedRect); } void setPositions() { this.sides[0].size(Vector2f(cellHeight, 1)); this.sides[0].position = this.pos; this.sides[1].size(Vector2f(1, cellHeight)); this.sides[1].position = this.pos; this.sides[2].size(Vector2f(cellHeight, 1)); this.sides[2].position = Vector2f(this.pos.x, this.pos.y + cellHeight); this.sides[3].size(Vector2f(1, cellHeight)); this.sides[3].position = Vector2f(this.pos.x + cellHeight, this.pos.y); } Cell checkNeighbors(int width, int height, Cell[][] cells) { auto index = Vector2i(cast(int) this.pos.y / cellHeight, cast(int) this.pos.x / cellHeight); Vector2i[] toCheck = [Vector2i(index.x - 1, index.y), Vector2i(index.x, index.y - 1), Vector2i(index.x + 1, index.y), Vector2i(index.x, index.y + 1)]; Cell[] neighbors = [null, null, null, null]; int i; foreach (pos; toCheck) { if (pos.x >= 0 && pos.y >= 0 && pos.y < cells.length && pos.x < cells[0].length) if (!cells[pos.y][pos.x].visited) neighbors[i] = cells[pos.y][pos.x]; i++; } if (!isNull!Cell(neighbors)) { auto r = uniform(0, neighbors.length); while (neighbors[r] is null) r = uniform(0, neighbors.length); auto next = neighbors[r]; next = this.removeWalls(next, r); return next; } else return null; } Cell removeWalls(Cell next, ulong r) { if (r == 0) { this.shown[0] = false; next.shown[2] = false; } else if (r == 1) { this.shown[1] = false; next.shown[3] = false; } else if (r == 2) { this.shown[2] = false; next.shown[0] = false; } else if (r == 3) { this.shown[3] = false; next.shown[1] = false; } return next; } }
D
/******************************************************************************* * Copyright (c) 2000, 2005 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation * Port to the D programming language: * Frank Benoit <benoit@tionex.de> *******************************************************************************/ module dwtx.jface.text.IInformationControlCreatorExtension; import dwtx.jface.text.IDocumentPartitioningListener; // packageimport import dwtx.jface.text.DefaultTextHover; // packageimport import dwtx.jface.text.AbstractInformationControl; // packageimport import dwtx.jface.text.TextUtilities; // packageimport import dwtx.jface.text.AbstractInformationControlManager; // packageimport import dwtx.jface.text.ITextViewerExtension2; // packageimport import dwtx.jface.text.IDocumentPartitioner; // packageimport import dwtx.jface.text.DefaultIndentLineAutoEditStrategy; // packageimport import dwtx.jface.text.ITextSelection; // packageimport import dwtx.jface.text.Document; // packageimport import dwtx.jface.text.FindReplaceDocumentAdapterContentProposalProvider; // packageimport import dwtx.jface.text.ITextListener; // packageimport import dwtx.jface.text.BadPartitioningException; // packageimport import dwtx.jface.text.ITextViewerExtension5; // packageimport import dwtx.jface.text.IDocumentPartitionerExtension3; // packageimport import dwtx.jface.text.IUndoManager; // packageimport import dwtx.jface.text.ITextHoverExtension2; // packageimport import dwtx.jface.text.IRepairableDocument; // packageimport import dwtx.jface.text.IRewriteTarget; // packageimport import dwtx.jface.text.DefaultPositionUpdater; // packageimport import dwtx.jface.text.RewriteSessionEditProcessor; // packageimport import dwtx.jface.text.TextViewerHoverManager; // packageimport import dwtx.jface.text.DocumentRewriteSession; // packageimport import dwtx.jface.text.TextViewer; // packageimport import dwtx.jface.text.ITextViewerExtension8; // packageimport import dwtx.jface.text.RegExMessages; // packageimport import dwtx.jface.text.IDelayedInputChangeProvider; // packageimport import dwtx.jface.text.ITextOperationTargetExtension; // packageimport import dwtx.jface.text.IWidgetTokenOwner; // packageimport import dwtx.jface.text.IViewportListener; // packageimport import dwtx.jface.text.GapTextStore; // packageimport import dwtx.jface.text.MarkSelection; // packageimport import dwtx.jface.text.IDocumentPartitioningListenerExtension; // packageimport import dwtx.jface.text.IDocumentAdapterExtension; // packageimport import dwtx.jface.text.IInformationControlExtension; // packageimport import dwtx.jface.text.IDocumentPartitioningListenerExtension2; // packageimport import dwtx.jface.text.DefaultDocumentAdapter; // packageimport import dwtx.jface.text.ITextViewerExtension3; // packageimport import dwtx.jface.text.IInformationControlCreator; // packageimport import dwtx.jface.text.TypedRegion; // packageimport import dwtx.jface.text.ISynchronizable; // packageimport import dwtx.jface.text.IMarkRegionTarget; // packageimport import dwtx.jface.text.TextViewerUndoManager; // packageimport import dwtx.jface.text.IRegion; // packageimport import dwtx.jface.text.IInformationControlExtension2; // packageimport import dwtx.jface.text.IDocumentExtension4; // packageimport import dwtx.jface.text.IDocumentExtension2; // packageimport import dwtx.jface.text.IDocumentPartitionerExtension2; // packageimport import dwtx.jface.text.Assert; // packageimport import dwtx.jface.text.DefaultInformationControl; // packageimport import dwtx.jface.text.IWidgetTokenOwnerExtension; // packageimport import dwtx.jface.text.DocumentClone; // packageimport import dwtx.jface.text.DefaultUndoManager; // packageimport import dwtx.jface.text.IFindReplaceTarget; // packageimport import dwtx.jface.text.IAutoEditStrategy; // packageimport import dwtx.jface.text.ILineTrackerExtension; // packageimport import dwtx.jface.text.IUndoManagerExtension; // packageimport import dwtx.jface.text.TextSelection; // packageimport import dwtx.jface.text.DefaultAutoIndentStrategy; // packageimport import dwtx.jface.text.IAutoIndentStrategy; // packageimport import dwtx.jface.text.IPainter; // packageimport import dwtx.jface.text.IInformationControl; // packageimport import dwtx.jface.text.IInformationControlExtension3; // packageimport import dwtx.jface.text.ITextViewerExtension6; // packageimport import dwtx.jface.text.IInformationControlExtension4; // packageimport import dwtx.jface.text.DefaultLineTracker; // packageimport import dwtx.jface.text.IDocumentInformationMappingExtension; // packageimport import dwtx.jface.text.IRepairableDocumentExtension; // packageimport import dwtx.jface.text.ITextHover; // packageimport import dwtx.jface.text.FindReplaceDocumentAdapter; // packageimport import dwtx.jface.text.ILineTracker; // packageimport import dwtx.jface.text.Line; // packageimport import dwtx.jface.text.ITextViewerExtension; // packageimport import dwtx.jface.text.IDocumentAdapter; // packageimport import dwtx.jface.text.TextEvent; // packageimport import dwtx.jface.text.BadLocationException; // packageimport import dwtx.jface.text.AbstractDocument; // packageimport import dwtx.jface.text.AbstractLineTracker; // packageimport import dwtx.jface.text.TreeLineTracker; // packageimport import dwtx.jface.text.ITextPresentationListener; // packageimport import dwtx.jface.text.Region; // packageimport import dwtx.jface.text.ITextViewer; // packageimport import dwtx.jface.text.IDocumentInformationMapping; // packageimport import dwtx.jface.text.MarginPainter; // packageimport import dwtx.jface.text.IPaintPositionManager; // packageimport import dwtx.jface.text.TextPresentation; // packageimport import dwtx.jface.text.IFindReplaceTargetExtension; // packageimport import dwtx.jface.text.ISlaveDocumentManagerExtension; // packageimport import dwtx.jface.text.ISelectionValidator; // packageimport import dwtx.jface.text.IDocumentExtension; // packageimport import dwtx.jface.text.PropagatingFontFieldEditor; // packageimport import dwtx.jface.text.ConfigurableLineTracker; // packageimport import dwtx.jface.text.SlaveDocumentEvent; // packageimport import dwtx.jface.text.IDocumentListener; // packageimport import dwtx.jface.text.PaintManager; // packageimport import dwtx.jface.text.IFindReplaceTargetExtension3; // packageimport import dwtx.jface.text.ITextDoubleClickStrategy; // packageimport import dwtx.jface.text.IDocumentExtension3; // packageimport import dwtx.jface.text.Position; // packageimport import dwtx.jface.text.TextMessages; // packageimport import dwtx.jface.text.CopyOnWriteTextStore; // packageimport import dwtx.jface.text.WhitespaceCharacterPainter; // packageimport import dwtx.jface.text.IPositionUpdater; // packageimport import dwtx.jface.text.DefaultTextDoubleClickStrategy; // packageimport import dwtx.jface.text.ListLineTracker; // packageimport import dwtx.jface.text.ITextInputListener; // packageimport import dwtx.jface.text.BadPositionCategoryException; // packageimport import dwtx.jface.text.IWidgetTokenKeeperExtension; // packageimport import dwtx.jface.text.IInputChangedListener; // packageimport import dwtx.jface.text.ITextOperationTarget; // packageimport import dwtx.jface.text.IDocumentInformationMappingExtension2; // packageimport import dwtx.jface.text.ITextViewerExtension7; // packageimport import dwtx.jface.text.IInformationControlExtension5; // packageimport import dwtx.jface.text.IDocumentRewriteSessionListener; // packageimport import dwtx.jface.text.JFaceTextUtil; // packageimport import dwtx.jface.text.AbstractReusableInformationControlCreator; // packageimport import dwtx.jface.text.TabsToSpacesConverter; // packageimport import dwtx.jface.text.CursorLinePainter; // packageimport import dwtx.jface.text.ITextHoverExtension; // packageimport import dwtx.jface.text.IEventConsumer; // packageimport import dwtx.jface.text.IDocument; // packageimport import dwtx.jface.text.IWidgetTokenKeeper; // packageimport import dwtx.jface.text.DocumentCommand; // packageimport import dwtx.jface.text.TypedPosition; // packageimport import dwtx.jface.text.IEditingSupportRegistry; // packageimport import dwtx.jface.text.IDocumentPartitionerExtension; // packageimport import dwtx.jface.text.AbstractHoverInformationControlManager; // packageimport import dwtx.jface.text.IEditingSupport; // packageimport import dwtx.jface.text.IMarkSelection; // packageimport import dwtx.jface.text.ISlaveDocumentManager; // packageimport import dwtx.jface.text.DocumentEvent; // packageimport import dwtx.jface.text.DocumentPartitioningChangedEvent; // packageimport import dwtx.jface.text.ITextStore; // packageimport import dwtx.jface.text.JFaceTextMessages; // packageimport import dwtx.jface.text.DocumentRewriteSessionEvent; // packageimport import dwtx.jface.text.SequentialRewriteTextStore; // packageimport import dwtx.jface.text.DocumentRewriteSessionType; // packageimport import dwtx.jface.text.TextAttribute; // packageimport import dwtx.jface.text.ITextViewerExtension4; // packageimport import dwtx.jface.text.ITypedRegion; // packageimport import dwt.dwthelper.utils; /** * Extension interface for {@link dwtx.jface.text.IInformationControlCreator}<p> * Introduces tests whether information controls can be reused and whether information * control creators can replace each other. * * @see dwtx.jface.text.IInformationControlCreator * @see dwtx.jface.text.IInformationControl * @since 3.0 */ public interface IInformationControlCreatorExtension { /** * Tests if an existing information control can be reused. * * @param control the information control to test * @return <code>true</code> if the control can be reused */ bool canReuse(IInformationControl control); /** * Tests whether this information control creator can replace the given * information control creator. This is the case if the two creators create * the same kind of information controls. * * @param creator the creator to be checked * @return <code>true</code> if the given creator can be replaced, * <code>false</code> otherwise */ bool canReplace(IInformationControlCreator creator); }
D
// Copyright Ferdinand Majerech 2010 - 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) ///Keyboard/mouse key related enums. module platform.key; ///Possible key event states. enum KeyState { ///Key is being pressed. Pressed, ///Key is being released. Released } ///Key codes. These map directly to SDL 1.2 key codes. enum Key { Unknown = 0, First = 0, Backspace = 8, Tab = 9, Clear = 12, Return = 13, Pause = 19, Escape = 27, Space = 32, Exclaim = 33, Quotedbl = 34, Hash = 35, Dollar = 36, Ampersand = 38, Quote = 39, Leftparen = 40, Rightparen = 41, Asterisk = 42, Plus = 43, Comma = 44, Minus = 45, Period = 46, Slash = 47, K_0 = 48, K_1 = 49, K_2 = 50, K_3 = 51, K_4 = 52, K_5 = 53, K_6 = 54, K_7 = 55, K_8 = 56, K_9 = 57, Colon = 58, Semicolon = 59, Less = 60, Equals = 61, Greater = 62, Question = 63, At = 64, Leftbracket = 91, Backslash = 92, Rightbracket = 93, Caret = 94, Underscore = 95, Backquote = 96, K_A = 97, K_B = 98, K_C = 99, K_D = 100, K_E = 101, K_F = 102, K_G = 103, K_H = 104, K_I = 105, K_J = 106, K_K = 107, K_L = 108, K_M = 109, K_N = 110, K_O = 111, K_P = 112, K_Q = 113, K_R = 114, K_S = 115, K_T = 116, K_U = 117, K_V = 118, K_W = 119, K_X = 120, K_Y = 121, K_Z = 122, Delete = 127, Local_0 = 160, Local_1 = 161, Local_2 = 162, Local_3 = 163, Local_4 = 164, Local_5 = 165, Local_6 = 166, Local_7 = 167, Local_8 = 168, Local_9 = 169, Local_10 = 170, Local_11 = 171, Local_12 = 172, Local_13 = 173, Local_14 = 174, Local_15 = 175, Local_16 = 176, Local_17 = 177, Local_18 = 178, Local_19 = 179, Local_20 = 180, Local_21 = 181, Local_22 = 182, Local_23 = 183, Local_24 = 184, Local_25 = 185, Local_26 = 186, Local_27 = 187, Local_28 = 188, Local_29 = 189, Local_30 = 190, Local_31 = 191, Local_32 = 192, Local_33 = 193, Local_34 = 194, Local_35 = 195, Local_36 = 196, Local_37 = 197, Local_38 = 198, Local_39 = 199, Local_40 = 200, Local_41 = 201, Local_42 = 202, Local_43 = 203, Local_44 = 204, Local_45 = 205, Local_46 = 206, Local_47 = 207, Local_48 = 208, Local_49 = 209, Local_50 = 210, Local_51 = 211, Local_52 = 212, Local_53 = 213, Local_54 = 214, Local_55 = 215, Local_56 = 216, Local_57 = 217, Local_58 = 218, Local_59 = 219, Local_60 = 220, Local_61 = 221, Local_62 = 222, Local_63 = 223, Local_64 = 224, Local_65 = 225, Local_66 = 226, Local_67 = 227, Local_68 = 228, Local_69 = 229, Local_70 = 230, Local_71 = 231, Local_72 = 232, Local_73 = 233, Local_74 = 234, Local_75 = 235, Local_76 = 236, Local_77 = 237, Local_78 = 238, Local_79 = 239, Local_80 = 240, Local_81 = 241, Local_82 = 242, Local_83 = 243, Local_84 = 244, Local_85 = 245, Local_86 = 246, Local_87 = 247, Local_88 = 248, Local_89 = 249, Local_90 = 250, Local_91 = 251, Local_92 = 252, Local_93 = 253, Local_94 = 254, Local_95 = 255, //numpad NP_0 = 256, NP_1 = 257, NP_2 = 258, NP_3 = 259, NP_4 = 260, NP_5 = 261, NP_6 = 262, NP_7 = 263, NP_8 = 264, NP_9 = 265, NP_period = 266, NP_divide = 267, NP_multiply = 268, NP_minus = 269, NP_plus = 270, NP_enter = 271, NP_equals = 272, Up = 273, Down = 274, Right = 275, Left = 276, Insert = 277, Home = 278, End = 279, Pageup = 280, Pagedown = 281, F1 = 282, F2 = 283, F3 = 284, F4 = 285, F5 = 286, F6 = 287, F7 = 288, F8 = 289, F9 = 290, F10 = 291, F11 = 292, F12 = 293, F13 = 294, F14 = 295, F15 = 296, Numlock = 300, Capslock = 301, Scrollock = 302, Rshift = 303, Lshift = 304, Rctrl = 305, Lctrl = 306, Ralt = 307, Lalt = 308, Rmeta = 309, Lmeta = 310, Lsuper = 311, Rsuper = 312, Mode = 313, Compose = 314, Help = 315, Print = 316, Sysreq = 317, Break = 318, Menu = 319, Power = 320, Euro = 321, Undo = 322, Last } ///Mouse buttons. enum MouseKey { Left, Middle, Right, WheelUp, WheelDown }
D
/Users/GMoran/Desktop/ClassicPlayer/DerivedData/ClassicPlayer/Build/Intermediates/IBDesignables/Intermediates/ClassicPlayer.build/Debug-iphonesimulator/ClassicPlayer.build/Objects-normal/x86_64/PlaylistsMenuVC.o : /Users/GMoran/Desktop/ClassicPlayer/ClassicPlayer/NowPlayingVC.swift /Users/GMoran/Desktop/ClassicPlayer/ClassicPlayer/AboutScreenVC.swift /Users/GMoran/Desktop/ClassicPlayer/ClassicPlayer/SettingsVC.swift /Users/GMoran/Desktop/ClassicPlayer/AboutVC.swift /Users/GMoran/Desktop/ClassicPlayer/ClassicPlayer/MusicMenuVC.swift /Users/GMoran/Desktop/ClassicPlayer/ClassicPlayer/MainMenuVC.swift /Users/GMoran/Desktop/ClassicPlayer/ClassicPlayer/AlbumsMenuVC.swift /Users/GMoran/Desktop/ClassicPlayer/ClassicPlayer/PlaylistsMenuVC.swift /Users/GMoran/Desktop/ClassicPlayer/ClassicPlayer/ArtistsMenuVC.swift /Users/GMoran/Desktop/ClassicPlayer/ClassicPlayer/SongListMenuVC.swift /Users/GMoran/Desktop/ClassicPlayer/ClassicPlayer/Array+Shuffle.swift /Users/GMoran/Desktop/ClassicPlayer/ClassicPlayer/AppDelegate.swift /Users/GMoran/Desktop/ClassicPlayer/ClassicPlayer/C2AClickWheel.swift /Users/GMoran/Desktop/ClassicPlayer/ClassicPlayer/ImageTableCell.swift /Users/GMoran/Desktop/ClassicPlayer/ClassicPlayer/SettingsTableCell.swift /Users/GMoran/Desktop/ClassicPlayer/ClassicPlayer/MenuTableCell.swift /Users/GMoran/Desktop/ClassicPlayer/ClassicPlayer/ViewController.swift /Users/GMoran/Desktop/ClassicPlayer/ClassicPlayer/SettingsScreenViewController.swift /Users/GMoran/Desktop/ClassicPlayer/ClassicPlayer/StatusBarViewController.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/MediaPlayer.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/GMoran/Desktop/ClassicPlayer/DerivedData/ClassicPlayer/Build/Intermediates/IBDesignables/Intermediates/ClassicPlayer.build/Debug-iphonesimulator/ClassicPlayer.build/Objects-normal/x86_64/PlaylistsMenuVC~partial.swiftmodule : /Users/GMoran/Desktop/ClassicPlayer/ClassicPlayer/NowPlayingVC.swift /Users/GMoran/Desktop/ClassicPlayer/ClassicPlayer/AboutScreenVC.swift /Users/GMoran/Desktop/ClassicPlayer/ClassicPlayer/SettingsVC.swift /Users/GMoran/Desktop/ClassicPlayer/AboutVC.swift /Users/GMoran/Desktop/ClassicPlayer/ClassicPlayer/MusicMenuVC.swift /Users/GMoran/Desktop/ClassicPlayer/ClassicPlayer/MainMenuVC.swift /Users/GMoran/Desktop/ClassicPlayer/ClassicPlayer/AlbumsMenuVC.swift /Users/GMoran/Desktop/ClassicPlayer/ClassicPlayer/PlaylistsMenuVC.swift /Users/GMoran/Desktop/ClassicPlayer/ClassicPlayer/ArtistsMenuVC.swift /Users/GMoran/Desktop/ClassicPlayer/ClassicPlayer/SongListMenuVC.swift /Users/GMoran/Desktop/ClassicPlayer/ClassicPlayer/Array+Shuffle.swift /Users/GMoran/Desktop/ClassicPlayer/ClassicPlayer/AppDelegate.swift /Users/GMoran/Desktop/ClassicPlayer/ClassicPlayer/C2AClickWheel.swift /Users/GMoran/Desktop/ClassicPlayer/ClassicPlayer/ImageTableCell.swift /Users/GMoran/Desktop/ClassicPlayer/ClassicPlayer/SettingsTableCell.swift /Users/GMoran/Desktop/ClassicPlayer/ClassicPlayer/MenuTableCell.swift /Users/GMoran/Desktop/ClassicPlayer/ClassicPlayer/ViewController.swift /Users/GMoran/Desktop/ClassicPlayer/ClassicPlayer/SettingsScreenViewController.swift /Users/GMoran/Desktop/ClassicPlayer/ClassicPlayer/StatusBarViewController.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/MediaPlayer.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/GMoran/Desktop/ClassicPlayer/DerivedData/ClassicPlayer/Build/Intermediates/IBDesignables/Intermediates/ClassicPlayer.build/Debug-iphonesimulator/ClassicPlayer.build/Objects-normal/x86_64/PlaylistsMenuVC~partial.swiftdoc : /Users/GMoran/Desktop/ClassicPlayer/ClassicPlayer/NowPlayingVC.swift /Users/GMoran/Desktop/ClassicPlayer/ClassicPlayer/AboutScreenVC.swift /Users/GMoran/Desktop/ClassicPlayer/ClassicPlayer/SettingsVC.swift /Users/GMoran/Desktop/ClassicPlayer/AboutVC.swift /Users/GMoran/Desktop/ClassicPlayer/ClassicPlayer/MusicMenuVC.swift /Users/GMoran/Desktop/ClassicPlayer/ClassicPlayer/MainMenuVC.swift /Users/GMoran/Desktop/ClassicPlayer/ClassicPlayer/AlbumsMenuVC.swift /Users/GMoran/Desktop/ClassicPlayer/ClassicPlayer/PlaylistsMenuVC.swift /Users/GMoran/Desktop/ClassicPlayer/ClassicPlayer/ArtistsMenuVC.swift /Users/GMoran/Desktop/ClassicPlayer/ClassicPlayer/SongListMenuVC.swift /Users/GMoran/Desktop/ClassicPlayer/ClassicPlayer/Array+Shuffle.swift /Users/GMoran/Desktop/ClassicPlayer/ClassicPlayer/AppDelegate.swift /Users/GMoran/Desktop/ClassicPlayer/ClassicPlayer/C2AClickWheel.swift /Users/GMoran/Desktop/ClassicPlayer/ClassicPlayer/ImageTableCell.swift /Users/GMoran/Desktop/ClassicPlayer/ClassicPlayer/SettingsTableCell.swift /Users/GMoran/Desktop/ClassicPlayer/ClassicPlayer/MenuTableCell.swift /Users/GMoran/Desktop/ClassicPlayer/ClassicPlayer/ViewController.swift /Users/GMoran/Desktop/ClassicPlayer/ClassicPlayer/SettingsScreenViewController.swift /Users/GMoran/Desktop/ClassicPlayer/ClassicPlayer/StatusBarViewController.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/MediaPlayer.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
D
/** * Compiler implementation of the * $(LINK2 http://www.dlang.org, D programming language). * * Copyright: Copyright (C) 1999-2019 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/filecache.d, filecache.d) * Documentation: https://dlang.org/phobos/dmd_filecache.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/filecache.d */ module dmd.filecache; import dmd.root.stringtable; import dmd.root.array; import dmd.root.file; import dmd.root.filename; import core.stdc.stdio; /** A line-by-line representation of a $(REF File, dmd,root,file). */ class FileAndLines { FileName* file; FileBuffer* buffer; const(char[])[] lines; nothrow: /** File to read and split into its lines. */ this(const(char)[] filename) { file = new FileName(filename); readAndSplit(); } // Read a file and split the file buffer linewise private void readAndSplit() { auto readResult = File.read(file.toChars()); // FIXME: check success // take ownership of buffer buffer = new FileBuffer(readResult.extractData()); ubyte* buf = buffer.data.ptr; // slice into lines while (*buf) { auto prevBuf = buf; for (; *buf != '\n' && *buf != '\r'; buf++) { if (!*buf) break; } // handle Windows line endings if (*buf == '\r' && *(buf + 1) == '\n') buf++; lines ~= cast(const(char)[]) prevBuf[0 .. buf - prevBuf]; buf++; } } void destroy() { if (file) { file.destroy(); file = null; buffer.destroy(); buffer = null; lines.destroy(); lines = null; } } ~this() { destroy(); } } /** A simple file cache that can be used to avoid reading the same file multiple times. It stores its cached files as $(LREF FileAndLines) */ struct FileCache { private StringTable files; nothrow: /** Add or get a file from the file cache. If the file isn't part of the cache, it will be read from the filesystem. If the file has been read before, the cached file object will be returned Params: file = file to load in (or get from) the cache Returns: a $(LREF FileAndLines) object containing a line-by-line representation of the requested file */ FileAndLines addOrGetFile(const(char)[] file) { if (auto payload = files.lookup(file)) { if (payload !is null) return cast(typeof(return)) payload.ptrvalue; } auto lines = new FileAndLines(file); files.insert(file, cast(void*) lines); return lines; } __gshared fileCache = FileCache(); // Initializes the global FileCache singleton static __gshared void _init() { fileCache.initialize(); } void initialize() { files._init(); } void deinitialize() { foreach (sv; files) sv.destroy(); files.reset(); } }
D
give personal assurance give surety or assume responsibility summon (a vouchee) into court to warrant or defend a title give supporting evidence
D
//***************************************************************************** // // Dungeon: class to load & play a dungeon. This might have lots to // share with other dungeon-based games (e.g. guerrilla project). // //***************************************************************************** module src.dungeon; //----------------------------------------------------------------------------- /* Lets think about this a while... Dungeon has: - Dungeon itself - Mobs (models) - Player (model) - Shaders - In-game GUI On the other hand, some resources might be shared within entire game, for example, shaders... And maybe some rendering pipelines. Let's think... Character creation / selection <-----------------+ | --> "Off-dungeon" dungeon + off-dungeon GUI <------+ | --> Dungeon selection | | --> Running dungeon (w/ in-dungeon GUI) ------------+ */ //-----------------------------------------------------------------------------
D
func void b_assignschiffswachenguard(var C_NPC schiffswache) { if((MIS_SHIPISFREE == TRUE) || (MIS_SCVISITSHIP == LOG_RUNNING)) { if(schiffswache.voice == 4) { AI_Output(self,other,"DIA_Pal_Schiffswache_Ambient_04_00"); //Мы следим за тобой. Помни об этом. }; if(schiffswache.voice == 9) { AI_Output(self,other,"DIA_Pal_Schiffswache_Ambient_09_01"); //Не создавай здесь проблем, хорошо? }; if(schiffswache.voice == 12) { AI_Output(self,other,"DIA_Pal_Schiffswache_Ambient_12_02"); //Даже не думай воровать здесь, понял? }; AI_StopProcessInfos(schiffswache); Npc_SetRefuseTalk(schiffswache,60); Npc_SetRefuseTalk(pal_220_schiffswache,60); Npc_SetRefuseTalk(pal_221_schiffswache,60); Npc_SetRefuseTalk(pal_222_schiffswache,60); Npc_SetRefuseTalk(pal_223_schiffswache,60); Npc_SetRefuseTalk(pal_224_schiffswache,60); Npc_SetRefuseTalk(pal_225_schiffswache,60); Npc_SetRefuseTalk(pal_226_schiffswache,60); Npc_SetRefuseTalk(pal_227_schiffswache,60); Npc_SetRefuseTalk(pal_228_schiffswache,60); } else { b_say(self,other,"$ALARM"); AI_StopProcessInfos(self); b_attack(self,other,AR_GUARDSTOPSINTRUDER,1); Npc_SetRefuseTalk(schiffswache,20); Npc_SetRefuseTalk(pal_220_schiffswache,20); Npc_SetRefuseTalk(pal_221_schiffswache,20); Npc_SetRefuseTalk(pal_222_schiffswache,20); Npc_SetRefuseTalk(pal_223_schiffswache,20); Npc_SetRefuseTalk(pal_224_schiffswache,20); Npc_SetRefuseTalk(pal_225_schiffswache,20); Npc_SetRefuseTalk(pal_226_schiffswache,20); Npc_SetRefuseTalk(pal_227_schiffswache,20); Npc_SetRefuseTalk(pal_228_schiffswache,20); }; }; func void b_assignschiffswacheninfos(var C_NPC schiffswache) { if(MIS_OCGATEOPEN == TRUE) { if(schiffswache.voice == 4) { AI_Output(self,other,"DIA_Pal_Schiffswache_AmbientKap5_04_00"); //Эти проклятые орки штурмуют замок Гаронда. Мы должны действовать немедленно. }; if(schiffswache.voice == 9) { AI_Output(self,other,"DIA_Pal_Schiffswache_AmbientKap5_09_01"); //Если бы нам удалось найти этого предателя, что открыл главные ворота замка, мы бы ему показали! }; if(schiffswache.voice == 12) { AI_Output(self,other,"DIA_Pal_Schiffswache_AmbientKap5_12_02"); //Мы не можем ждать дольше. Нашим парням в Долине Рудников нужна помощь, чтобы справиться со следующей волной орков. }; } else { if(schiffswache.voice == 4) { AI_Output(self,other,"DIA_Pal_Schiffswache_AmbientKap5_04_03"); //Гаронд объявил всеобщую мобилизацию. Мы скоро отправляемся в Долину Рудников. }; if(schiffswache.voice == 9) { AI_Output(self,other,"DIA_Pal_Schiffswache_AmbientKap5_09_04"); //Оркам нужно преподнести урок. }; if(schiffswache.voice == 12) { AI_Output(self,other,"DIA_Pal_Schiffswache_AmbientKap5_12_05"); //Я не могу дождаться, когда мы, наконец, покажем этим оркам. Ну ничего, скоро мы начнем теснить их. }; }; AI_StopProcessInfos(schiffswache); }; func void b_assignschiffswachentalk(var C_NPC schiffswache) { if(KAPITEL >= 5) { b_assignschiffswacheninfos(schiffswache); } else { b_assignschiffswachenguard(schiffswache); }; }; func int b_assignschiffswacheninfoconditions(var C_NPC schiffswache) { if((KAPITEL < 5) && (Npc_RefuseTalk(self) == FALSE) && (MIS_SCVISITSHIP != LOG_RUNNING)) { return TRUE; } else if(Npc_IsInState(self,zs_talk)) { return TRUE; }; return FALSE; };
D
module main.d; import stackpletron; void main() { auto machine = Stackpletron(); machine.loadCode(); machine.run(); }
D
module common.pdh; /** * Performance Data Helper. * * Example counters: * \Processor(0)\% Processor Time * \Processor(1)\% Processor Time * \Processor(_Total)\% Processor Time * \PETE-DESKTOP\Process(bin-test)\Thread Count * \Process(bin-test)\IO Read Bytes/sec * \Process(bin-test)\IO Write Bytes/sec */ import common.all; import std.parallelism : totalCPUs; import core.sys.windows.windows; final class PDH { private: HMODULE pdhHandle; HANDLE query; PDH_HCOUNTER[] counters; uint numCores; double[] values; Semaphore semaphore; uint pollingFrequencyMillis; bool running = true; public: this(uint pollingFrequencyMillis=1000) { this.pollingFrequencyMillis = pollingFrequencyMillis; this.numCores = totalCPUs; this.counters.length = numCores; this.values = new double[numCores+1]; this.values[] = 0; this.semaphore = new Semaphore; loadDLL(); } void destroy() { running = false; if(query) PdhCloseQuery(query); if(pdhHandle) FreeLibrary(pdhHandle); } void start() { PDH_STATUS status = PdhOpenQueryW(null, 0, &query); if(status != ERROR_SUCCESS) { throw new Exception("Can't open PDH query: %s".format(status)); } else { for(auto i=0; i<numCores; i++) { wstring s = "\\Processor(%s)\\%% Processor Time"w.format(i); check(PdhAddEnglishCounterW(query, s.ptr, 0, counters.ptr+i), "PdhAddEnglishCounterW '%s'".format(s)); } // check(PdhAddEnglishCounterW(query, "\\Process(bin-test)\\Thread Count"w.ptr, 0, counters.ptr+8), // "PdhAddEnglishCounterW"); // This PdhCollectQueryData needs to be here otherwise you get an error later // when calling PdhGetFormattedCounterValue check(PdhCollectQueryData(query), "PdhCollectQueryData"); } auto t = new Thread(&loop); t.isDaemon = true; t.name = "PDH Polling Thread"; t.start(); } double getCPUTotalPercentage() { return values[$-1]; } double[] getCPUPercentagesByCore() { return values[0..$-1]; } void dumpCounters() { PDH_STATUS status = PdhOpenQueryW(null, 0, &query); if(status != ERROR_SUCCESS) { throw new Exception("Can't open PDH query: %s".format(status)); } wstring BROWSE_DIALOG_CAPTION = "Select a counter to monitor."w; WCHAR[PDH_MAX_COUNTER_PATH] CounterPathBuffer; PDH_BROWSE_DLG_CONFIG_W config = { bits: PDH_BROWSE_DLG_CONFIG_W_BITS.bSingleCounterPerAdd || PDH_BROWSE_DLG_CONFIG_W_BITS.bSingleCounterPerDialog || PDH_BROWSE_DLG_CONFIG_W_BITS.bWildCardInstances || PDH_BROWSE_DLG_CONFIG_W_BITS.bHideDetailBox, szReturnPathBuffer: CounterPathBuffer.ptr, cchReturnPathLength: PDH_MAX_COUNTER_PATH, CallBackStatus: ERROR_SUCCESS, dwDefaultDetailLevel: PERF_DETAIL_WIZARD, szDialogBoxCaption: cast(wchar*)BROWSE_DIALOG_CAPTION.ptr }; check(PdhBrowseCountersW(&config), "PdhBrowseCountersW"); // if (fromWStringz(CounterPathBuffer.ptr).length == 0) { // writefln("\nUser did not select any counter"); // } } PDH_STATUS validatePath(wstring path) { return PdhValidatePathW(path.ptr.as!(wchar*)); } wstring[] getPaths(wstring wildcardPath) { wstring[] paths; DWORD len; PDH_STATUS status = PdhExpandWildCardPathW( null, wildcardPath.ptr, null, &len, 0 ); if(status==PDH_MORE_DATA) { wchar* chars = new wchar[len].ptr; //writefln("more data len=%s", len); status = PdhExpandWildCardPathW( null, wildcardPath.ptr, chars, &len, 0 ); wchar* p = chars; while(*p) { auto w = fromWStringz(p); paths ~= w; p += w.length+1; } } return paths; } override string toString() { return "[CPUUsage cpus=%s]".format(totalCPUs); } private: void loadDLL() { pdhHandle = LoadLibraryA("Pdh"); if(pdhHandle) { *(cast(void**)&PdhOpenQueryW) = GetProcAddress(pdhHandle, "PdhOpenQueryW"); throwIf(!PdhOpenQueryW); *(cast(void**)&PdhCloseQuery) = GetProcAddress(pdhHandle, "PdhCloseQuery"); throwIf(!PdhCloseQuery); *(cast(void**)&PdhAddCounterW) = GetProcAddress(pdhHandle, "PdhAddCounterW"); throwIf(!PdhAddCounterW); *(cast(void**)&PdhCollectQueryData) = GetProcAddress(pdhHandle, "PdhCollectQueryData"); throwIf(!PdhCollectQueryData); *(cast(void**)&PdhGetFormattedCounterValue) = GetProcAddress(pdhHandle, "PdhGetFormattedCounterValue"); throwIf(!PdhGetFormattedCounterValue); *(cast(void**)&PdhAddEnglishCounterW) = GetProcAddress(pdhHandle, "PdhAddEnglishCounterW"); throwIf(!PdhAddEnglishCounterW); *(cast(void**)&PdhExpandWildCardPathW) = GetProcAddress(pdhHandle, "PdhExpandWildCardPathW"); throwIf(!PdhExpandWildCardPathW); *(cast(void**)&PdhGetFormattedCounterArrayW) = GetProcAddress(pdhHandle, "PdhGetFormattedCounterArrayW"); throwIf(!PdhGetFormattedCounterArrayW); *(cast(void**)&PdhBrowseCountersW) = GetProcAddress(pdhHandle, "PdhBrowseCountersW"); throwIf(!PdhBrowseCountersW); *(cast(void**)&PdhValidatePathW) = GetProcAddress(pdhHandle, "PdhValidatePathW"); throwIf(!PdhValidatePathW); } else { throw new Error("Unable to load Pdh library"); } } /** * https://msdn.microsoft.com/en-us/library/windows/desktop/aa373046(v=vs.85).aspx */ PDH_STATUS check(PDH_STATUS status, string func) { if(status != ERROR_SUCCESS) { string msg = "%x %s".format(status, status.as!ErrorCodes); // status == 0xc0000bc6 ? "PDH_INVALID_DATA" // : "%x".format(status); throw new Exception("%s failed: %s".format(func, msg)); } return status; } void loop() { while(true) { semaphore.wait(dur!"msecs"(pollingFrequencyMillis)); if(!running) break; poll(); } } void poll() { //StopWatch w; w.start(); check(PdhCollectQueryData(query), "PdhCollectQueryData"); double total = 0; double[] values = new double[numCores+1]; PDH_FMT_COUNTERVALUE value; foreach(i, c; counters) { PDH_STATUS status = PdhGetFormattedCounterValue( counters[i], PDH_FMT_DOUBLE, null, &value); check(status, "PdhGetFormattedCounterValue"); values[i] = value.u.doubleValue; total += values[i]; } values[$-1] = total / 8; this.values = values; //w.stop(); //writefln("collect: %s ms", w.peek().nsecs/100000.0); // 1.6 -> 4.6 ms // 23 ms for thread count } } //====================================================== struct PDH_FMT_COUNTERVALUE { DWORD CStatus; union Value_u { LONG longValue; double doubleValue; LONGLONG largeValue; LPCSTR AnsiStringValue; LPCWSTR WideStringValue; }; Value_u u; } struct PDH_FMT_COUNTERVALUE_ITEM_W { wchar* szName; PDH_FMT_COUNTERVALUE FmtValue; } enum PDH_BROWSE_DLG_CONFIG_W_BITS : uint { bIncludeInstanceIndex = 1<<0, bSingleCounterPerAdd = 1<<1, bSingleCounterPerDialog = 1<<2, bLocalCountersOnly = 1<<3, bWildCardInstances = 1<<4, bHideDetailBox = 1<<5, bInitializePath = 1<<6, bDisableMachineSelection = 1<<7, bIncludeCostlyObjects = 1<<8, bShowObjectBrowser = 1<<9 } struct PDH_BROWSE_DLG_CONFIG_W { uint bits; // PDH_BROWSE_DLG_CONFIG_W_BITS HWND hWndOwner; LPWSTR szDataSource; LPWSTR szReturnPathBuffer; DWORD cchReturnPathLength; void function(DWORD_PTR)* pCallBack; DWORD_PTR dwCallBackArg; PDH_STATUS CallBackStatus; DWORD dwDefaultDetailLevel; LPWSTR szDialogBoxCaption; } //pragma(lib, "pdh.lib"); alias PDH_STATUS = LONG; alias PDH_HQUERY = HANDLE; alias PDH_HCOUNTER = HANDLE; enum PDH_FMT_DOUBLE = 0x00000200; enum PDH_FMT_LARGE = 0x00000400; enum PDH_MORE_DATA = 0x800007D2; enum PDH_MAX_COUNTER_PATH = 2048; // https://docs.microsoft.com/en-us/windows/win32/perfctrs/pdh-error-codes enum ErrorCodes { PDH_CSTATUS_NO_COUNTER = 0xC0000BB9, // The specified counter could not be found PDH_INVALID_DATA = 0xC0000BC6, PDH_CSTATUS_NO_MACHINE = 0x800007D0, } extern(Windows) { @nogc DWORD GetProcessId(HANDLE Process) @system nothrow; __gshared PDH_STATUS function( const(wchar)* szDataSource, DWORD_PTR dwUserData, PDH_HQUERY* phQuery ) PdhOpenQueryW; __gshared PDH_STATUS function( PDH_HQUERY hQuery ) PdhCloseQuery; __gshared PDH_STATUS function( PDH_HQUERY hQuery, const(wchar)* szFullCounterPath, DWORD_PTR dwUserData, PDH_HCOUNTER* phCounter ) PdhAddCounterW; __gshared PDH_STATUS function( PDH_HQUERY hQuery, const(wchar)* szFullCounterPath, DWORD_PTR dwUserData, PDH_HCOUNTER* phCounter ) PdhAddEnglishCounterW; __gshared PDH_STATUS function( PDH_HQUERY hQuery ) PdhCollectQueryData; __gshared PDH_STATUS function( PDH_HCOUNTER hCounter, DWORD dwFormat, LPDWORD lpdwType, PDH_FMT_COUNTERVALUE* pValue ) PdhGetFormattedCounterValue; __gshared PDH_STATUS function( LPCWSTR szDataSource, LPCWSTR szWildCardPath, wchar* mszExpandedPathList, LPDWORD pcchPathListLength, DWORD dwFlags ) PdhExpandWildCardPathW; __gshared PDH_STATUS function( PDH_HCOUNTER hCounter, DWORD dwFormat, LPDWORD lpdwBufferSize, LPDWORD lpdwItemCount, PDH_FMT_COUNTERVALUE_ITEM_W* ItemBuffer ) PdhGetFormattedCounterArrayW; __gshared PDH_STATUS function( PDH_BROWSE_DLG_CONFIG_W* config ) PdhBrowseCountersW; __gshared PDH_STATUS function( wchar* path ) PdhValidatePathW; __gshared PDH_STATUS function( DWORD_PTR param1 ) CounterPathCallBack; } // Windows
D
module ui.walkindeep; import ui.element : Node; import ui.element : Element; void walkInDeep( FUNC )( Element* root, FUNC callback ) { // documnent // body // e1 // e2 // e3 // e4 // e5 // body, e1, e2, e3, e4, e5 foreach ( node; root.children ) { callback( node ); // recursove walkInDeep( node, callback ); } } // walkInDeep( &document.body, (node) => { writeln( node ); } );
D
// Copyright 2016 Google Inc. All Rights Reserved. // // 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. // // Original Author: ericv@google.com (Eric Veach) // Converted to D: madric@gmail.com (Vijay Nayar) module s2.s2polyline_simplifier; import s2.s1chord_angle; import s2.s1interval; import s2.s2point; import std.math; /** * This is a helper class for simplifying polylines. It allows you to compute * a maximal edge that intersects a sequence of discs, and that optionally * avoids a different sequence of discs. The results are conservative in that * the edge is guaranteed to intersect or avoid the specified discs using * exact arithmetic (see s2predicates.h). * * Note that S2Builder can also simplify polylines and supports more features * (e.g., snapping to S2CellId centers), so it is only recommended to use this * class if S2Builder does not meet your needs. * * Here is a simple example showing how to simplify a polyline into a sequence * of edges that stay within "max_error" of the original edges: * * vector<S2Point> v = { ... }; * S2PolylineSimplifier simplifier; * simplifier.Init(v[0]); * for (int i = 1; i < v.size(); ++i) { * if (!simplifier.Extend(v[i])) { * OutputEdge(simplifier.src(), v[i-1]); * simplifier.Init(v[i-1]); * } * simplifier.TargetDisc(v[i], max_error); * } * OutputEdge(simplifer.src(), v.back()); * * Note that the points targeted by TargetDisc do not need to be the same as * the candidate endpoints passed to Extend. So for example, you could target * the original vertices of a polyline, but only consider endpoints that are * snapped to E7 coordinates or S2CellId centers. * * Please be aware that this class works by maintaining a range of acceptable * angles (bearings) from the start vertex to the hypothetical destination * vertex. It does not keep track of distances to any of the discs to be * targeted or avoided. Therefore to use this class correctly, constraints * should be added in increasing order of distance. (The actual requirement * is slightly weaker than this, which is why it is not enforced, but * basically you should only call TargetDisc() and AvoidDisc() with arguments * that you want to constrain the immediately following call to Extend().) */ class S2PolylineSimplifier { public: this() {} /// Starts a new simplified edge at "src". void initialize(in S2Point src) { _src = src; _window = S1Interval.full(); // Precompute basis vectors for the tangent space at "src". This is similar // to GetFrame() except that we don't normalize the vectors. As it turns // out, the two basis vectors below have the same magnitude (up to the // length error in S2Point::Normalize). // Find the index of the component whose magnitude is smallest. S2Point tmp = src.abs(); int i = (tmp[0] < tmp[1] ? (tmp[0] < tmp[2] ? 0 : 2) : (tmp[1] < tmp[2] ? 1 : 2)); // We define the "y" basis vector as the cross product of "src" and the // basis vector for axis "i". Let "j" and "k" be the indices of the other // two components in cyclic order. int j = (i == 2 ? 0 : i + 1), k = (i == 0 ? 2 : i - 1); _yDir[i] = 0; _yDir[j] = src[k]; _yDir[k] = -src[j]; // Compute the cross product of "y_dir" and "src". We write out the cross // product here mainly for documentation purposes; it also happens to save a // few multiplies because unfortunately the optimizer does *not* get rid of // multiplies by zero (since these multiplies propagate NaN, for example). _xDir[i] = src[j] * src[j] + src[k] * src[k]; _xDir[j] = -src[j] * src[i]; _xDir[k] = -src[k] * src[i]; } // Returns the source vertex of the output edge. //S2Point src() const; /** * Returns true if the edge (src, dst) satisfies all of the targeting * requirements so far. Returns false if the edge would be longer than * 90 degrees (such edges are not supported). */ bool extend(in S2Point dst) const { // We limit the maximum edge length to 90 degrees in order to simplify the // error bounds. (The error gets arbitrarily large as the edge length // approaches 180 degrees.) if (S1ChordAngle(_src, dst) > S1ChordAngle.right()) return false; // Otherwise check whether this vertex is in the acceptable angle range. return _window.contains(getAngle(dst)); } /// Requires that the output edge must pass through the given disc. bool targetDisc(in S2Point p, S1ChordAngle r) { // Shrink the target interval by the maximum error from all sources. This // guarantees that the output edge will intersect the given disc. double semiwidth = getSemiwidth(p, r, -1 /*round down*/); if (semiwidth >= M_PI) { // The target disc contains "src", so there is nothing to do. return true; } if (semiwidth < 0) { _window = S1Interval.empty(); return false; } // Otherwise compute the angle interval corresponding to the target disc and // intersect it with the current window. double center = getAngle(p); S1Interval target = S1Interval.fromPoint(center).expanded(semiwidth); _window = _window.intersection(target); return !_window.isEmpty(); } /** * Requires that the output edge must avoid the given disc. "disc_on_left" * specifies whether the disc must be to the left or right of the edge. * (This feature allows the simplified edge to preserve the topology of the * original polyline with respect to other nearby points.) * * If your input is a polyline, you can compute "disc_on_left" as follows. * Let the polyline be ABCDE and assume that it already avoids a set of * points X_i. Suppose that you have aleady added ABC to the simplifer, and * now want to extend the edge chain to D. First find the X_i that are near * the edge CD, then discard the ones such that AX_i <= AC or AX_i >= AD * (since these points have either already been considered or aren't * relevant yet). Now X_i is to the left of the polyline if and only if * s2pred::OrderedCCW(A, D, X, C) (in other words, if X_i is to the left of * the angle wedge ACD). */ bool avoidDisc(in S2Point p, S1ChordAngle r, bool disc_on_left) { // Expand the interval by the maximum error from all sources. This // guarantees that the final output edge will avoid the given disc. double semiwidth = getSemiwidth(p, r, 1 /*round up*/); if (semiwidth >= M_PI) { // The avoidance disc contains "src", so it is impossible to avoid. _window = S1Interval.empty(); return false; } double center = getAngle(p); double opposite = (center > 0) ? center - M_PI : center + M_PI; S1Interval target = (disc_on_left ? S1Interval(opposite, center) : S1Interval(center, opposite)); _window = _window.intersection(target.expanded(-semiwidth)); return !_window.isEmpty(); } private: double getAngle(in S2Point p) const { return atan2(p.dotProd(_yDir), p.dotProd(_xDir)); } double getSemiwidth(in S2Point p, S1ChordAngle r, int round_direction) const { enum double DBL_ERR = 0.5 * double.epsilon; // Using spherical trigonometry, // // sin(semiwidth) = sin(r) / sin(a) // // where "a" is the angle between "src" and "p". Rather than measuring // these angles, instead we measure the squared chord lengths through the // interior of the sphere (i.e., Cartersian distance). Letting "r2" be the // squared chord distance corresponding to "r", and "a2" be the squared // chord distance corresponding to "a", we use the relationships // // sin^2(r) = r2 (1 - r2 / 4) // sin^2(a) = d2 (1 - d2 / 4) // // which follow from the fact that r2 = (2 * sin(r / 2)) ^ 2, etc. // "a2" has a relative error up to 5 * DBL_ERR, plus an absolute error of up // to 64 * DBL_ERR^2 (because "src" and "p" may differ from unit length by // up to 4 * DBL_ERR). We can correct for the relative error later, but for // the absolute error we use "round_direction" to account for it now. double r2 = r.length2(); double a2 = S1ChordAngle(_src, p).length2(); a2 -= 64 * DBL_ERR * DBL_ERR * round_direction; if (a2 <= r2) return M_PI; // The given disc contains "src". double sin2_r = r2 * (1 - 0.25 * r2); double sin2_a = a2 * (1 - 0.25 * a2); double semiwidth = asin(sqrt(sin2_r / sin2_a)); // We compute bounds on the errors from all sources: // // - The call to GetSemiwidth (this call). // - The call to GetAngle that computes the center of the interval. // - The call to GetAngle in Extend that tests whether a given point // is an acceptable destination vertex. // // Summary of the errors in GetAngle: // // y_dir_ has no error. // // x_dir_ has a relative error of DBL_ERR in two components, a relative // error of 2 * DBL_ERR in the other component, plus an overall relative // length error of 4 * DBL_ERR (compared to y_dir_) because "src" is assumed // to be normalized only to within the tolerances of S2Point::Normalize(). // // p.DotProd(y_dir_) has a relative error of 1.5 * DBL_ERR and an // absolute error of 1.5 * DBL_ERR * y_dir_.Norm(). // // p.DotProd(x_dir_) has a relative error of 5.5 * DBL_ERR and an absolute // error of 3.5 * DBL_ERR * y_dir_.Norm() (noting that x_dir_ and y_dir_ // have the same length to within a relative error of 4 * DBL_ERR). // // It's possible to show by taking derivatives that these errors can affect // the angle atan2(y, x) by up 7.093 * DBL_ERR radians. Rounding up and // including the call to atan2 gives a final error bound of 10 * DBL_ERR. // // Summary of the errors in GetSemiwidth: // // The distance a2 has a relative error of 5 * DBL_ERR plus an absolute // error of 64 * DBL_ERR^2 because the points "src" and "p" may differ from // unit length (by up to 4 * DBL_ERR). We have already accounted for the // absolute error above, leaving only the relative error. // // sin2_r has a relative error of 2 * DBL_ERR. // // sin2_a has a relative error of 12 * DBL_ERR assuming that a2 <= 2, // i.e. distance(src, p) <= 90 degrees. (The relative error gets // arbitrarily larger as this distance approaches 180 degrees.) // // semiwidth has a relative error of 17 * DBL_ERR. // // Finally, (center +/- semiwidth) has a rounding error of up to 4 * DBL_ERR // because in theory, the result magnitude may be as large as 1.5 * M_PI // which is larger than 4.0. This gives a total error of: double error = (2 * 10 + 4) * DBL_ERR + 17 * DBL_ERR * semiwidth; return semiwidth + round_direction * error; } S2Point _src; S2Point _xDir, _yDir; S1Interval _window; }
D
/*#D*/ // Copyright © 2012-2017, Jakob Bornecrantz. All rights reserved. // See copyright notice in src/volt/license.d (BOOST ver. 1.0). /*! * Code for generating constant expresions. * * @ingroup backend llvmbackend */ module volt.llvm.constant; import watt.text.format : format; import volt.errors; import volt.ir.util; import ir = volta.ir; import volt.llvm.common; import volt.llvm.interfaces; static import volt.semantic.mangle; void getConstantValue(State state, ir.Exp exp, Value result) { result.isPointer = false; switch (exp.nodeType) with (ir.NodeType) { case Unary: auto asUnary = cast(ir.Unary)exp; assert(asUnary !is null); return handleConstUnary(state, asUnary, result); case Constant: auto cnst = cast(ir.Constant)exp; assert(cnst !is null); return handleConstant(state, cnst, result); case ExpReference: auto expRef = cast(ir.ExpReference)exp; assert(expRef !is null); return handleConstExpReference(state, expRef, result); case ArrayLiteral: auto al = cast(ir.ArrayLiteral)exp; assert(al !is null); return handleArrayLiteral(state, al, result); case StructLiteral: auto sl = cast(ir.StructLiteral)exp; assert(sl !is null); return handleStructLiteral(state, sl, result); case UnionLiteral: auto ul = cast(ir.UnionLiteral)exp; assert(ul !is null); return handleUnionLiteral(state, ul, result); case ClassLiteral: auto literal = cast(ir.ClassLiteral)exp; assert(literal !is null); return handleClassLiteral(state, literal, result); case BuiltinExp: auto bexp = cast(ir.BuiltinExp)exp; assert(bexp !is null); return handleBuiltinExp(state, bexp, result); default: auto str = format( "could not get constant from expression '%s'", ir.nodeToString(exp)); throw panic(/*#ref*/exp.loc, str); } } private: /* * * Handle functions. * */ void handleBuiltinExp(State state, ir.BuiltinExp bexp, Value result) { if (bexp.kind != ir.BuiltinExp.Kind.BuildVtable) { throw panic(/*#ref*/bexp.loc, "can only constant get from BuildVtable builtin exps"); } auto tinfosStaticArrayType = bexp._class.classinfoVariable.type.toStaticArrayTypeFast(); auto vals = new LLVMValueRef[](bexp.functionSink.length + 2); auto ptrType = LLVMPointerType(LLVMInt8TypeInContext(state.context), 0); LLVMTypeRef intType; if (state.target.isP64) { intType = LLVMInt64TypeInContext(state.context); } else { intType = LLVMInt32TypeInContext(state.context); } Type type; vals[0] = LLVMConstInt(intType, cast(ulong)tinfosStaticArrayType.length, false); vals[0] = LLVMConstIntToPtr(vals[0], ptrType); vals[1] = state.getVariableValue(bexp._class.classinfoVariable, /*#out*/type); vals[1] = LLVMConstBitCast(vals[1], ptrType); for (size_t i = 2; i < vals.length; ++i) { auto method = bexp.functionSink.get(i - 2); if (method.isAbstract) { assert(bexp._class.isAbstract); vals[i] = LLVMConstNull(ptrType); continue; } vals[i] = state.getFunctionValue(method, /*#out*/type); vals[i] = LLVMConstBitCast(vals[i], ptrType); } result.value = LLVMConstArray(ptrType, vals.ptr, cast(uint)vals.length); result.type = state.fromIr(bexp._class.vtableVariable.type); } void handleConstUnary(State state, ir.Unary asUnary, Value result) { switch (asUnary.op) with (ir.Unary.Op) { case Cast: return handleConstCast(state, asUnary, result); case AddrOf: return handleConstAddrOf(state, asUnary, result); case Plus, Minus: return handleConstPlusMinus(state, asUnary, result); default: throw panicUnhandled(asUnary, ir.nodeToString(asUnary)); } } void handleConstAddrOf(State state, ir.Unary de, Value result) { auto expRef = cast(ir.ExpReference)de.value; assert(expRef !is null); assert(expRef.decl.declKind == ir.Declaration.Kind.Variable); auto var = cast(ir.Variable)expRef.decl; Type type; auto v = state.getVariableValue(var, /*#out*/type); auto pt = new ir.PointerType(); pt.base = type.irType; assert(pt.base !is null); pt.mangledName = volt.semantic.mangle.mangle(pt); result.value = v; result.type = state.fromIr(pt); result.isPointer = false; } void handleConstPlusMinus(State state, ir.Unary asUnary, Value result) { getConstantValue(state, asUnary.value, result); auto primType = cast(PrimitiveType)result.type; assert(primType !is null); assert(!result.isPointer); if (asUnary.op == ir.Unary.Op.Minus) { result.value = LLVMConstNeg(result.value); } } void handleConstCast(State state, ir.Unary asUnary, Value result) { void error(string t) { auto str = format("error unary constant expression '%s'", t); throw panic(/*#ref*/asUnary.loc, str); } getConstantValue(state, asUnary.value, result); auto newType = state.fromIr(asUnary.type); auto oldType = result.type; auto newPrim = cast(PrimitiveType)newType; auto oldPrim = cast(PrimitiveType)oldType; if (newPrim !is null && oldPrim !is null) { result.type = newType; if (newPrim.boolean && oldPrim.floating) { result.value = LLVMConstFCmp( LLVMRealPredicate.ONE, result.value, LLVMConstNull(oldType.llvmType)); } else if (newPrim.floating) { if (oldPrim.floating) { result.value = LLVMConstFPCast(result.value, newPrim.llvmType); } else if (oldPrim.signed) { result.value = LLVMConstSIToFP(result.value, newType.llvmType); } else { result.value = LLVMConstUIToFP(result.value, newType.llvmType); } } else if (oldPrim.floating) { if (newPrim.signed) { result.value = LLVMConstFPToSI(result.value, newType.llvmType); } else { result.value = LLVMConstFPToUI(result.value, newType.llvmType); } } else { result.value = LLVMConstIntCast(result.value, newPrim.llvmType, oldPrim.signed); } return; } { auto newTypePtr = cast(PointerType)newType; auto oldTypePtr = cast(PointerType)oldType; auto newTypeFn = cast(FunctionType)newType; auto oldTypeFn = cast(FunctionType)oldType; if (oldPrim !is null && newTypePtr !is null) { result.type = newType; result.value = LLVMConstIntToPtr(result.value, newTypePtr.llvmType); return; } if ((newTypePtr !is null || newTypeFn !is null) && (oldTypePtr !is null || oldTypeFn !is null)) { result.type = newType; result.value = LLVMConstBitCast(result.value, newType.llvmType); return; } } throw makeError(/*#ref*/asUnary.loc, "not a handle cast type."); } void handleConstExpReference(State state, ir.ExpReference expRef, Value result) { switch(expRef.decl.declKind) with (ir.Declaration.Kind) { case Function: auto func = cast(ir.Function)expRef.decl; assert(func !is null); result.isPointer = false; result.value = state.getFunctionValue(func, /*#out*/result.type); break; case FunctionParam: auto fp = cast(ir.FunctionParam)expRef.decl; assert(fp !is null); Type type; auto v = state.getVariableValue(fp, /*#out*/type); result.value = v; result.isPointer = false; result.type = type; break; case Variable: auto var = cast(ir.Variable)expRef.decl; assert(var !is null); /*! * Whats going on here? Since constants ultimatly is handled * by the linker, by either being just binary data in some * segment or references to symbols, but not a copy of a * values somewhere (which can later be changed), we can * not statically load from a variable. * * But since useBaseStorage causes Variables to become a reference * implicitly we can allow them trough. We use this for typeid. * This might seem backwards but it works out. */ if (!var.useBaseStorage) { throw panic(/*#ref*/expRef.loc, "variables needs '&' for constants"); } Type type; auto v = state.getVariableValue(var, /*#out*/type); result.value = v; result.isPointer = false; result.type = type; break; case EnumDeclaration: auto edecl = cast(ir.EnumDeclaration)expRef.decl; result.value = state.getConstant(edecl.assign); result.isPointer = false; result.type = state.fromIr(edecl.type); break; default: throw panic(/*#ref*/expRef.loc, "invalid decl type"); } }
D
module arrow.FileOutputStream; private import arrow.OutputStream; private import arrow.c.functions; public import arrow.c.types; private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import glib.Str; private import gobject.ObjectG; /** * It wraps `arrow::io::FileOutputStream`. */ public class FileOutputStream : OutputStream { /** the main Gtk struct */ protected GArrowFileOutputStream* gArrowFileOutputStream; /** Get the main Gtk struct */ public GArrowFileOutputStream* getFileOutputStreamStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gArrowFileOutputStream; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gArrowFileOutputStream; } /** * Sets our main struct and passes it to the parent class. */ public this (GArrowFileOutputStream* gArrowFileOutputStream, bool ownedRef = false) { this.gArrowFileOutputStream = gArrowFileOutputStream; super(cast(GArrowOutputStream*)gArrowFileOutputStream, ownedRef); } /** */ public static GType getType() { return garrow_file_output_stream_get_type(); } /** * * Params: * path = The path of the file output stream. * append = Whether the path is opened as append mode or recreate mode. * Returns: A newly opened #GArrowFileOutputStream or * %NULL on error. * * Throws: GException on failure. * Throws: ConstructionException GTK+ fails to create the object. */ public this(string path, bool append) { GError* err = null; auto p = garrow_file_output_stream_new(Str.toStringz(path), append, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GArrowFileOutputStream*) p, true); } }
D
import std.stdio, std.algorithm, std.conv, std.array, std.string, std.math, std.typecons, std.numeric, std.container, std.range; void get(Args...)(ref Args args) { import std.traits, std.meta, std.typecons; static if (Args.length == 1) { alias Arg = Args[0]; static if (isArray!Arg) { static if (isSomeChar!(ElementType!Arg)) { args[0] = readln.chomp.to!Arg; } else { args[0] = readln.split.to!Arg; } } else static if (isTuple!Arg) { auto input = readln.split; static foreach (i; 0..Fields!Arg.length) { args[0][i] = input[i].to!(Fields!Arg[i]); } } else { args[0] = readln.chomp.to!Arg; } } else { auto input = readln.split; assert(input.length == Args.length); static foreach (i; 0..Args.length) { args[i] = input[i].to!(Args[i]); } } } void get_lines(Args...)(size_t N, ref Args args) { import std.traits, std.range; static foreach (i; 0..Args.length) { static assert(isArray!(Args[i])); args[i].length = N; } foreach (i; 0..N) { static if (Args.length == 1) { get(args[0][i]); } else { auto input = readln.split; static foreach (j; 0..Args.length) { args[j][i] = input[j].to!(ElementType!(Args[j])); } } } } void main() { int N, M; get(N, M); long[] aa; get(aa); auto T = new int[][N]; while (M--) { int x, y; get(x, y); T[x] ~= y; T[y] ~= x; } long[][] tt; auto fs = new bool[](N); foreach (i; 0..N) if (!fs[i]) { long[] t; void walk(int i) { t ~= aa[i]; fs[i] = true; foreach (j; T[i]) if (!fs[j]) walk(j); } walk(i); tt ~= t; } if (tt.length == 1) { writeln(0); return; } long[] rs; long s; foreach (t; tt) { sort(t); s += t[0]; rs ~= t[1..$]; } if (rs.length < tt.length - 2) { writeln("Impossible"); return; } sort(rs); writeln(s + reduce!"a + b"(0L, rs[0..tt.length - 2])); }
D
/* * Copyright (c) 2012-2020 The ANTLR Project. All rights reserved. * Use of this file is governed by the BSD 3-clause license that * can be found in the LICENSE.txt file in the project root. */ module antlr.v4.runtime.misc.BitSet; import std.algorithm; import std.bitmanip; import std.conv; import std.format : format; /** * This struct implements a vector of bits that grows as needed. Each component * of the bit set has a bool value. The bits of a BitSet are indexed by nonnegative integers. * Individual indexed bits can be examined, set, or cleared. One BitSet may be used to modify * the contents of another BitSet through logical AND, logical inclusive OR, * and logical exclusive OR operations. * * By default, all bits in the set initially have the value false. */ struct BitSet { private BitArray bitSet; public this(BitArray bitArray) { this.bitSet = bitArray; } public this(size_t initialSize) { this.bitSet.length = initialSize; } public size_t length() { return bitSet.length; } public auto cardinality() { int res; bitSet.each!(v => res += to!int(v)); return res; } public int nextSetBit(int fromIndex) { foreach (i, el; bitSet) { if (i > fromIndex && el == true) return to!int(i); } return -1; } public void set(int bitIndex, bool value) { if (bitSet.length <= bitIndex) bitSet.length = bitIndex + 16; // dynamic array need more space bitSet[bitIndex] = value; } /** * @uml * @nothrow */ public bool get(int bitIndex) nothrow in { assert(bitSet.length > bitIndex); } do { return bitSet[bitIndex]; } public bool isEmpty() { return cardinality == 0; } public string toString() { if (bitSet.length) { string res; foreach (j, b; bitSet) { if (b == true) { res ~= to!string(j) ~ ", "; } } return format!"{%s}"(res[0 .. $ - 2]); } else return "{}"; } /** * @uml * @trusted */ public size_t toHash() @trusted { size_t hash; foreach (el; bitSet) hash = (hash * 9) + el; return hash; } /** * @uml * @const * @pure * @nothrow */ public bool opEquals(ref const BitSet bitSet) const pure nothrow { return this.bitSet == bitSet.bitSet; } public void clear() { bitSet.length(0); } public BitSet or(BitSet bits) { BitSet result; auto maxLenght = max(this.bitSet.length, bits.bitSet.length); if (this.bitSet.length < maxLenght) this.bitSet.length = maxLenght; else if (bits.values.length < maxLenght) bits.values.length = maxLenght; result.bitSet = this.bitSet | bits.bitSet; return result; } public string toIndexString() { import std.conv; import std.array : join; string[] res; int index; foreach (i, el; bitSet) { if (el) res ~= to!string(i); } return "{" ~ join(res, ",") ~ "}"; } public BitArray values() { return bitSet; } public void dup(BitSet old) { this.bitSet = old.bitSet.dup; } }
D
module org.eclipse.swt.internal.mozilla.nsIDOMDocument; import java.lang.all; import org.eclipse.swt.internal.mozilla.Common; import org.eclipse.swt.internal.mozilla.nsID; import org.eclipse.swt.internal.mozilla.nsIDOMNode; import org.eclipse.swt.internal.mozilla.nsStringAPI; import org.eclipse.swt.internal.mozilla.nsIDOMNode; import org.eclipse.swt.internal.mozilla.nsIDOMNodeList; import org.eclipse.swt.internal.mozilla.nsIDOMDocumentType; import org.eclipse.swt.internal.mozilla.nsIDOMElement; import org.eclipse.swt.internal.mozilla.nsIDOMDocumentFragment; import org.eclipse.swt.internal.mozilla.nsIDOMText; import org.eclipse.swt.internal.mozilla.nsIDOMComment; import org.eclipse.swt.internal.mozilla.nsIDOMCDATASection; import org.eclipse.swt.internal.mozilla.nsIDOMProcessingInstruction; import org.eclipse.swt.internal.mozilla.nsIDOMDOMImplementation; import org.eclipse.swt.internal.mozilla.nsIDOMAttr; import org.eclipse.swt.internal.mozilla.nsIDOMEntityReference; const char[] NS_IDOMDOCUMENT_IID_STR = "a6cf9075-15b3-11d2-932e-00805f8add32"; const nsIID NS_IDOMDOCUMENT_IID= {0xa6cf9075, 0x15b3, 0x11d2, [ 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 ]}; interface nsIDOMDocument : nsIDOMNode { static const char[] IID_STR = NS_IDOMDOCUMENT_IID_STR; static const nsIID IID = NS_IDOMDOCUMENT_IID; extern(System): nsresult GetDoctype(nsIDOMDocumentType *aDoctype); nsresult GetImplementation(nsIDOMDOMImplementation *aImplementation); nsresult GetDocumentElement(nsIDOMElement *aDocumentElement); nsresult CreateElement(nsAString * tagName, nsIDOMElement *_retval); nsresult CreateDocumentFragment(nsIDOMDocumentFragment *_retval); nsresult CreateTextNode(nsAString * data, nsIDOMText *_retval); nsresult CreateComment(nsAString * data, nsIDOMComment *_retval); nsresult CreateCDATASection(nsAString * data, nsIDOMCDATASection *_retval); nsresult CreateProcessingInstruction(nsAString * target, nsAString * data, nsIDOMProcessingInstruction *_retval); nsresult CreateAttribute(nsAString * name, nsIDOMAttr *_retval); nsresult CreateEntityReference(nsAString * name, nsIDOMEntityReference *_retval); nsresult GetElementsByTagName(nsAString * tagname, nsIDOMNodeList *_retval); nsresult ImportNode(nsIDOMNode importedNode, PRBool deep, nsIDOMNode *_retval); nsresult CreateElementNS(nsAString * namespaceURI, nsAString * qualifiedName, nsIDOMElement *_retval); nsresult CreateAttributeNS(nsAString * namespaceURI, nsAString * qualifiedName, nsIDOMAttr *_retval); nsresult GetElementsByTagNameNS(nsAString * namespaceURI, nsAString * localName, nsIDOMNodeList *_retval); nsresult GetElementById(nsAString * elementId, nsIDOMElement *_retval); }
D
module android.java.android.net.wifi.aware.PeerHandle_d_interface; import arsd.jni : IJavaObjectImplementation, JavaPackageId, JavaName, IJavaObject, ImportExportImpl, JavaInterfaceMembers; static import arsd.jni; import import0 = android.java.java.lang.Class_d_interface; final class PeerHandle : IJavaObject { static immutable string[] _d_canCastTo = [ ]; @Import bool equals(IJavaObject); @Import int hashCode(); @Import import0.Class getClass(); @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/net/wifi/aware/PeerHandle;"; }
D
/** * Common file format definitions * * License: * Copyright Devisualization (Richard Andrew Cattermole) 2014 - 2017. * 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 devisualization.image.fileformats.defs; /** * An image format type with color type of HeadersOnly will not include the image facilities as part of it. * This is used with loading only headers of and image format type. To decide at runtime a better color type to use. */ struct HeadersOnly {} /// alias ImageNotLoadableException = Exception; /// alias ImageNotExportableException = Exception;
D
class C { void f() { if (true) { f( array.map!(a => a.prop) .array .to!string, __FILE__, __LINE__); g( map && map, __FILE__, __LINE__); h( map || map, __FILE__, __LINE__); i( map + map, __FILE__, __LINE__); } } }
D
module UnrealScript.Engine.TextureMovie; import ScriptClasses; import UnrealScript.Helpers; import UnrealScript.Core.UObject; import UnrealScript.Engine.CodecMovie; import UnrealScript.Engine.Texture; extern(C++) interface TextureMovie : Texture { public extern(D): private static __gshared ScriptClass mStaticClass; @property final static ScriptClass StaticClass() { mixin(MGSCC("Class Engine.TextureMovie")); } private static __gshared TextureMovie mDefaultProperties; @property final static TextureMovie DefaultProperties() { mixin(MGDPC("TextureMovie", "TextureMovie Engine.Default__TextureMovie")); } static struct Functions { private static __gshared { ScriptFunction mPlay; ScriptFunction mPause; ScriptFunction mStop; } public @property static final { ScriptFunction Play() { mixin(MGF("mPlay", "Function Engine.TextureMovie.Play")); } ScriptFunction Pause() { mixin(MGF("mPause", "Function Engine.TextureMovie.Pause")); } ScriptFunction Stop() { mixin(MGF("mStop", "Function Engine.TextureMovie.Stop")); } } } enum EMovieStreamSource : ubyte { MovieStream_File = 0, MovieStream_Memory = 1, MovieStream_MAX = 2, } @property final { auto ref { Pointer ReleaseCodecFence() { mixin(MGPC("Pointer", 312)); } UObject.UntypedBulkData_Mirror Data() { mixin(MGPC("UObject.UntypedBulkData_Mirror", 260)); } CodecMovie Decoder() { mixin(MGPC("CodecMovie", 252)); } ScriptClass DecoderClass() { mixin(MGPC("ScriptClass", 248)); } TextureMovie.EMovieStreamSource MovieStreamSourceVar() { mixin(MGPC("TextureMovie.EMovieStreamSource", 247)); } int SizeX() { mixin(MGPC("int", 236)); } Texture.TextureAddress AddressY() { mixin(MGPC("Texture.TextureAddress", 246)); } Texture.TextureAddress AddressX() { mixin(MGPC("Texture.TextureAddress", 245)); } Texture.EPixelFormat FormatVar() { mixin(MGPC("Texture.EPixelFormat", 244)); } int SizeY() { mixin(MGPC("int", 240)); } } bool AutoPlay() { mixin(MGBPC(256, 0x8)); } bool AutoPlay(bool val) { mixin(MSBPC(256, 0x8)); } bool Looping() { mixin(MGBPC(256, 0x4)); } bool Looping(bool val) { mixin(MSBPC(256, 0x4)); } bool Stopped() { mixin(MGBPC(256, 0x2)); } bool Stopped(bool val) { mixin(MSBPC(256, 0x2)); } bool Paused() { mixin(MGBPC(256, 0x1)); } bool Paused(bool val) { mixin(MSBPC(256, 0x1)); } } final: void Play() { (cast(ScriptObject)this).ProcessEvent(Functions.Play, cast(void*)0, cast(void*)0); } void Pause() { (cast(ScriptObject)this).ProcessEvent(Functions.Pause, cast(void*)0, cast(void*)0); } void Stop() { (cast(ScriptObject)this).ProcessEvent(Functions.Stop, cast(void*)0, cast(void*)0); } }
D
/Users/hannh/Documents/MyGitHub/ChartsTest2/Build/Intermediates/Charts.build/Debug-iphonesimulator/Charts.build/Objects-normal/x86_64/IPieChartDataSet.o : /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/ChartData.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/CombinedChartData.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/PieChartData.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/BubbleChartData.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/BarLineScatterCandleBubbleChartData.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/CandleChartData.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/LineChartData.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/BarChartData.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/RadarChartData.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/ScatterChartData.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Jobs/ViewPortJob.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Jobs/AnimatedViewPortJob.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Jobs/MoveViewJob.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Jobs/AnimatedMoveViewJob.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Jobs/ZoomViewJob.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Jobs/AnimatedZoomViewJob.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Components/Legend.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Components/MarkerImage.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Highlight/Range.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Components/ChartLimitLine.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/ChartDataRendererBase.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/AxisRendererBase.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Components/AxisBase.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Components/ComponentBase.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Charts/ChartViewBase.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Charts/BarLineChartViewBase.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Charts/PieRadarChartViewBase.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/ChartDataEntryBase.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Animation/ChartAnimationEasing.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Utils/Fill.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Utils/Platform.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Components/Description.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Interfaces/ChartDataProvider.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Interfaces/CombinedChartDataProvider.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Interfaces/BubbleChartDataProvider.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Interfaces/BarLineScatterCandleBubbleChartDataProvider.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Interfaces/CandleChartDataProvider.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Interfaces/LineChartDataProvider.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Interfaces/BarChartDataProvider.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Interfaces/ScatterChartDataProvider.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Components/IMarker.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Utils/ViewPortHandler.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Utils/Transformer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/Renderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/LegendRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/BarLineScatterCandleBubbleRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/Scatter/IShapeRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/Scatter/XShapeRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/Scatter/CircleShapeRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/Scatter/TriangleShapeRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/Scatter/SquareShapeRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/Scatter/ChevronDownShapeRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/Scatter/ChevronUpShapeRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/Scatter/CrossShapeRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/LineScatterCandleRadarRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/LineRadarRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/XAxisRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/YAxisRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/CombinedChartRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/PieChartRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/BubbleChartRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/LineChartRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/CandleStickChartRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/BarChartRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/HorizontalBarChartRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/RadarChartRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/ScatterChartRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Highlight/IHighlighter.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Highlight/CombinedHighlighter.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Highlight/PieHighlighter.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Highlight/BarHighlighter.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Highlight/HorizontalBarHighlighter.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Highlight/RadarHighlighter.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Highlight/PieRadarHighlighter.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Highlight/ChartHighlighter.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Formatters/IValueFormatter.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Formatters/IAxisValueFormatter.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Formatters/DefaultAxisValueFormatter.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Formatters/IndexAxisValueFormatter.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Formatters/DefaultValueFormatter.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Formatters/IFillFormatter.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Formatters/DefaultFillFormatter.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Animation/Animator.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Filters/DataApproximator.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Utils/ChartColorTemplates.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Components/XAxis.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Components/YAxis.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Utils/ChartUtils.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/ChartBaseDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/ChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Interfaces/IChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/PieChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Interfaces/IPieChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/BubbleChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Interfaces/IBubbleChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/BarLineScatterCandleBubbleChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Interfaces/IBarLineScatterCandleBubbleChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/CandleChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Interfaces/ICandleChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/LineChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Interfaces/ILineChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/BarChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Interfaces/IBarChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/RadarChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Interfaces/IRadarChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/LineScatterCandleRadarChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Interfaces/ILineScatterCandleRadarChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/LineRadarChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Interfaces/ILineRadarChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/ScatterChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Interfaces/IScatterChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Highlight/Highlight.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Utils/TransformerHorizontalBarChart.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/XAxisRendererHorizontalBarChart.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/YAxisRendererHorizontalBarChart.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/XAxisRendererRadarChart.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/YAxisRendererRadarChart.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Components/MarkerView.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Charts/CombinedChartView.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Charts/PieChartView.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Charts/BubbleChartView.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Charts/LineChartView.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Charts/CandleStickChartView.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Charts/BarChartView.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Charts/HorizontalBarChartView.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Charts/RadarChartView.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Charts/ScatterChartView.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/ChartDataEntry.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/PieChartDataEntry.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/BubbleChartDataEntry.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/CandleChartDataEntry.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/BarChartDataEntry.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/RadarChartDataEntry.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Components/LegendEntry.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/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/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/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/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/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Supporting\ Files/Charts.h /Users/hannh/Documents/MyGitHub/ChartsTest2/Build/Intermediates/Charts.build/Debug-iphonesimulator/Charts.build/unextended-module.modulemap /Users/hannh/Documents/MyGitHub/ChartsTest2/Build/Intermediates/Charts.build/Debug-iphonesimulator/Charts.build/Objects-normal/x86_64/IPieChartDataSet~partial.swiftmodule : /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/ChartData.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/CombinedChartData.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/PieChartData.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/BubbleChartData.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/BarLineScatterCandleBubbleChartData.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/CandleChartData.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/LineChartData.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/BarChartData.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/RadarChartData.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/ScatterChartData.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Jobs/ViewPortJob.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Jobs/AnimatedViewPortJob.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Jobs/MoveViewJob.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Jobs/AnimatedMoveViewJob.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Jobs/ZoomViewJob.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Jobs/AnimatedZoomViewJob.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Components/Legend.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Components/MarkerImage.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Highlight/Range.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Components/ChartLimitLine.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/ChartDataRendererBase.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/AxisRendererBase.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Components/AxisBase.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Components/ComponentBase.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Charts/ChartViewBase.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Charts/BarLineChartViewBase.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Charts/PieRadarChartViewBase.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/ChartDataEntryBase.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Animation/ChartAnimationEasing.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Utils/Fill.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Utils/Platform.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Components/Description.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Interfaces/ChartDataProvider.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Interfaces/CombinedChartDataProvider.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Interfaces/BubbleChartDataProvider.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Interfaces/BarLineScatterCandleBubbleChartDataProvider.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Interfaces/CandleChartDataProvider.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Interfaces/LineChartDataProvider.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Interfaces/BarChartDataProvider.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Interfaces/ScatterChartDataProvider.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Components/IMarker.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Utils/ViewPortHandler.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Utils/Transformer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/Renderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/LegendRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/BarLineScatterCandleBubbleRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/Scatter/IShapeRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/Scatter/XShapeRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/Scatter/CircleShapeRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/Scatter/TriangleShapeRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/Scatter/SquareShapeRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/Scatter/ChevronDownShapeRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/Scatter/ChevronUpShapeRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/Scatter/CrossShapeRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/LineScatterCandleRadarRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/LineRadarRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/XAxisRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/YAxisRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/CombinedChartRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/PieChartRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/BubbleChartRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/LineChartRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/CandleStickChartRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/BarChartRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/HorizontalBarChartRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/RadarChartRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/ScatterChartRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Highlight/IHighlighter.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Highlight/CombinedHighlighter.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Highlight/PieHighlighter.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Highlight/BarHighlighter.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Highlight/HorizontalBarHighlighter.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Highlight/RadarHighlighter.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Highlight/PieRadarHighlighter.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Highlight/ChartHighlighter.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Formatters/IValueFormatter.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Formatters/IAxisValueFormatter.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Formatters/DefaultAxisValueFormatter.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Formatters/IndexAxisValueFormatter.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Formatters/DefaultValueFormatter.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Formatters/IFillFormatter.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Formatters/DefaultFillFormatter.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Animation/Animator.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Filters/DataApproximator.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Utils/ChartColorTemplates.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Components/XAxis.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Components/YAxis.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Utils/ChartUtils.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/ChartBaseDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/ChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Interfaces/IChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/PieChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Interfaces/IPieChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/BubbleChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Interfaces/IBubbleChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/BarLineScatterCandleBubbleChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Interfaces/IBarLineScatterCandleBubbleChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/CandleChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Interfaces/ICandleChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/LineChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Interfaces/ILineChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/BarChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Interfaces/IBarChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/RadarChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Interfaces/IRadarChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/LineScatterCandleRadarChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Interfaces/ILineScatterCandleRadarChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/LineRadarChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Interfaces/ILineRadarChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/ScatterChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Interfaces/IScatterChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Highlight/Highlight.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Utils/TransformerHorizontalBarChart.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/XAxisRendererHorizontalBarChart.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/YAxisRendererHorizontalBarChart.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/XAxisRendererRadarChart.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/YAxisRendererRadarChart.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Components/MarkerView.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Charts/CombinedChartView.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Charts/PieChartView.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Charts/BubbleChartView.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Charts/LineChartView.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Charts/CandleStickChartView.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Charts/BarChartView.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Charts/HorizontalBarChartView.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Charts/RadarChartView.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Charts/ScatterChartView.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/ChartDataEntry.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/PieChartDataEntry.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/BubbleChartDataEntry.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/CandleChartDataEntry.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/BarChartDataEntry.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/RadarChartDataEntry.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Components/LegendEntry.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/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/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/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/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/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Supporting\ Files/Charts.h /Users/hannh/Documents/MyGitHub/ChartsTest2/Build/Intermediates/Charts.build/Debug-iphonesimulator/Charts.build/unextended-module.modulemap /Users/hannh/Documents/MyGitHub/ChartsTest2/Build/Intermediates/Charts.build/Debug-iphonesimulator/Charts.build/Objects-normal/x86_64/IPieChartDataSet~partial.swiftdoc : /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/ChartData.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/CombinedChartData.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/PieChartData.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/BubbleChartData.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/BarLineScatterCandleBubbleChartData.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/CandleChartData.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/LineChartData.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/BarChartData.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/RadarChartData.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/ScatterChartData.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Jobs/ViewPortJob.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Jobs/AnimatedViewPortJob.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Jobs/MoveViewJob.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Jobs/AnimatedMoveViewJob.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Jobs/ZoomViewJob.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Jobs/AnimatedZoomViewJob.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Components/Legend.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Components/MarkerImage.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Highlight/Range.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Components/ChartLimitLine.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/ChartDataRendererBase.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/AxisRendererBase.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Components/AxisBase.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Components/ComponentBase.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Charts/ChartViewBase.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Charts/BarLineChartViewBase.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Charts/PieRadarChartViewBase.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/ChartDataEntryBase.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Animation/ChartAnimationEasing.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Utils/Fill.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Utils/Platform.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Components/Description.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Interfaces/ChartDataProvider.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Interfaces/CombinedChartDataProvider.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Interfaces/BubbleChartDataProvider.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Interfaces/BarLineScatterCandleBubbleChartDataProvider.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Interfaces/CandleChartDataProvider.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Interfaces/LineChartDataProvider.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Interfaces/BarChartDataProvider.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Interfaces/ScatterChartDataProvider.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Components/IMarker.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Utils/ViewPortHandler.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Utils/Transformer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/Renderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/LegendRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/BarLineScatterCandleBubbleRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/Scatter/IShapeRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/Scatter/XShapeRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/Scatter/CircleShapeRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/Scatter/TriangleShapeRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/Scatter/SquareShapeRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/Scatter/ChevronDownShapeRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/Scatter/ChevronUpShapeRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/Scatter/CrossShapeRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/LineScatterCandleRadarRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/LineRadarRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/XAxisRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/YAxisRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/CombinedChartRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/PieChartRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/BubbleChartRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/LineChartRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/CandleStickChartRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/BarChartRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/HorizontalBarChartRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/RadarChartRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/ScatterChartRenderer.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Highlight/IHighlighter.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Highlight/CombinedHighlighter.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Highlight/PieHighlighter.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Highlight/BarHighlighter.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Highlight/HorizontalBarHighlighter.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Highlight/RadarHighlighter.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Highlight/PieRadarHighlighter.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Highlight/ChartHighlighter.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Formatters/IValueFormatter.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Formatters/IAxisValueFormatter.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Formatters/DefaultAxisValueFormatter.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Formatters/IndexAxisValueFormatter.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Formatters/DefaultValueFormatter.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Formatters/IFillFormatter.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Formatters/DefaultFillFormatter.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Animation/Animator.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Filters/DataApproximator.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Utils/ChartColorTemplates.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Components/XAxis.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Components/YAxis.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Utils/ChartUtils.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/ChartBaseDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/ChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Interfaces/IChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/PieChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Interfaces/IPieChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/BubbleChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Interfaces/IBubbleChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/BarLineScatterCandleBubbleChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Interfaces/IBarLineScatterCandleBubbleChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/CandleChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Interfaces/ICandleChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/LineChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Interfaces/ILineChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/BarChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Interfaces/IBarChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/RadarChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Interfaces/IRadarChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/LineScatterCandleRadarChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Interfaces/ILineScatterCandleRadarChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/LineRadarChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Interfaces/ILineRadarChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/ScatterChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Interfaces/IScatterChartDataSet.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Highlight/Highlight.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Utils/TransformerHorizontalBarChart.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/XAxisRendererHorizontalBarChart.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/YAxisRendererHorizontalBarChart.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/XAxisRendererRadarChart.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Renderers/YAxisRendererRadarChart.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Components/MarkerView.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Charts/CombinedChartView.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Charts/PieChartView.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Charts/BubbleChartView.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Charts/LineChartView.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Charts/CandleStickChartView.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Charts/BarChartView.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Charts/HorizontalBarChartView.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Charts/RadarChartView.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Charts/ScatterChartView.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/ChartDataEntry.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/PieChartDataEntry.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/BubbleChartDataEntry.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/CandleChartDataEntry.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/BarChartDataEntry.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Data/Implementations/Standard/RadarChartDataEntry.swift /Users/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Charts/Components/LegendEntry.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/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/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/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/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/hannh/Documents/MyGitHub/ChartsTest2/Charts/Source/Supporting\ Files/Charts.h /Users/hannh/Documents/MyGitHub/ChartsTest2/Build/Intermediates/Charts.build/Debug-iphonesimulator/Charts.build/unextended-module.modulemap
D
instance BDT_1098_Addon_Snaf (Npc_Default) { // ------ NSC ------ name = "Snaf"; guild = GIL_BDT; id = 1098; voice = 1; flags = 0; npctype = NPCTYPE_MAIN; // ------ Attribute ------ B_SetAttributesToChapter (self, 4); // ------ Kampf-Taktik ------ fight_tactic = FAI_HUMAN_NORMAL; // ------ Equippte Waffen ------ EquipItem (self, ItMw_1h_Sld_Sword); // ------ Inventory ------ B_CreateAmbientInv (self); CreateInvItems (self,ItFo_Addon_LousHammer,1); // ------ visuals ------ B_SetNpcVisual (self, MALE, "Hum_Head_Fighter", Face_N_Snaf, BodyTex_N, ITAR_BARKEEPER); Mdl_SetModelFatness (self, 2); Mdl_ApplyOverlayMds (self, "Humans_Relaxed.mds"); // ------ NSC-relevante Talente vergeben ------ B_GiveNpcTalents (self); // ------ Kampf-Talente ------ B_SetFightSkills (self, 65); // ------ TA anmelden ------ daily_routine = Rtn_Start_1098; }; FUNC VOID Rtn_Start_1098 () { TA_Stand_Sweeping (07,00,10,00,"BL_INN_BAR_02"); TA_Stand_WP (10,00,15,00,"BL_INN_BAR_05"); TA_Cook_Cauldron (15,00,21,00,"BL_INN_BAR_05"); TA_Stand_WP (21,00,07,00,"BL_INN_BAR_05"); };
D
module android.java.android.hardware.SensorEventCallback_d_interface; import arsd.jni : IJavaObjectImplementation, JavaPackageId, JavaName, IJavaObject, ImportExportImpl, JavaInterfaceMembers; static import arsd.jni; import import0 = android.java.android.hardware.SensorEvent_d_interface; import import1 = android.java.android.hardware.Sensor_d_interface; import import2 = android.java.android.hardware.SensorAdditionalInfo_d_interface; import import3 = android.java.java.lang.Class_d_interface; final class SensorEventCallback : IJavaObject { static immutable string[] _d_canCastTo = [ "android/hardware/SensorEventListener2", ]; @Import this(arsd.jni.Default); @Import void onSensorChanged(import0.SensorEvent); @Import void onAccuracyChanged(import1.Sensor, int); @Import void onFlushCompleted(import1.Sensor); @Import void onSensorAdditionalInfo(import2.SensorAdditionalInfo); @Import import3.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/hardware/SensorEventCallback;"; }
D
/** Command-line options */ module dpp.runtime.options; @safe: version(Windows) enum exeExtension = ".exe"; else enum exeExtension = ""; struct Options { enum usage = "Usage: d++ [options] [D compiler options] <filename.dpp> [D compiler args]"; string[] dppFileNames; int indentation; bool debugOutput; string[] includePaths; bool keepPreCppFiles; bool keepDlangFiles; bool parseAsCpp; bool preprocessOnly; string dlangCompiler = "dmd"; string[] dlangCompilerArgs; string[] defines; bool earlyExit; bool hardFail; bool cppStdLib; bool ignoreMacros; bool detailedUntranslatable; string[] ignoredNamespaces; string[] ignoredCursors; bool ignoreSystemPaths; string[] ignoredPaths; string[string] prebuiltHeaders; bool alwaysScopedEnums; string cppStandard = "c++17"; string[] clangOptions; bool noSystemHeaders; string cppPath; this(string[] args) { import clang: systemPaths; import std.exception: enforce; import std.path: stripExtension, extension, buildPath, absolutePath; import std.file: tempDir; import std.algorithm: map, filter, canFind, startsWith; import std.array: array; import std.conv: text; parseArgs(args); if(earlyExit) return; if(preprocessOnly) keepDlangFiles = true; dppFileNames = args.filter!(a => a.extension == ".dpp").array; enforce(dppFileNames.length != 0, "No .dpp input file specified\n" ~ usage); // Remove the name of this binary and the name of the .dpp input file from args // so that a D compiler can use the remaining entries. dlangCompilerArgs = args[1..$].filter!(a => a.extension != ".dpp").array ~ dFileNames; // if no -of option is given, default to the name of the .dpp file if(!dlangCompilerArgs.canFind!(a => a.startsWith("-of")) && !dlangCompilerArgs.canFind("-c")) dlangCompilerArgs ~= "-of" ~ args. filter!(a => a.extension == ".dpp" || a.extension == ".d") .front .stripExtension ~ exeExtension; version(Windows) assert(!cppStdLib, "C++ std lib functionality not implemented yet for Windows"); if(cppStdLib) { dlangCompilerArgs ~= "-L-lstdc++"; parseAsCpp = true; } if (!noSystemHeaders) includePaths = systemPaths ~ includePaths; } string[] dFileNames() @safe pure const { import std.algorithm: map; import std.array: array; return dppFileNames.map!toDFileName.array; } static string toDFileName(in string dppFileName) @safe pure nothrow { import std.path: stripExtension; return dppFileName.stripExtension ~ ".d"; } private void parseArgs(ref string[] args) { import std.getopt: getopt, defaultGetoptPrinter, config; import std.algorithm : map; import std.array : split, join; auto helpInfo = getopt( args, config.passThrough, "print-cursors", "Print debug information", &debugOutput, "include-path", "Include paths", &includePaths, "keep-pre-cpp-files", "Do not delete the temporary pre-preprocessed file", &keepPreCppFiles, "keep-d-files", "Do not delete the temporary D file to be compiled", &keepDlangFiles, "preprocess-only", "Only transform the .dpp file into a .d file, don't compile", &preprocessOnly, "compiler", "D compiler to use", &dlangCompiler, "parse-as-cpp", "Parse header as C++", &parseAsCpp, "define", "C Preprocessor macro", &defines, "hard-fail", "Translate nothing if any part fails", &hardFail, "c++-std-lib", "Link to the C++ standard library", &cppStdLib, "ignore-macros", "Ignore preprocessor macros", &ignoreMacros, "ignore-ns", "Ignore a C++ namespace", &ignoredNamespaces, "ignore-cursor", "Ignore a C++ cursor", &ignoredCursors, "ignore-path", "Ignore a file path, note it globs so you will want to use *", &ignoredPaths, "ignore-system-paths", "Adds system paths to the ignore-paths list (you can add them back individually with --include-path)", &ignoreSystemPaths, "prebuilt-header", "Declare a #include can be safely replaced with import. You should also ignore-path to prevent retranslating the file", &prebuiltHeaders, "detailed-untranslatables", "Show details about untranslatable cursors", &detailedUntranslatable, "scoped-enums", "Don't redeclare enums to mimic C", &alwaysScopedEnums, "c++-standard", "The C++ language standard (e.g. \"c++14\")", &cppStandard, "clang-option", "Pass option to libclang", &clangOptions, "no-sys-headers", "Don't include system headers by default", &noSystemHeaders, "cpp-path", "Path to the C preprocessor executable", &cppPath, ); clangOptions = map!(e => e.split(" "))(clangOptions).join(); if(helpInfo.helpWanted) { () @trusted { defaultGetoptPrinter(usage, helpInfo.options); }(); earlyExit = true; } if(ignoreSystemPaths) { import clang: systemPaths; import std.algorithm: filter, canFind; foreach(sp; systemPaths.filter!(p => !includePaths.canFind(p))) ignoredPaths ~= sp ~ "*"; } } void indent() @safe pure nothrow { indentation += 4; } Options dup() @safe pure nothrow const { Options ret; foreach(i, ref elt; ret.tupleof) { static if(__traits(compiles, this.tupleof[i].dup)) elt = this.tupleof[i].dup; else static if(is(typeof(this.tupleof[i]) == const(K[V]), K, V)) { try // surprised looping over the AA is not nothrow but meh foreach(k, v; this.tupleof[i]) elt[k] = v; catch(Exception) assert(0); } else elt = this.tupleof[i]; } ret.includePaths = includePaths.dup; ret.defines = defines.dup; return ret; } void log(T...)(auto ref T args) @trusted const { version(unittest) import unit_threaded.io: writeln = writelnUt; else import std.stdio: writeln; version(unittest) enum shouldLog = true; else const shouldLog = debugOutput; if(shouldLog) writeln(indentationString, args); } private auto indentationString() @safe pure nothrow const { import std.array: appender; auto app = appender!(char[]); app.reserve(indentation); foreach(i; 0 .. indentation) app ~= " "; return app.data; } }
D
func void ZS_AidanUEq () { //PrintDebugNpc (PD_ZS_FRAME,"ZS_AidanEq"); B_SetPerception (self); AI_SetWalkmode (self,NPC_WALK); AI_GotoWP (self, self.wp); AI_AlignToWP (self); Mdl_SetVisualBody (self,"hum_body_Naked0",0, 2,"Hum_Head_Fighter", 9, 1, ORG_ARMOR_M); EquipItem (self, ItMw_1H_Mace_05); Npc_RemoveInvItem (self,ItMw_1H_Sledgehammer_01); }; func int ZS_AidanUEq_Loop () { }; func void ZS_AidanUEq_End () { //PrintDebugNpc (PD_ZS_FRAME, "ZS_AidanUEq_End" ); };
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_12_agm-6199817114.notation#_copSALmGEeKQQp7P9cQvNQ"/> </availablePage> </pageList> <sashModel currentSelection="//@sashModel/@windows.0/@children.0"> <windows> <children xsi:type="di:TabFolder"> <children> <emfPageIdentifier href="VAR_12_agm-6199817114.notation#_copSALmGEeKQQp7P9cQvNQ"/> </children> </children> </windows> </sashModel> </di:SashWindowsMngr>
D
/Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/DerivedData/NetflixRoulette/Build/Intermediates.noindex/NetflixRoulette.build/Debug-iphonesimulator/NetflixRoulette.build/Objects-normal/x86_64/FavsMovieServices.o : /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/NetflixRoulette/Media.swift /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/NetflixRoulette/MovieDesc.swift /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/NetflixRoulette/services/MovieService.swift /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/NetflixRoulette/services/UserService.swift /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/NetflixRoulette/AppDelegate.swift /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/NetflixRoulette/controllers/MovieSearchTableViewCell.swift /Users/ramzy/Desktop/JAVA\ /MovieCollectionViewCell.swift /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/NetflixRoulette/controllers/ShuffleViewController.swift /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/NetflixRoulette/controllers/HomeViewController.swift /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/NetflixRoulette/controllers/FavoriteViewController.swift /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/NetflixRoulette/controllers/SearchViewController.swift /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/NetflixRoulette/controllers/AcceuilViewController.swift /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/NetflixRoulette/controllers/MainViewController.swift /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/NetflixRoulette/controllers/ItemDescriptionViewController.swift /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/NetflixRoulette/controllers/CreateAccountViewController.swift /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/NetflixRoulette/controllers/ShuffleResultListViewController.swift /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/NetflixRoulette/User.swift /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/NetflixRoulette/services/FavsMovieServices.swift /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/NetflixRoulette/Show.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/DerivedData/NetflixRoulette/Build/Products/Debug-iphonesimulator/AlamofireImage/AlamofireImage.framework/Modules/AlamofireImage.swiftmodule/x86_64.swiftmodule /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/DerivedData/NetflixRoulette/Build/Products/Debug-iphonesimulator/Alamofire/Alamofire.framework/Modules/Alamofire.swiftmodule/x86_64.swiftmodule /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/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/DerivedData/NetflixRoulette/Build/Products/Debug-iphonesimulator/AlamofireImage/AlamofireImage.framework/Headers/AlamofireImage-umbrella.h /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/DerivedData/NetflixRoulette/Build/Products/Debug-iphonesimulator/Alamofire/Alamofire.framework/Headers/Alamofire-umbrella.h /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/DerivedData/NetflixRoulette/Build/Products/Debug-iphonesimulator/AlamofireImage/AlamofireImage.framework/Headers/AlamofireImage-Swift.h /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/DerivedData/NetflixRoulette/Build/Products/Debug-iphonesimulator/Alamofire/Alamofire.framework/Headers/Alamofire-Swift.h /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/DerivedData/NetflixRoulette/Build/Products/Debug-iphonesimulator/AlamofireImage/AlamofireImage.framework/Modules/module.modulemap /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/DerivedData/NetflixRoulette/Build/Products/Debug-iphonesimulator/Alamofire/Alamofire.framework/Modules/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/DerivedData/NetflixRoulette/Build/Intermediates.noindex/NetflixRoulette.build/Debug-iphonesimulator/NetflixRoulette.build/Objects-normal/x86_64/FavsMovieServices~partial.swiftmodule : /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/NetflixRoulette/Media.swift /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/NetflixRoulette/MovieDesc.swift /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/NetflixRoulette/services/MovieService.swift /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/NetflixRoulette/services/UserService.swift /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/NetflixRoulette/AppDelegate.swift /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/NetflixRoulette/controllers/MovieSearchTableViewCell.swift /Users/ramzy/Desktop/JAVA\ /MovieCollectionViewCell.swift /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/NetflixRoulette/controllers/ShuffleViewController.swift /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/NetflixRoulette/controllers/HomeViewController.swift /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/NetflixRoulette/controllers/FavoriteViewController.swift /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/NetflixRoulette/controllers/SearchViewController.swift /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/NetflixRoulette/controllers/AcceuilViewController.swift /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/NetflixRoulette/controllers/MainViewController.swift /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/NetflixRoulette/controllers/ItemDescriptionViewController.swift /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/NetflixRoulette/controllers/CreateAccountViewController.swift /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/NetflixRoulette/controllers/ShuffleResultListViewController.swift /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/NetflixRoulette/User.swift /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/NetflixRoulette/services/FavsMovieServices.swift /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/NetflixRoulette/Show.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/DerivedData/NetflixRoulette/Build/Products/Debug-iphonesimulator/AlamofireImage/AlamofireImage.framework/Modules/AlamofireImage.swiftmodule/x86_64.swiftmodule /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/DerivedData/NetflixRoulette/Build/Products/Debug-iphonesimulator/Alamofire/Alamofire.framework/Modules/Alamofire.swiftmodule/x86_64.swiftmodule /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/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/DerivedData/NetflixRoulette/Build/Products/Debug-iphonesimulator/AlamofireImage/AlamofireImage.framework/Headers/AlamofireImage-umbrella.h /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/DerivedData/NetflixRoulette/Build/Products/Debug-iphonesimulator/Alamofire/Alamofire.framework/Headers/Alamofire-umbrella.h /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/DerivedData/NetflixRoulette/Build/Products/Debug-iphonesimulator/AlamofireImage/AlamofireImage.framework/Headers/AlamofireImage-Swift.h /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/DerivedData/NetflixRoulette/Build/Products/Debug-iphonesimulator/Alamofire/Alamofire.framework/Headers/Alamofire-Swift.h /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/DerivedData/NetflixRoulette/Build/Products/Debug-iphonesimulator/AlamofireImage/AlamofireImage.framework/Modules/module.modulemap /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/DerivedData/NetflixRoulette/Build/Products/Debug-iphonesimulator/Alamofire/Alamofire.framework/Modules/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/DerivedData/NetflixRoulette/Build/Intermediates.noindex/NetflixRoulette.build/Debug-iphonesimulator/NetflixRoulette.build/Objects-normal/x86_64/FavsMovieServices~partial.swiftdoc : /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/NetflixRoulette/Media.swift /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/NetflixRoulette/MovieDesc.swift /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/NetflixRoulette/services/MovieService.swift /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/NetflixRoulette/services/UserService.swift /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/NetflixRoulette/AppDelegate.swift /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/NetflixRoulette/controllers/MovieSearchTableViewCell.swift /Users/ramzy/Desktop/JAVA\ /MovieCollectionViewCell.swift /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/NetflixRoulette/controllers/ShuffleViewController.swift /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/NetflixRoulette/controllers/HomeViewController.swift /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/NetflixRoulette/controllers/FavoriteViewController.swift /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/NetflixRoulette/controllers/SearchViewController.swift /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/NetflixRoulette/controllers/AcceuilViewController.swift /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/NetflixRoulette/controllers/MainViewController.swift /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/NetflixRoulette/controllers/ItemDescriptionViewController.swift /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/NetflixRoulette/controllers/CreateAccountViewController.swift /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/NetflixRoulette/controllers/ShuffleResultListViewController.swift /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/NetflixRoulette/User.swift /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/NetflixRoulette/services/FavsMovieServices.swift /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/NetflixRoulette/Show.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/DerivedData/NetflixRoulette/Build/Products/Debug-iphonesimulator/AlamofireImage/AlamofireImage.framework/Modules/AlamofireImage.swiftmodule/x86_64.swiftmodule /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/DerivedData/NetflixRoulette/Build/Products/Debug-iphonesimulator/Alamofire/Alamofire.framework/Modules/Alamofire.swiftmodule/x86_64.swiftmodule /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/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/DerivedData/NetflixRoulette/Build/Products/Debug-iphonesimulator/AlamofireImage/AlamofireImage.framework/Headers/AlamofireImage-umbrella.h /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/DerivedData/NetflixRoulette/Build/Products/Debug-iphonesimulator/Alamofire/Alamofire.framework/Headers/Alamofire-umbrella.h /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/DerivedData/NetflixRoulette/Build/Products/Debug-iphonesimulator/AlamofireImage/AlamofireImage.framework/Headers/AlamofireImage-Swift.h /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/DerivedData/NetflixRoulette/Build/Products/Debug-iphonesimulator/Alamofire/Alamofire.framework/Headers/Alamofire-Swift.h /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/DerivedData/NetflixRoulette/Build/Products/Debug-iphonesimulator/AlamofireImage/AlamofireImage.framework/Modules/module.modulemap /Users/ramzy/Desktop/swift/Netflix_Roulette_Repo_V1_Final/netflix-roulette/DerivedData/NetflixRoulette/Build/Products/Debug-iphonesimulator/Alamofire/Alamofire.framework/Modules/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
D
/// module nanogui.window; /* nanogui/window.d -- Top-level window widget NanoGUI was developed by Wenzel Jakob <wenzel.jakob@epfl.ch>. The widget drawing code is based on the NanoVG demo application by Mikko Mononen. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE.txt file. */ import nanogui.widget; import nanogui.common : Vector2i, Vector2f, MouseButton; /** * Top-level window widget. */ class Window : Widget { public: this(Widget parent, string title = "Untitled", bool resizable = false) { super(parent); mTitle = title; mButtonPanel = null; mModal = false; mDrag = false; mResizeDir = Vector2i(); import std.algorithm : max; mMinSize = Vector2i(3*mTheme.mResizeAreaOffset, max(3*mTheme.mResizeAreaOffset, mTheme.mWindowHeaderHeight + mTheme.mResizeAreaOffset)); mResizable = resizable; } /// Return the window title final string title() const { return mTitle; } /// Set the window title final void title(string title) { mTitle = title; } /// Is this a model dialog? final bool modal() const { return mModal; } /// Set whether or not this is a modal dialog final void modal(bool modal) { mModal = modal; } /// Is this a resizable window? bool resizable() const { return mResizable; } /// Set whether or not this window is resizable void resizable(bool value) { mResizable = value; } /// Return the panel used to house window buttons final Widget buttonPanel() { import nanogui.layout : BoxLayout, Orientation, Alignment; if (!mButtonPanel) { mButtonPanel = new Widget(this); mButtonPanel.layout(new BoxLayout(Orientation.Horizontal, Alignment.Middle, 0, 4)); } return mButtonPanel; } /// Dispose the window final void dispose(); /// Center the window in the current `Screen` final void center(); /// Draw the window override void draw(ref NanoContext ctx) { assert (mTheme); int ds = mTheme.mWindowDropShadowSize, cr = mTheme.mWindowCornerRadius; int hh = mTheme.mWindowHeaderHeight; /* Draw window */ ctx.save; ctx.beginPath; ctx.roundedRect(mPos.x, mPos.y, mSize.x, mSize.y, cr); ctx.fillColor(mMouseFocus ? mTheme.mWindowFillFocused : mTheme.mWindowFillUnfocused); ctx.fill; /* Draw a drop shadow */ NVGPaint shadowPaint = ctx.boxGradient( mPos.x, mPos.y, mSize.x, mSize.y, cr*2, ds*2, mTheme.mDropShadow, mTheme.mTransparent); ctx.save; ctx.resetScissor; ctx.beginPath; ctx.rect(mPos.x-ds,mPos.y-ds, mSize.x+2*ds, mSize.y+2*ds); ctx.roundedRect(mPos.x, mPos.y, mSize.x, mSize.y, cr); ctx.pathWinding(NVGSolidity.Hole); ctx.fillPaint(shadowPaint); ctx.fill; ctx.restore; if (mTitle.length) { /* Draw header */ NVGPaint headerPaint = ctx.linearGradient( mPos.x, mPos.y, mPos.x, mPos.y + hh, mTheme.mWindowHeaderGradientTop, mTheme.mWindowHeaderGradientBot); ctx.beginPath; ctx.roundedRect(mPos.x, mPos.y, mSize.x, hh, cr); ctx.fillPaint(headerPaint); ctx.fill; ctx.beginPath; ctx.roundedRect(mPos.x, mPos.y, mSize.x, hh, cr); ctx.strokeColor(mTheme.mWindowHeaderSepTop); ctx.save; ctx.intersectScissor(mPos.x, mPos.y, mSize.x, 0.5f); ctx.stroke; ctx.restore; ctx.beginPath; ctx.moveTo(mPos.x + 0.5f, mPos.y + hh - 1.5f); ctx.lineTo(mPos.x + mSize.x - 0.5f, mPos.y + hh - 1.5); ctx.strokeColor(mTheme.mWindowHeaderSepBot); ctx.stroke; ctx.fontSize(18.0f); ctx.fontFace("sans-bold"); auto algn = NVGTextAlign(); algn.center = true; algn.middle = true; ctx.textAlign(algn); ctx.fontBlur(2); ctx.fillColor(mTheme.mDropShadow); ctx.text(mPos.x + mSize.x / 2, mPos.y + hh / 2, mTitle); ctx.fontBlur(0); ctx.fillColor(mFocused ? mTheme.mWindowTitleFocused : mTheme.mWindowTitleUnfocused); ctx.text(mPos.x + mSize.x / 2, mPos.y + hh / 2 - 1, mTitle); } ctx.restore; const old = ctx.mouse; if (window.contains(ctx.mouse)) ctx.mouse -= window.absolutePosition; else ctx.mouse = Vector2i(-1, -1); scope(exit) ctx.mouse = old; Widget.draw(ctx); } /// Handle window drag events override bool mouseDragEvent(Vector2i p, Vector2i rel, MouseButton button, int modifiers) { import std.algorithm : min, max; import gfm.math : maxByElem; if (mDrag && (button & (1 << MouseButton.Left)) != 0) { mPos += rel; { // mPos = mPos.cwiseMax(Vector2i::Zero()); mPos[0] = max(mPos[0], 0); mPos[1] = max(mPos[1], 0); } { // mPos = mPos.cwiseMin(parent()->size() - mSize); auto other = parent.size - mSize; mPos[0] = min(mPos[0], other[0]); mPos[1] = min(mPos[1], other[1]); } return true; } else if (mResizable && mResize && (button & (1 << MouseButton.Left)) != 0) { const lowerRightCorner = mPos + mSize; const upperLeftCorner = mPos; bool resized = false; if (mResizeDir.x == 1) { if ((rel.x > 0 && p.x >= lowerRightCorner.x) || (rel.x < 0)) { mSize.x += rel.x; resized = true; } } else if (mResizeDir.x == -1) { if ((rel.x < 0 && p.x <= upperLeftCorner.x) || (rel.x > 0)) { mSize.x += -rel.x; mSize = mSize.maxByElem(mMinSize); mPos = lowerRightCorner - mSize; resized = true; } } if (mResizeDir.y == 1) { if ((rel.y > 0 && p.y >= lowerRightCorner.y) || (rel.y < 0)) { mSize.y += rel.y; resized = true; } } mSize = mSize.maxByElem(mMinSize); if (resized) screen.needToPerfomLayout = true; return true; } return false; } /// Handle a mouse motion event (default implementation: propagate to children) override bool mouseMotionEvent(const Vector2i p, const Vector2i rel, MouseButton button, int modifiers) { import nanogui.common : Cursor; if (Widget.mouseMotionEvent(p, rel, button, modifiers)) return true; if (mResizable && mFixedSize.x == 0 && checkHorizontalResize(p) != 0) { mCursor = Cursor.HResize; } else if (mResizable && mFixedSize.y == 0 && checkVerticalResize(p) != 0) { mCursor = Cursor.VResize; } else { mCursor = Cursor.Arrow; } return false; } /// Handle mouse events recursively and bring the current window to the top override bool mouseButtonEvent(Vector2i p, MouseButton button, bool down, int modifiers) { if (super.mouseButtonEvent(p, button, down, modifiers)) return true; if (button == MouseButton.Left) { mDrag = down && (p.y - mPos.y) < mTheme.mWindowHeaderHeight; mResize = false; if (mResizable && !mDrag && down) { mResizeDir.x = (mFixedSize.x == 0) ? checkHorizontalResize(p) : 0; mResizeDir.y = (mFixedSize.y == 0) ? checkVerticalResize(p) : 0; mResize = mResizeDir.x != 0 || mResizeDir.y != 0; } return true; } return false; } /// Accept scroll events and propagate them to the widget under the mouse cursor override bool scrollEvent(Vector2i p, Vector2f rel) { Widget.scrollEvent(p, rel); return true; } /// Compute the preferred size of the widget override Vector2i preferredSize(NanoContext ctx) const { if (mResizable) return mSize; Vector2i result = Widget.preferredSize(ctx, mButtonPanel); ctx.fontSize(18.0f); ctx.fontFace("sans-bold"); float[4] bounds; ctx.textBounds(0, 0, mTitle, bounds); if (result.x < bounds[2]-bounds[0] + 20) result.x = cast(int) (bounds[2]-bounds[0] + 20); if (result.y < bounds[3]-bounds[1]) result.y = cast(int) (bounds[3]-bounds[1]); return result; } /// Invoke the associated layout generator to properly place child widgets, if any override void performLayout(NanoContext ctx) { if (!mButtonPanel) { Widget.performLayout(ctx); } else { mButtonPanel.visible(false); Widget.performLayout(ctx); foreach (w; mButtonPanel.children) { w.fixedSize(Vector2i(22, 22)); w.fontSize(15); } mButtonPanel.visible(true); mButtonPanel.size(Vector2i(width(), 22)); mButtonPanel.position(Vector2i(width() - (mButtonPanel.preferredSize(ctx).x + 5), 3)); mButtonPanel.performLayout(ctx); } } //override void save(Serializer &s) const; //override bool load(Serializer &s); public: /// Internal helper function to maintain nested window position values; overridden in \ref Popup void refreshRelativePlacement() { /* Overridden in \ref Popup */ } protected: int checkHorizontalResize(const Vector2i mousePos) { const offset = mTheme.mResizeAreaOffset; const lowerRightCorner = absolutePosition + size; const headerLowerLeftCornerY = absolutePosition.y + mTheme.mWindowHeaderHeight; if (mousePos.y > headerLowerLeftCornerY && mousePos.x <= absolutePosition.x + offset && mousePos.x >= absolutePosition.x) { return -1; } else if (mousePos.y > headerLowerLeftCornerY && mousePos.x >= lowerRightCorner.x - offset && mousePos.x <= lowerRightCorner.x) { return 1; } return 0; } int checkVerticalResize(const Vector2i mousePos) { const offset = mTheme.mResizeAreaOffset; const lowerRightCorner = absolutePosition + size; // Do not check for resize area on top of the window. It is to prevent conflict drag and resize event. if (mousePos.y >= lowerRightCorner.y - offset && mousePos.y <= lowerRightCorner.y) { return 1; } return 0; } string mTitle; Widget mButtonPanel; bool mModal; bool mDrag; bool mResize; Vector2i mResizeDir; Vector2i mMinSize; bool mResizable; }
D
# FIXED DSPLIB/DSPF_sp_vecmul.obj: C:/ti/dsplib_c674x_3_4_0_0/packages/ti/dsplib/src/DSPF_sp_vecmul/c674/DSPF_sp_vecmul.c DSPLIB/DSPF_sp_vecmul.obj: C:/ti/dsplib_c674x_3_4_0_0/packages/ti/dsplib/src/DSPF_sp_vecmul/c674/DSPF_sp_vecmul.h C:/ti/dsplib_c674x_3_4_0_0/packages/ti/dsplib/src/DSPF_sp_vecmul/c674/DSPF_sp_vecmul.c: C:/ti/dsplib_c674x_3_4_0_0/packages/ti/dsplib/src/DSPF_sp_vecmul/c674/DSPF_sp_vecmul.h:
D
module units.wolf; import std.math; import std.exception; import std.stdio; import std.string; import allegro5.allegro; import allegro5.allegro_primitives; import general; import units.unit; import world; class Wolf: Unit { mixin UnitBoilerplate !("data/wolf.png"); immutable static double VISION_LIGHT = 80.0; immutable static double VISION_HERO = 100.0; static this () { KIND = 0; RADIUS = 20.0; SPEED = 1.5; immutable double COLOR_R = 0.3; immutable double COLOR_G = 0.2; immutable double COLOR_B = 0.2; MAIN_COLOR = al_map_rgba_f (COLOR_R, COLOR_G, COLOR_B, 1.0); immutable double COLOR_MULT = 0.2; TINT_COLOR = al_map_rgba_f (COLOR_R * COLOR_MULT, COLOR_G * COLOR_MULT, COLOR_B * COLOR_MULT, COLOR_MULT); } this (double new_x, double new_y, double new_direction) { x = new_x; y = new_y; direction = new_direction; } override double tint_radius () @property { return VISION_HERO + RADIUS; } double vision_light () @property { return VISION_LIGHT; } double vision_hero () @property { return VISION_HERO; } int select_target () { double cur_dist = MUCH; int res = NA; foreach (i, unit; world.units) { if ((unit !is null) && (unit.kind & Unit.Kind.LIGHT) && (dist_to (unit) < vision_light + radius + unit.radius)) { if (cur_dist > dist_to (unit)) { cur_dist = dist_to (unit); res = i; } } } if (res != NA) { return res; } foreach (i, unit; world.units) { if ((unit !is null) && (unit.kind & Unit.Kind.HERO) && (dist_to (unit) < vision_hero + radius + unit.radius)) { if (cur_dist > dist_to (unit)) { cur_dist = dist_to (unit); res = i; } } } return res; } override void act () { int target = select_target (); if (target != NA) { double mult; if (world.units[target].kind & Unit.Kind.HERO) { mult = 1.0; } else { mult = -0.5; } move_to (world.units[target], mult); } } override void resolve_collision (Unit other, bool is_active) { if (other.kind & Unit.Kind.HERO) { world.is_lost = true; world.is_finished = true; } } }
D
/* * $Id: LetterRender.d,v 1.3 2004/01/01 11:26:42 kenta Exp $ * * Copyright 2003 Kenta Cho. All rights reserved. */ module abagames.p47.LetterRender; private: import opengl; import abagames.util.sdl.Screen3D; import abagames.p47.P47Screen; /** * Letters' renderer. */ public class LetterRender { public: static int displayListIdx; static int colorIdx = 0; private: public enum { WHITE, RED } public static void changeColor(int c) { colorIdx = c * LETTER_NUM; } private static void drawLetter(int n, float x, float y, float s, float d) { glPushMatrix(); glTranslatef(x, y, 0); glScalef(s, s, s); glRotatef(d, 0, 0, 1); glCallList(displayListIdx + n + colorIdx); glPopMatrix(); } public enum { TO_RIGHT, TO_DOWN, TO_LEFT, TO_UP, } public static void drawString(const char[] str, float lx, float y, float s, int d) { float x = lx; int c; int idx; float ld; switch (d) { case TO_RIGHT: ld = 0; break; case TO_DOWN: ld = 90; break; case TO_LEFT: ld = 180; break; case TO_UP: ld = 270; break; default: break; } for (int i = 0; i < str.length; i++) { c = str[i]; if (c != ' ') { if (c >= '0' && c <='9') { idx = c - '0'; } else if (c >= 'A' && c <= 'Z') { idx = c - 'A' + 10; } else if (c >= 'a' && c <= 'z') { idx = c - 'a' + 10; } else if (c == '.') { idx = 36; } else if (c == '-') { idx = 38; } else if (c == '+') { idx = 39; } else { idx = 37; } drawLetter(idx, x, y, s, ld); } switch(d) { case TO_RIGHT: x += s * 1.7f; break; case TO_DOWN: y += s * 1.7f; break; case TO_LEFT: x -= s * 1.7f; break; case TO_UP: y -= s * 1.7f; break; default: break; } } } public static void drawNum(int num, float lx, float y, float s, int d) { int n = num; float x = lx; float ld; switch (d) { case TO_RIGHT: ld = 0; break; case TO_DOWN: ld = 90; break; case TO_LEFT: ld = 180; break; case TO_UP: ld = 270; break; default: break; } for (;;) { drawLetter(n % 10, x, y, s, ld); switch(d) { case TO_RIGHT: x -= s * 1.7f; break; case TO_DOWN: y -= s * 1.7f; break; case TO_LEFT: x += s * 1.7f; break; case TO_UP: y += s * 1.7f; break; default: break; } n /= 10; if (n <= 0) break; } } /*public static void drawTime(int time, float lx ,float y, float s) { int n = time; float x = lx; for (int i = 0; i < 7; i++) { if (i != 4) { drawLetter(n % 10, x, y, s); n /= 10; } else { drawLetter(n % 6, x, y, s); n /= 6; } if ((i & 1) == 1 || i == 0) { switch (i) { case 3: drawLetter(41, x + s * 1.16f, y, s); break; case 5: drawLetter(40, x + s * 1.16f, y, s); break; default: break; } x -= s * 1.7f; } else { x -= s * 2.2f; } if (n <= 0) break; } }*/ private static void drawBox(float x, float y, float width, float height, float r, float g, float b) { Screen3D.setColor(r, g, b, 0.5); P47Screen.drawBoxSolid(x - width, y - height, width * 2, height * 2); Screen3D.setColor(r, g, b, 1); P47Screen.drawBoxLine(x - width, y - height, width * 2, height * 2); } private static void drawLetter(int idx, float r, float g, float b) { float x, y, length, size, t; int deg; for (int i = 0;; i++) { deg = cast(int) spData[idx][i][4]; if (deg > 99990) break; x = -spData[idx][i][0]; y = -spData[idx][i][1]; size = spData[idx][i][2]; length = spData[idx][i][3]; size *= 0.66f; length *= 0.6f; x = -x; y = y; deg %= 180; if (deg <= 45 || deg > 135) drawBox(x, y, size, length, r, g, b); else drawBox(x, y, length, size, r, g, b); } } private static const int LETTER_NUM = 42; public static void createDisplayLists() { displayListIdx = glGenLists(LETTER_NUM * 2); for (int i = 0; i < LETTER_NUM; i++) { glNewList(displayListIdx + i, GL_COMPILE); drawLetter(i, 1, 1, 1); glEndList(); } for (int i = 0; i < LETTER_NUM; i++) { glNewList(displayListIdx + LETTER_NUM + i, GL_COMPILE); drawLetter(i, 1, 0.7, 0.7); glEndList(); } } public static void deleteDisplayLists() { glDeleteLists(displayListIdx, LETTER_NUM * 2); } private static float[5][16][] spData = [[ [0, 1.15f, 0.65f, 0.3f, 0], [-0.6f, 0.55f, 0.65f, 0.3f, 90], [0.6f, 0.55f, 0.65f, 0.3f, 90], [-0.6f, -0.55f, 0.65f, 0.3f, 90], [0.6f, -0.55f, 0.65f, 0.3f, 90], [0, -1.15f, 0.65f, 0.3f, 0], [0, 0, 0, 0, 99999], ],[ [0, 0.55f, 0.65f, 0.3f, 90], [0, -0.55f, 0.65f, 0.3f, 90], [0, 0, 0, 0, 99999], ],[ [0, 1.15f, 0.65f, 0.3f, 0], [0.65f, 0.55f, 0.65f, 0.3f, 90], [0, 0, 0.65f, 0.3f, 0], [-0.65f, -0.55f, 0.65f, 0.3f, 90], [0, -1.15f, 0.65f, 0.3f, 0], [0, 0, 0, 0, 99999], ],[ [0, 1.15f, 0.65f, 0.3f, 0], [0.65f, 0.55f, 0.65f, 0.3f, 90], [0, 0, 0.65f, 0.3f, 0], [0.65f, -0.55f, 0.65f, 0.3f, 90], [0, -1.15f, 0.65f, 0.3f, 0], [0, 0, 0, 0, 99999], ],[ [-0.65f, 0.55f, 0.65f, 0.3f, 90], [0.65f, 0.55f, 0.65f, 0.3f, 90], [0, 0, 0.65f, 0.3f, 0], [0.65f, -0.55f, 0.65f, 0.3f, 90], [0, 0, 0, 0, 99999], ],[ [0, 1.15f, 0.65f, 0.3f, 0], [-0.65f, 0.55f, 0.65f, 0.3f, 90], [0, 0, 0.65f, 0.3f, 0], [0.65f, -0.55f, 0.65f, 0.3f, 90], [0, -1.15f, 0.65f, 0.3f, 0], [0, 0, 0, 0, 99999], ],[ [0, 1.15f, 0.65f, 0.3f, 0], [-0.65f, 0.55f, 0.65f, 0.3f, 90], [0, 0, 0.65f, 0.3f, 0], [-0.65f, -0.55f, 0.65f, 0.3f, 90], [0.65f, -0.55f, 0.65f, 0.3f, 90], [0, -1.15f, 0.65f, 0.3f, 0], [0, 0, 0, 0, 99999], ],[ [0, 1.15f, 0.65f, 0.3f, 0], [0.65f, 0.55f, 0.65f, 0.3f, 90], [0.65f, -0.55f, 0.65f, 0.3f, 90], [0, 0, 0, 0, 99999], ],[ [0, 1.15f, 0.65f, 0.3f, 0], [-0.65f, 0.55f, 0.65f, 0.3f, 90], [0.65f, 0.55f, 0.65f, 0.3f, 90], [0, 0, 0.65f, 0.3f, 0], [-0.65f, -0.55f, 0.65f, 0.3f, 90], [0.65f, -0.55f, 0.65f, 0.3f, 90], [0, -1.15f, 0.65f, 0.3f, 0], [0, 0, 0, 0, 99999], ],[ [0, 1.15f, 0.65f, 0.3f, 0], [-0.65f, 0.55f, 0.65f, 0.3f, 90], [0.65f, 0.55f, 0.65f, 0.3f, 90], [0, 0, 0.65f, 0.3f, 0], [0.65f, -0.55f, 0.65f, 0.3f, 90], [0, -1.15f, 0.65f, 0.3f, 0], [0, 0, 0, 0, 99999], ],[ //A [0, 1.15f, 0.65f, 0.3f, 0], [-0.65f, 0.55f, 0.65f, 0.3f, 90], [0.65f, 0.55f, 0.65f, 0.3f, 90], [0, 0, 0.65f, 0.3f, 0], [-0.65f, -0.55f, 0.65f, 0.3f, 90], [0.65f, -0.55f, 0.65f, 0.3f, 90], [0, 0, 0, 0, 99999], ],[ [-0.1f, 1.15f, 0.45f, 0.3f, 0], [-0.65f, 0.55f, 0.65f, 0.3f, 90], [0.45f, 0.55f, 0.65f, 0.3f, 90], [-0.1f, 0, 0.45f, 0.3f, 0], [-0.65f, -0.55f, 0.65f, 0.3f, 90], [0.65f, -0.55f, 0.65f, 0.3f, 90], [0, -1.15f, 0.65f, 0.3f, 0], [0, 0, 0, 0, 99999], ],[ [0, 1.15f, 0.65f, 0.3f, 0], [-0.65f, 0.55f, 0.65f, 0.3f, 90], [-0.65f, -0.55f, 0.65f, 0.3f, 90], [0, -1.15f, 0.65f, 0.3f, 0], [0, 0, 0, 0, 99999], ],[ [-0.1f, 1.15f, 0.45f, 0.3f, 0], [-0.65f, 0.55f, 0.65f, 0.3f, 90], [0.45f, 0.4f, 0.65f, 0.3f, 90], [-0.65f, -0.55f, 0.65f, 0.3f, 90], [0.65f, -0.55f, 0.65f, 0.3f, 90], [0, -1.15f, 0.65f, 0.3f, 0], [0, 0, 0, 0, 99999], ],[ [0, 1.15f, 0.65f, 0.3f, 0], [-0.65f, 0.55f, 0.65f, 0.3f, 90], [0, 0, 0.65f, 0.3f, 0], [-0.65f, -0.55f, 0.65f, 0.3f, 90], [0, -1.15f, 0.65f, 0.3f, 0], [0, 0, 0, 0, 99999], ],[// F [0, 1.15f, 0.65f, 0.3f, 0], [-0.65f, 0.55f, 0.65f, 0.3f, 90], [0, 0, 0.65f, 0.3f, 0], [-0.65f, -0.55f, 0.65f, 0.3f, 90], [0, 0, 0, 0, 99999], ],[ [0, 1.15f, 0.65f, 0.3f, 0], [-0.65f, 0.55f, 0.65f, 0.3f, 90], [0.25f, 0, 0.25f, 0.3f, 0], [-0.65f, -0.55f, 0.65f, 0.3f, 90], [0.65f, -0.55f, 0.65f, 0.3f, 90], [0, -1.15f, 0.65f, 0.3f, 0], [0, 0, 0, 0, 99999], ],[ [-0.65f, 0.55f, 0.65f, 0.3f, 90], [0.65f, 0.55f, 0.65f, 0.3f, 90], [0, 0, 0.65f, 0.3f, 0], [-0.65f, -0.55f, 0.65f, 0.3f, 90], [0.65f, -0.55f, 0.65f, 0.3f, 90], [0, 0, 0, 0, 99999], ],[ [0, 0.55f, 0.65f, 0.3f, 90], [0, -0.55f, 0.65f, 0.3f, 90], [0, 0, 0, 0, 99999], ],[ [-0.65f, 0.55f, 0.65f, 0.3f, 90], [-0.65f, -0.55f, 0.65f, 0.3f, 90], [0.65f, -0.75f, 0.25f, 0.3f, 90], [0, -1.15f, 0.65f, 0.3f, 0], [0, 0, 0, 0, 99999], ],[//K [-0.65f, 0.55f, 0.65f, 0.3f, 90], [0.45f, 0.55f, 0.65f, 0.3f, 90], [-0.1f, 0, 0.45f, 0.3f, 0], [-0.65f, -0.55f, 0.65f, 0.3f, 90], [0.65f, -0.55f, 0.65f, 0.3f, 90], [0, 0, 0, 0, 99999], ],[ [-0.65f, 0.55f, 0.65f, 0.3f, 90], [-0.65f, -0.55f, 0.65f, 0.3f, 90], [0, -1.15f, 0.65f, 0.3f, 0], [0, 0, 0, 0, 99999], ],[ [-0.3f, 1.15f, 0.25f, 0.3f, 0], [0.3f, 1.15f, 0.25f, 0.3f, 0], [-0.65f, 0.55f, 0.65f, 0.3f, 90], [0.65f, 0.55f, 0.65f, 0.3f, 90], [-0.65f, -0.55f, 0.65f, 0.3f, 90], [0.65f, -0.55f, 0.65f, 0.3f, 90], [0, 0.55f, 0.65f, 0.3f, 90], [0, -0.55f, 0.65f, 0.3f, 90], [0, 0, 0, 0, 99999], ],[ [0, 1.15f, 0.65f, 0.3f, 0], [-0.65f, 0.55f, 0.65f, 0.3f, 90], [0.65f, 0.55f, 0.65f, 0.3f, 90], [-0.65f, -0.55f, 0.65f, 0.3f, 90], [0.65f, -0.55f, 0.65f, 0.3f, 90], [0, 0, 0, 0, 99999], ],[ [0, 1.15f, 0.65f, 0.3f, 0], [-0.65f, 0.55f, 0.65f, 0.3f, 90], [0.65f, 0.55f, 0.65f, 0.3f, 90], [-0.65f, -0.55f, 0.65f, 0.3f, 90], [0.65f, -0.55f, 0.65f, 0.3f, 90], [0, -1.15f, 0.65f, 0.3f, 0], [0, 0, 0, 0, 99999], ],[//P [0, 1.15f, 0.65f, 0.3f, 0], [-0.65f, 0.55f, 0.65f, 0.3f, 90], [0.65f, 0.55f, 0.65f, 0.3f, 90], [0, 0, 0.65f, 0.3f, 0], [-0.65f, -0.55f, 0.65f, 0.3f, 90], [0, 0, 0, 0, 99999], ],[ [0, 1.15f, 0.65f, 0.3f, 0], [-0.65f, 0.55f, 0.65f, 0.3f, 90], [0.65f, 0.55f, 0.65f, 0.3f, 90], [-0.65f, -0.55f, 0.65f, 0.3f, 90], [0.65f, -0.55f, 0.65f, 0.3f, 90], [0, -1.15f, 0.65f, 0.3f, 0], [0.2f, -0.6f, 0.45f, 0.3f, 360-300], [0, 0, 0, 0, 99999], ],[ [0, 1.15f, 0.65f, 0.3f, 0], [-0.65f, 0.55f, 0.65f, 0.3f, 90], [0.65f, 0.55f, 0.65f, 0.3f, 90], [-0.1f, 0, 0.45f, 0.3f, 0], [-0.65f, -0.55f, 0.65f, 0.3f, 90], [0.45f, -0.55f, 0.65f, 0.3f, 90], [0, 0, 0, 0, 99999], ],[ [0, 1.15f, 0.65f, 0.3f, 0], [-0.65f, 0.55f, 0.65f, 0.3f, 90], [0, 0, 0.65f, 0.3f, 0], [0.65f, -0.55f, 0.65f, 0.3f, 90], [0, -1.15f, 0.65f, 0.3f, 0], [0, 0, 0, 0, 99999], ],[ [-0.4f, 1.15f, 0.45f, 0.3f, 0], [0.4f, 1.15f, 0.45f, 0.3f, 0], [0, 0.55f, 0.65f, 0.3f, 90], [0, -0.55f, 0.65f, 0.3f, 90], [0, 0, 0, 0, 99999], ],[//U [-0.65f, 0.55f, 0.65f, 0.3f, 90], [0.65f, 0.55f, 0.65f, 0.3f, 90], [-0.65f, -0.55f, 0.65f, 0.3f, 90], [0.65f, -0.55f, 0.65f, 0.3f, 90], [0, -1.15f, 0.65f, 0.3f, 0], [0, 0, 0, 0, 99999], ],[ [-0.65f, 0.55f, 0.65f, 0.3f, 90], [0.65f, 0.55f, 0.65f, 0.3f, 90], [-0.5f, -0.55f, 0.65f, 0.3f, 90], [0.5f, -0.55f, 0.65f, 0.3f, 90], [0, -1.15f, 0.45f, 0.3f, 0], [0, 0, 0, 0, 99999], ],[ [-0.65f, 0.55f, 0.65f, 0.3f, 90], [0.65f, 0.55f, 0.65f, 0.3f, 90], [-0.65f, -0.55f, 0.65f, 0.3f, 90], [0.65f, -0.55f, 0.65f, 0.3f, 90], [-0.3f, -1.15f, 0.25f, 0.3f, 0], [0.3f, -1.15f, 0.25f, 0.3f, 0], [0, 0.55f, 0.65f, 0.3f, 90], [0, -0.55f, 0.65f, 0.3f, 90], [0, 0, 0, 0, 99999], ],[ [-0.4f, 0.6f, 0.85f, 0.3f, 360-120], [0.4f, 0.6f, 0.85f, 0.3f, 360-60], [-0.4f, -0.6f, 0.85f, 0.3f, 360-240], [0.4f, -0.6f, 0.85f, 0.3f, 360-300], [0, 0, 0, 0, 99999], ],[ [-0.4f, 0.6f, 0.85f, 0.3f, 360-120], [0.4f, 0.6f, 0.85f, 0.3f, 360-60], [0, -0.55f, 0.65f, 0.3f, 90], [0, 0, 0, 0, 99999], ],[ [0, 1.15f, 0.65f, 0.3f, 0], [0.35f, 0.5f, 0.65f, 0.3f, 360-60], [-0.35f, -0.5f, 0.65f, 0.3f, 360-240], [0, -1.15f, 0.65f, 0.3f, 0], [0, 0, 0, 0, 99999], ],[// . [0, -1.15f, 0.05f, 0.3f, 0], [0, 0, 0, 0, 99999], ],[// _ [0, -1.15f, 0.65f, 0.3f, 0], [0, 0, 0, 0, 99999], ],[// - [0, 0, 0.65f, 0.3f, 0], [0, 0, 0, 0, 99999], ],[//+ [-0.4f, 0, 0.45f, 0.3f, 0], [0.4f, 0, 0.45f, 0.3f, 0], [0, 0.55f, 0.65f, 0.3f, 90], [0, -0.55f, 0.65f, 0.3f, 90], [0, 0, 0, 0, 99999], ],[//' [0, 1.0f, 0.4f, 0.2f, 90], [0, 0, 0, 0, 99999], ],[//'' [-0.19f, 1.0f, 0.4f, 0.2f, 90], [0.2f, 1.0f, 0.4f, 0.2f, 90], [0, 0, 0, 0, 99999], ]]; }
D
/home/deeptuuk/rust/异步学习/dproxy/target/debug/deps/net2-3e4ea9bbb8adbf51.rmeta: /home/deeptuuk/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/net2-0.2.33/src/lib.rs /home/deeptuuk/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/net2-0.2.33/src/tcp.rs /home/deeptuuk/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/net2-0.2.33/src/udp.rs /home/deeptuuk/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/net2-0.2.33/src/socket.rs /home/deeptuuk/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/net2-0.2.33/src/ext.rs /home/deeptuuk/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/net2-0.2.33/src/utils.rs /home/deeptuuk/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/net2-0.2.33/src/sys/unix/mod.rs /home/deeptuuk/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/net2-0.2.33/src/sys/unix/impls.rs /home/deeptuuk/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/net2-0.2.33/src/unix.rs /home/deeptuuk/rust/异步学习/dproxy/target/debug/deps/libnet2-3e4ea9bbb8adbf51.rlib: /home/deeptuuk/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/net2-0.2.33/src/lib.rs /home/deeptuuk/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/net2-0.2.33/src/tcp.rs /home/deeptuuk/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/net2-0.2.33/src/udp.rs /home/deeptuuk/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/net2-0.2.33/src/socket.rs /home/deeptuuk/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/net2-0.2.33/src/ext.rs /home/deeptuuk/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/net2-0.2.33/src/utils.rs /home/deeptuuk/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/net2-0.2.33/src/sys/unix/mod.rs /home/deeptuuk/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/net2-0.2.33/src/sys/unix/impls.rs /home/deeptuuk/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/net2-0.2.33/src/unix.rs /home/deeptuuk/rust/异步学习/dproxy/target/debug/deps/net2-3e4ea9bbb8adbf51.d: /home/deeptuuk/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/net2-0.2.33/src/lib.rs /home/deeptuuk/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/net2-0.2.33/src/tcp.rs /home/deeptuuk/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/net2-0.2.33/src/udp.rs /home/deeptuuk/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/net2-0.2.33/src/socket.rs /home/deeptuuk/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/net2-0.2.33/src/ext.rs /home/deeptuuk/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/net2-0.2.33/src/utils.rs /home/deeptuuk/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/net2-0.2.33/src/sys/unix/mod.rs /home/deeptuuk/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/net2-0.2.33/src/sys/unix/impls.rs /home/deeptuuk/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/net2-0.2.33/src/unix.rs /home/deeptuuk/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/net2-0.2.33/src/lib.rs: /home/deeptuuk/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/net2-0.2.33/src/tcp.rs: /home/deeptuuk/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/net2-0.2.33/src/udp.rs: /home/deeptuuk/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/net2-0.2.33/src/socket.rs: /home/deeptuuk/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/net2-0.2.33/src/ext.rs: /home/deeptuuk/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/net2-0.2.33/src/utils.rs: /home/deeptuuk/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/net2-0.2.33/src/sys/unix/mod.rs: /home/deeptuuk/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/net2-0.2.33/src/sys/unix/impls.rs: /home/deeptuuk/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/net2-0.2.33/src/unix.rs:
D
module org.serviio.upnp.webserver.UPnPIconRequestHandler; import java.lang.String; import java.io.IOException; import java.net.URISyntaxException; import java.util.HashMap; import java.util.Map; import org.apache.http.HttpException; import org.apache.http.HttpRequest; import org.apache.http.HttpResponse; import org.apache.http.entity.ByteArrayEntity; import org.apache.http.protocol.HttpContext; import org.serviio.util.FileUtils; import org.serviio.upnp.webserver.AbstractDescriptionRequestHandler; import org.slf4j.Logger; public class UPnPIconRequestHandler : AbstractDescriptionRequestHandler { public static immutable String LARGE_PNG = "largePNG"; public static immutable String SMALL_PNG = "smallPNG"; public static immutable String LARGE_JPG = "largeJPG"; public static immutable String SMALL_JPG = "smallJPG"; private static Map!(String, IconDescription) icons; static this() { icons = new HashMap(); try { icons.put("smallJPG", new IconDescription("image/jpeg", "serviio-icon-small.jpg")); icons.put("largeJPG", new IconDescription("image/jpeg", "serviio-icon-large.jpg")); icons.put("smallPNG", new IconDescription("image/png", "serviio-icon-small.png")); icons.put("largePNG", new IconDescription("image/png", "serviio-icon-large.png")); } catch (URISyntaxException e) { e.printStackTrace(); } } override protected void handleRequest(HttpRequest request, HttpResponse response, HttpContext context) { String[] requestFields = getRequestPathFields(getRequestUri(request), "/icon", null); if (requestFields.length > 1) { response.setStatusCode(404); return; } String iconName = requestFields[0]; if (iconName !is null) { this.log.debug_(java.lang.String.format("UPnP icon request received for icon %s", cast(Object[])[ iconName ])); IconDescription id = cast(IconDescription)icons.get(iconName); if (id !is null) { byte[] iconBytes = FileUtils.readFileBytes(getClass().getResourceAsStream("/org/serviio/upnp/" + id.getFileName())); ByteArrayEntity icon = new ByteArrayEntity(iconBytes); icon.setContentType(id.getMimeType()); response.setEntity(icon); return; } } response.setStatusCode(404); this.log.debug_(java.lang.String.format("Icon with id %s doesn't exist, sending back 404 error", cast(Object[])[ iconName ])); } private static class IconDescription { private String mimeType; private String fileName; public this(String mimeType, String fileName) { this.mimeType = mimeType; this.fileName = fileName; } public String getMimeType() { return this.mimeType; } public String getFileName() { return this.fileName; } } } /* Location: C:\Users\Main\Downloads\serviio.jar * Qualified Name: org.serviio.upnp.webserver.UPnPIconRequestHandler * JD-Core Version: 0.7.0.1 */
D
void main() { alias AA = int[string]; // aa is not ref static void test(AA aa) { aa[""] = 0; } auto aa = new AA(); auto ab = new int[string]; auto ac = new typeof(aa); test(aa); test(ab); test(ac); assert(aa.length); assert(ab.length); assert(ac.length); int[string] a = new int[string]; auto b = a; a["seven"] = 7; assert(b["seven"] == 7); }
D
import std.stdio; import mir.ndslice; void main() { const matrix = slice!int(2, 2); assert(matrix == [[0, 0], [0, 0]]); writeln(matrix[]); }
D
/* * hunt-time: A time library for D programming language. * * Copyright (C) 2015-2018 HuntLabs * * Website: https://www.huntlabs.net/ * * Licensed under the Apache-2.0 License. * */ module hunt.time.Duration; import hunt.time.Constants; import hunt.time.Ser; import hunt.stream.DataInput; import hunt.stream.DataOutput; import hunt.Exceptions; // //import hunt.io.ObjectInputStream; import hunt.stream.Common; import hunt.math.BigDecimal; import hunt.math.BigInteger; import hunt.time.Exceptions; import hunt.time.format.DateTimeParseException; import hunt.time.temporal.ChronoField; import hunt.time.temporal.ChronoUnit; import hunt.time.temporal.Temporal; import hunt.time.temporal.TemporalAmount; import hunt.time.temporal.TemporalUnit; import hunt.time.Exceptions; import hunt.time.util.Common; import hunt.collection; import hunt.Functions; import hunt.Long; import hunt.math.Helper; import hunt.text.Common; import hunt.util.StringBuilder; import hunt.util.Common; import hunt.util.Comparator; // import hunt.serialization.JsonSerializer; import std.conv; import std.concurrency : initOnce; import std.regex; import std.string; /** * A time-based amount of time, such as '34.5 seconds'. * !(p) * This class models a quantity or amount of time _in terms of seconds and nanoseconds. * It can be accessed using other duration-based units, such as minutes and hours. * In addition, the {@link ChronoUnit#DAYS DAYS} unit can be used and is treated as * exactly equal to 24 hours, thus ignoring daylight savings effects. * See {@link Period} for the date-based equivalent to this class. * !(p) * A physical duration could be of infinite length. * For practicality, the duration is stored with constraints similar to {@link Instant}. * The duration uses nanosecond resolution with a maximum value of the seconds that can * be held _in a {@code long}. This is greater than the current estimated age of the universe. * !(p) * The range of a duration requires the storage of a number larger than a {@code long}. * To achieve this, the class stores a {@code long} representing seconds and an {@code int} * representing nanosecond-of-second, which will always be between 0 and 999,999,999. * The model is of a directed duration, meaning that the duration may be negative. * !(p) * The duration is measured _in "seconds", but these are not necessarily identical to * the scientific "SI second" definition based on atomic clocks. * This difference only impacts durations measured near a leap-second and should not affect * most applications. * See {@link Instant} for a discussion as to the meaning of the second and time-scales. * * !(p) * This is a <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a> * class; use of identity-sensitive operations (including reference equality * ({@code ==}), identity hash code, or synchronization) on instances of * {@code Duration} may have unpredictable results and should be avoided. * The {@code equals} method should be used for comparisons. * * @implSpec * This class is immutable and thread-safe. * * @since 1.8 */ final class Duration : TemporalAmount, Comparable!(Duration) { // , Serializable /** * Constant for a duration of zero. */ static Duration ZERO() { __gshared Duration _ZERO; return initOnce!(_ZERO)(new Duration(0, 0)); } /** * Constant for nanos per second. */ // __gshared BigInteger BI_NANOS_PER_SECOND; static BigInteger BI_NANOS_PER_SECOND() { __gshared BigInteger _v; return initOnce!(_v)(BigInteger.valueOf(TimeConstant.NANOS_PER_SECOND)); } /** * The pattern for parsing. */ enum string PATTERN = "([-+]?)P(?:([-+]?[0-9]+)D)?" ~ "(T(?:([-+]?[0-9]+)H)?(?:([-+]?[0-9]+)M)?(?:([-+]?[0-9]+)(?:[.,]([0-9]{0,9}))?S)?)?"; /** * The number of seconds _in the duration. */ private long seconds; /** * The number of nanoseconds _in the duration, expressed as a fraction of the * number of seconds. This is always positive, and never exceeds 999,999,999. */ private int nanos; //----------------------------------------------------------------------- /** * Obtains a {@code Duration} representing a number of standard 24 hour days. * !(p) * The seconds are calculated based on the standard definition of a day, * where each day is 86400 seconds which implies a 24 hour day. * The nanosecond _in second field is set to zero. * * @param days the number of days, positive or negative * @return a {@code Duration}, not null * @throws ArithmeticException if the input days exceeds the capacity of {@code Duration} */ static Duration ofDays(long days) { return create(MathHelper.multiplyExact(days , TimeConstant.SECONDS_PER_DAY), 0); } /** * Obtains a {@code Duration} representing a number of standard hours. * !(p) * The seconds are calculated based on the standard definition of an hour, * where each hour is 3600 seconds. * The nanosecond _in second field is set to zero. * * @param hours the number of hours, positive or negative * @return a {@code Duration}, not null * @throws ArithmeticException if the input hours exceeds the capacity of {@code Duration} */ static Duration ofHours(long hours) { return create(MathHelper.multiplyExact(hours, TimeConstant.SECONDS_PER_HOUR), 0); } /** * Obtains a {@code Duration} representing a number of standard minutes. * !(p) * The seconds are calculated based on the standard definition of a minute, * where each minute is 60 seconds. * The nanosecond _in second field is set to zero. * * @param minutes the number of minutes, positive or negative * @return a {@code Duration}, not null * @throws ArithmeticException if the input minutes exceeds the capacity of {@code Duration} */ static Duration ofMinutes(long minutes) { return create(MathHelper.multiplyExact(minutes, TimeConstant.SECONDS_PER_MINUTE), 0); } //----------------------------------------------------------------------- /** * Obtains a {@code Duration} representing a number of seconds. * !(p) * The nanosecond _in second field is set to zero. * * @param seconds the number of seconds, positive or negative * @return a {@code Duration}, not null */ static Duration ofSeconds(long seconds) { return create(seconds, 0); } /** * Obtains a {@code Duration} representing a number of seconds and an * adjustment _in nanoseconds. * !(p) * This method allows an arbitrary number of nanoseconds to be passed _in. * The factory will alter the values of the second and nanosecond _in order * to ensure that the stored nanosecond is _in the range 0 to 999,999,999. * For example, the following will result _in exactly the same duration: * !(pre) * Duration.ofSeconds(3, 1); * Duration.ofSeconds(4, -999_999_999); * Duration.ofSeconds(2, 1000_000_001); * </pre> * * @param seconds the number of seconds, positive or negative * @param nanoAdjustment the nanosecond adjustment to the number of seconds, positive or negative * @return a {@code Duration}, not null * @throws ArithmeticException if the adjustment causes the seconds to exceed the capacity of {@code Duration} */ static Duration ofSeconds(long seconds, long nanoAdjustment) { long secs = MathHelper.addExact(seconds , MathHelper.floorDiv(nanoAdjustment , TimeConstant.NANOS_PER_SECOND)); int nos = cast(int) (MathHelper.floorMod(nanoAdjustment, TimeConstant.NANOS_PER_SECOND)); return create(secs, nos); } //----------------------------------------------------------------------- /** * Obtains a {@code Duration} representing a number of milliseconds. * !(p) * The seconds and nanoseconds are extracted from the specified milliseconds. * * @param millis the number of milliseconds, positive or negative * @return a {@code Duration}, not null */ static Duration ofMillis(long millis) { long secs = millis / 1000; int mos = cast(int) (millis % 1000); if (mos < 0) { mos += 1000; secs--; } return create(secs, mos * 1000_000); } //----------------------------------------------------------------------- /** * Obtains a {@code Duration} representing a number of nanoseconds. * !(p) * The seconds and nanoseconds are extracted from the specified nanoseconds. * * @param nanos the number of nanoseconds, positive or negative * @return a {@code Duration}, not null */ static Duration ofNanos(long nanos) { long secs = nanos / TimeConstant.NANOS_PER_SECOND; int nos = cast(int) (nanos % TimeConstant.NANOS_PER_SECOND); if (nos < 0) { nos += TimeConstant.NANOS_PER_SECOND; secs--; } return create(secs, nos); } //----------------------------------------------------------------------- /** * Obtains a {@code Duration} representing an amount _in the specified unit. * !(p) * The parameters represent the two parts of a phrase like '6 Hours'. For example: * !(pre) * Duration.of(3, SECONDS); * Duration.of(465, HOURS); * </pre> * Only a subset of units are accepted by this method. * The unit must either have an {@linkplain TemporalUnit#isDurationEstimated() exact duration} or * be {@link ChronoUnit#DAYS} which is treated as 24 hours. Other units throw an exception. * * @param amount the amount of the duration, measured _in terms of the unit, positive or negative * @param unit the unit that the duration is measured _in, must have an exact duration, not null * @return a {@code Duration}, not null * @throws DateTimeException if the period unit has an estimated duration * @throws ArithmeticException if a numeric overflow occurs */ static Duration of(long amount, TemporalUnit unit) { return ZERO.plus(amount, unit); } //----------------------------------------------------------------------- /** * Obtains an instance of {@code Duration} from a temporal amount. * !(p) * This obtains a duration based on the specified amount. * A {@code TemporalAmount} represents an amount of time, which may be * date-based or time-based, which this factory extracts to a duration. * !(p) * The conversion loops around the set of units from the amount and uses * the {@linkplain TemporalUnit#getDuration() duration} of the unit to * calculate the total {@code Duration}. * Only a subset of units are accepted by this method. The unit must either * have an {@linkplain TemporalUnit#isDurationEstimated() exact duration} * or be {@link ChronoUnit#DAYS} which is treated as 24 hours. * If any other units are found then an exception is thrown. * * @param amount the temporal amount to convert, not null * @return the equivalent duration, not null * @throws DateTimeException if unable to convert to a {@code Duration} * @throws ArithmeticException if numeric overflow occurs */ static Duration from(TemporalAmount amount) { assert(amount, "amount"); Duration duration = ZERO; foreach(TemporalUnit unit ; amount.getUnits()) { duration = duration.plus(amount.get(unit), unit); } return duration; } //----------------------------------------------------------------------- /** * Obtains a {@code Duration} from a text string such as {@code PnDTnHnMn.nS}. * !(p) * This will parse a textual representation of a duration, including the * string produced by {@code toString()}. The formats accepted are based * on the ISO-8601 duration format {@code PnDTnHnMn.nS} with days * considered to be exactly 24 hours. * !(p) * The string starts with an optional sign, denoted by the ASCII negative * or positive symbol. If negative, the whole period is negated. * The ASCII letter "P" is next _in upper or lower case. * There are then four sections, each consisting of a number and a suffix. * The sections have suffixes _in ASCII of "D", "H", "M" and "S" for * days, hours, minutes and seconds, accepted _in upper or lower case. * The suffixes must occur _in order. The ASCII letter "T" must occur before * the first occurrence, if any, of an hour, minute or second section. * At least one of the four sections must be present, and if "T" is present * there must be at least one section after the "T". * The number part of each section must consist of one or more ASCII digits. * The number may be prefixed by the ASCII negative or positive symbol. * The number of days, hours and minutes must parse to a {@code long}. * The number of seconds must parse to a {@code long} with optional fraction. * The decimal point may be either a dot or a comma. * The fractional part may have from zero to 9 digits. * !(p) * The leading plus/minus sign, and negative values for other units are * not part of the ISO-8601 standard. * !(p) * Examples: * !(pre) * "PT20.345S" -- parses as "20.345 seconds" * "PT15M" -- parses as "15 minutes" (where a minute is 60 seconds) * "PT10H" -- parses as "10 hours" (where an hour is 3600 seconds) * "P2D" -- parses as "2 days" (where a day is 24 hours or 86400 seconds) * "P2DT3H4M" -- parses as "2 days, 3 hours and 4 minutes" * "PT-6H3M" -- parses as "-6 hours and +3 minutes" * "-PT6H3M" -- parses as "-6 hours and -3 minutes" * "-PT-6H+3M" -- parses as "+6 hours and -3 minutes" * </pre> * * @param text the text to parse, not null * @return the parsed duration, not null * @throws DateTimeParseException if the text cannot be parsed to a duration */ static Duration parse(string text) { assert(text, "text"); auto matchers = matchAll(text, PATTERN); if (!matchers.empty()) { // check for letter T but no time sections auto matcher = matchers.front(); if (!charMatch(text, matcher.captures[2], 'T')) { bool negate = charMatch(text, matcher.captures[0], '-'); string dayStart = matcher.captures[1]; string hourStart = matcher.captures[3]; string minuteStart = matcher.captures[4]; string secondStart = matcher.captures[5]; string fractionStart = matcher.captures[6]; if (dayStart.length >= 0 || hourStart.length >= 0 || minuteStart.length >= 0 || secondStart.length >= 0) { long daysAsSecs = parseNumber(text, dayStart, TimeConstant.SECONDS_PER_DAY, "days"); long hoursAsSecs = parseNumber(text, hourStart, TimeConstant.SECONDS_PER_HOUR, "hours"); long minsAsSecs = parseNumber(text, minuteStart, TimeConstant.SECONDS_PER_MINUTE, "minutes"); long seconds = parseNumber(text, secondStart, 1, "seconds"); bool negativeSecs = secondStart.length >= 0 && secondStart[0] == '-'; int nanos = parseFraction(text, fractionStart, negativeSecs ? -1 : 1); try { return create(negate, daysAsSecs, hoursAsSecs, minsAsSecs, seconds, nanos); } catch (ArithmeticException ex) { throw cast(DateTimeParseException) new DateTimeParseException("Text cannot be parsed to a Duration: overflow", text, 0)/* .initCause(ex) */; } } } } throw new DateTimeParseException("Text cannot be parsed to a Duration", text, 0); } private static bool charMatch(string text, string m, char c) { return (m.length == 1 && m[0] == c); } private static long parseNumber(string text, string data, int multiplier, string errorText) { // regex limits to [-+]?[0-9]+ if (!isNumeric(data) || data.length == 0) { return 0; } try { long val = to!long(data); return MathHelper.multiplyExact(val , multiplier); } catch (Exception ex) { throw new Exception("Text cannot be parsed to a Duration: " ~ ex.msg); } } private static int parseFraction(string text, string data, int negate) { // regex limits to [0-9]{0,9} if (!isNumeric(data) || data.length == 0) { return 0; } try { int fraction = to!int(data); // for number strings smaller than 9 digits, interpret as if there // were trailing zeros for (int i = cast(int)(data.length); i < 9; i++) { fraction *= 10; } return fraction * negate; } catch (Exception ex) { throw new Exception("Text cannot be parsed to a Duration: fraction , " ,ex.msg); } } private static Duration create(bool negate, long daysAsSecs, long hoursAsSecs, long minsAsSecs, long secs, int nanos) { long seconds = MathHelper.addExact(daysAsSecs , MathHelper.addExact(hoursAsSecs , MathHelper.addExact(minsAsSecs , secs))); if (negate) { return ofSeconds(seconds, nanos).negated(); } return ofSeconds(seconds, nanos); } //----------------------------------------------------------------------- /** * Obtains a {@code Duration} representing the duration between two temporal objects. * !(p) * This calculates the duration between two temporal objects. If the objects * are of different types, then the duration is calculated based on the type * of the first object. For example, if the first argument is a {@code TimeConstant} * then the second argument is converted to a {@code TimeConstant}. * !(p) * The specified temporal objects must support the {@link ChronoUnit#SECONDS SECONDS} unit. * For full accuracy, either the {@link ChronoUnit#NANOS NANOS} unit or the * {@link ChronoField#NANO_OF_SECOND NANO_OF_SECOND} field should be supported. * !(p) * The result of this method can be a negative period if the end is before the start. * To guarantee to obtain a positive duration call {@link #abs()} on the result. * * @param startInclusive the start instant, inclusive, not null * @param endExclusive the end instant, exclusive, not null * @return a {@code Duration}, not null * @throws DateTimeException if the seconds between the temporals cannot be obtained * @throws ArithmeticException if the calculation exceeds the capacity of {@code Duration} */ static Duration between(Temporal startInclusive, Temporal endExclusive) { try { return ofNanos(startInclusive.until(endExclusive, ChronoUnit.NANOS)); } catch (DateTimeException ex) { long secs = startInclusive.until(endExclusive, ChronoUnit.SECONDS); long nanos; try { nanos = endExclusive.getLong(ChronoField.NANO_OF_SECOND) - startInclusive.getLong(ChronoField.NANO_OF_SECOND); if (secs > 0 && nanos < 0) { secs++; } else if (secs < 0 && nanos > 0) { secs--; } } catch (DateTimeException ex2) { nanos = 0; } return ofSeconds(secs, nanos); } } //----------------------------------------------------------------------- /** * Obtains an instance of {@code Duration} using seconds and nanoseconds. * * @param seconds the length of the duration _in seconds, positive or negative * @param nanoAdjustment the nanosecond adjustment within the second, from 0 to 999,999,999 */ private static Duration create(long seconds, int nanoAdjustment) { if ((seconds | nanoAdjustment) == 0) { return ZERO; } return new Duration(seconds, nanoAdjustment); } /** * Constructs an instance of {@code Duration} using seconds and nanoseconds. * * @param seconds the length of the duration _in seconds, positive or negative * @param nanos the nanoseconds within the second, from 0 to 999,999,999 */ this(long seconds, int nanos) { // super();///@gxc this.seconds = seconds; this.nanos = nanos; } //----------------------------------------------------------------------- /** * Gets the value of the requested unit. * !(p) * This returns a value for each of the two supported units, * {@link ChronoUnit#SECONDS SECONDS} and {@link ChronoUnit#NANOS NANOS}. * All other units throw an exception. * * @param unit the {@code TemporalUnit} for which to return the value * @return the long value of the unit * @throws DateTimeException if the unit is not supported * @throws UnsupportedTemporalTypeException if the unit is not supported */ override long get(TemporalUnit unit) { if (unit == ChronoUnit.SECONDS) { return seconds; } else if (unit == ChronoUnit.NANOS) { return nanos; } else { throw new UnsupportedTemporalTypeException("Unsupported unit: " ~ typeid(unit).stringof); } } /** * Gets the set of units supported by this duration. * !(p) * The supported units are {@link ChronoUnit#SECONDS SECONDS}, * and {@link ChronoUnit#NANOS NANOS}. * They are returned _in the order seconds, nanos. * !(p) * This set can be used _in conjunction with {@link #get(TemporalUnit)} * to access the entire state of the duration. * * @return a list containing the seconds and nanos units, not null */ override List!(TemporalUnit) getUnits() { __gshared List!(TemporalUnit) _UNITS; return initOnce!(_UNITS)({ auto r = new ArrayList!(TemporalUnit)(); r.add(ChronoUnit.SECONDS); r.add(ChronoUnit.NANOS); return r; }()); } //----------------------------------------------------------------------- /** * Checks if this duration is zero length. * !(p) * A {@code Duration} represents a directed distance between two points on * the time-line and can therefore be positive, zero or negative. * This method checks whether the length is zero. * * @return true if this duration has a total length equal to zero */ bool isZero() { return (seconds | nanos) == 0; } /** * Checks if this duration is negative, excluding zero. * !(p) * A {@code Duration} represents a directed distance between two points on * the time-line and can therefore be positive, zero or negative. * This method checks whether the length is less than zero. * * @return true if this duration has a total length less than zero */ bool isNegative() { return seconds < 0; } //----------------------------------------------------------------------- /** * Gets the number of seconds _in this duration. * !(p) * The length of the duration is stored using two fields - seconds and nanoseconds. * The nanoseconds part is a value from 0 to 999,999,999 that is an adjustment to * the length _in seconds. * The total duration is defined by calling this method and {@link #getNano()}. * !(p) * A {@code Duration} represents a directed distance between two points on the time-line. * A negative duration is expressed by the negative sign of the seconds part. * A duration of -1 nanosecond is stored as -1 seconds plus 999,999,999 nanoseconds. * * @return the whole seconds part of the length of the duration, positive or negative */ long getSeconds() { return seconds; } /** * Gets the number of nanoseconds within the second _in this duration. * !(p) * The length of the duration is stored using two fields - seconds and nanoseconds. * The nanoseconds part is a value from 0 to 999,999,999 that is an adjustment to * the length _in seconds. * The total duration is defined by calling this method and {@link #getSeconds()}. * !(p) * A {@code Duration} represents a directed distance between two points on the time-line. * A negative duration is expressed by the negative sign of the seconds part. * A duration of -1 nanosecond is stored as -1 seconds plus 999,999,999 nanoseconds. * * @return the nanoseconds within the second part of the length of the duration, from 0 to 999,999,999 */ int getNano() { return nanos; } //----------------------------------------------------------------------- /** * Returns a copy of this duration with the specified amount of seconds. * !(p) * This returns a duration with the specified seconds, retaining the * nano-of-second part of this duration. * !(p) * This instance is immutable and unaffected by this method call. * * @param seconds the seconds to represent, may be negative * @return a {@code Duration} based on this period with the requested seconds, not null */ Duration withSeconds(long seconds) { return create(seconds, nanos); } /** * Returns a copy of this duration with the specified nano-of-second. * !(p) * This returns a duration with the specified nano-of-second, retaining the * seconds part of this duration. * !(p) * This instance is immutable and unaffected by this method call. * * @param nanoOfSecond the nano-of-second to represent, from 0 to 999,999,999 * @return a {@code Duration} based on this period with the requested nano-of-second, not null * @throws DateTimeException if the nano-of-second is invalid */ Duration withNanos(int nanoOfSecond) { ChronoField.NANO_OF_SECOND.checkValidIntValue(nanoOfSecond); return create(seconds, nanoOfSecond); } //----------------------------------------------------------------------- /** * Returns a copy of this duration with the specified duration added. * !(p) * This instance is immutable and unaffected by this method call. * * @param duration the duration to add, positive or negative, not null * @return a {@code Duration} based on this duration with the specified duration added, not null * @throws ArithmeticException if numeric overflow occurs */ Duration plus(Duration duration) { return plus(duration.getSeconds(), duration.getNano()); } /** * Returns a copy of this duration with the specified duration added. * !(p) * The duration amount is measured _in terms of the specified unit. * Only a subset of units are accepted by this method. * The unit must either have an {@linkplain TemporalUnit#isDurationEstimated() exact duration} or * be {@link ChronoUnit#DAYS} which is treated as 24 hours. Other units throw an exception. * !(p) * This instance is immutable and unaffected by this method call. * * @param amountToAdd the amount to add, measured _in terms of the unit, positive or negative * @param unit the unit that the amount is measured _in, must have an exact duration, not null * @return a {@code Duration} based on this duration with the specified duration added, not null * @throws UnsupportedTemporalTypeException if the unit is not supported * @throws ArithmeticException if numeric overflow occurs */ Duration plus(long amountToAdd, TemporalUnit unit) { assert(unit, "unit"); if (unit == ChronoUnit.DAYS) { return plus(MathHelper.multiplyExact(amountToAdd , TimeConstant.SECONDS_PER_DAY), 0); } if (unit.isDurationEstimated()) { throw new UnsupportedTemporalTypeException("Unit must not have an estimated duration"); } if (amountToAdd == 0) { return this; } if (cast(ChronoUnit)(unit) !is null) { { if ((cast(ChronoUnit) unit).toString == ChronoUnit.NANOS.toString) return plusNanos(amountToAdd); if ((cast(ChronoUnit) unit).toString == ChronoUnit.MICROS.toString) return plusSeconds((amountToAdd / (1000_000L * 1000)) * 1000).plusNanos((amountToAdd % (1000_000L * 1000)) * 1000); if ((cast(ChronoUnit) unit).toString == ChronoUnit.MILLIS.toString) return plusMillis(amountToAdd); if ((cast(ChronoUnit) unit).toString == ChronoUnit.SECONDS.toString ) return plusSeconds(amountToAdd); } return plusSeconds(MathHelper.multiplyExact(unit.getDuration().seconds , amountToAdd)); } Duration duration = unit.getDuration().multipliedBy(amountToAdd); return plusSeconds(duration.getSeconds()).plusNanos(duration.getNano()); } //----------------------------------------------------------------------- /** * Returns a copy of this duration with the specified duration _in standard 24 hour days added. * !(p) * The number of days is multiplied by 86400 to obtain the number of seconds to add. * This is based on the standard definition of a day as 24 hours. * !(p) * This instance is immutable and unaffected by this method call. * * @param daysToAdd the days to add, positive or negative * @return a {@code Duration} based on this duration with the specified days added, not null * @throws ArithmeticException if numeric overflow occurs */ Duration plusDays(long daysToAdd) { return plus(MathHelper.multiplyExact(daysToAdd , TimeConstant.SECONDS_PER_DAY), 0); } /** * Returns a copy of this duration with the specified duration _in hours added. * !(p) * This instance is immutable and unaffected by this method call. * * @param hoursToAdd the hours to add, positive or negative * @return a {@code Duration} based on this duration with the specified hours added, not null * @throws ArithmeticException if numeric overflow occurs */ Duration plusHours(long hoursToAdd) { return plus(MathHelper.multiplyExact(hoursToAdd , TimeConstant.SECONDS_PER_HOUR), 0); } /** * Returns a copy of this duration with the specified duration _in minutes added. * !(p) * This instance is immutable and unaffected by this method call. * * @param minutesToAdd the minutes to add, positive or negative * @return a {@code Duration} based on this duration with the specified minutes added, not null * @throws ArithmeticException if numeric overflow occurs */ Duration plusMinutes(long minutesToAdd) { return plus(MathHelper.multiplyExact(minutesToAdd , TimeConstant.SECONDS_PER_MINUTE), 0); } /** * Returns a copy of this duration with the specified duration _in seconds added. * !(p) * This instance is immutable and unaffected by this method call. * * @param secondsToAdd the seconds to add, positive or negative * @return a {@code Duration} based on this duration with the specified seconds added, not null * @throws ArithmeticException if numeric overflow occurs */ Duration plusSeconds(long secondsToAdd) { return plus(secondsToAdd, 0); } /** * Returns a copy of this duration with the specified duration _in milliseconds added. * !(p) * This instance is immutable and unaffected by this method call. * * @param millisToAdd the milliseconds to add, positive or negative * @return a {@code Duration} based on this duration with the specified milliseconds added, not null * @throws ArithmeticException if numeric overflow occurs */ Duration plusMillis(long millisToAdd) { return plus(millisToAdd / 1000, (millisToAdd % 1000) * 1000_000); } /** * Returns a copy of this duration with the specified duration _in nanoseconds added. * !(p) * This instance is immutable and unaffected by this method call. * * @param nanosToAdd the nanoseconds to add, positive or negative * @return a {@code Duration} based on this duration with the specified nanoseconds added, not null * @throws ArithmeticException if numeric overflow occurs */ Duration plusNanos(long nanosToAdd) { return plus(0, nanosToAdd); } /** * Returns a copy of this duration with the specified duration added. * !(p) * This instance is immutable and unaffected by this method call. * * @param secondsToAdd the seconds to add, positive or negative * @param nanosToAdd the nanos to add, positive or negative * @return a {@code Duration} based on this duration with the specified seconds added, not null * @throws ArithmeticException if numeric overflow occurs */ private Duration plus(long secondsToAdd, long nanosToAdd) { if ((secondsToAdd | nanosToAdd) == 0) { return this; } long epochSec = MathHelper.addExact(seconds , secondsToAdd); epochSec = MathHelper.addExact(epochSec , nanosToAdd / TimeConstant.NANOS_PER_SECOND); nanosToAdd = nanosToAdd % TimeConstant.NANOS_PER_SECOND; long nanoAdjustment = nanos + nanosToAdd; // safe int+NANOS_PER_SECOND return ofSeconds(epochSec, nanoAdjustment); } //----------------------------------------------------------------------- /** * Returns a copy of this duration with the specified duration subtracted. * !(p) * This instance is immutable and unaffected by this method call. * * @param duration the duration to subtract, positive or negative, not null * @return a {@code Duration} based on this duration with the specified duration subtracted, not null * @throws ArithmeticException if numeric overflow occurs */ Duration minus(Duration duration) { long secsToSubtract = duration.getSeconds(); int nanosToSubtract = duration.getNano(); if (secsToSubtract == Long.MIN_VALUE) { return plus(Long.MAX_VALUE, -nanosToSubtract).plus(1, 0); } return plus(-secsToSubtract, -nanosToSubtract); } /** * Returns a copy of this duration with the specified duration subtracted. * !(p) * The duration amount is measured _in terms of the specified unit. * Only a subset of units are accepted by this method. * The unit must either have an {@linkplain TemporalUnit#isDurationEstimated() exact duration} or * be {@link ChronoUnit#DAYS} which is treated as 24 hours. Other units throw an exception. * !(p) * This instance is immutable and unaffected by this method call. * * @param amountToSubtract the amount to subtract, measured _in terms of the unit, positive or negative * @param unit the unit that the amount is measured _in, must have an exact duration, not null * @return a {@code Duration} based on this duration with the specified duration subtracted, not null * @throws ArithmeticException if numeric overflow occurs */ Duration minus(long amountToSubtract, TemporalUnit unit) { return (amountToSubtract == Long.MIN_VALUE ? plus(Long.MAX_VALUE, unit).plus(1, unit) : plus(-amountToSubtract, unit)); } //----------------------------------------------------------------------- /** * Returns a copy of this duration with the specified duration _in standard 24 hour days subtracted. * !(p) * The number of days is multiplied by 86400 to obtain the number of seconds to subtract. * This is based on the standard definition of a day as 24 hours. * !(p) * This instance is immutable and unaffected by this method call. * * @param daysToSubtract the days to subtract, positive or negative * @return a {@code Duration} based on this duration with the specified days subtracted, not null * @throws ArithmeticException if numeric overflow occurs */ Duration minusDays(long daysToSubtract) { return (daysToSubtract == Long.MIN_VALUE ? plusDays(Long.MAX_VALUE).plusDays(1) : plusDays(-daysToSubtract)); } /** * Returns a copy of this duration with the specified duration _in hours subtracted. * !(p) * The number of hours is multiplied by 3600 to obtain the number of seconds to subtract. * !(p) * This instance is immutable and unaffected by this method call. * * @param hoursToSubtract the hours to subtract, positive or negative * @return a {@code Duration} based on this duration with the specified hours subtracted, not null * @throws ArithmeticException if numeric overflow occurs */ Duration minusHours(long hoursToSubtract) { return (hoursToSubtract == Long.MIN_VALUE ? plusHours(Long.MAX_VALUE).plusHours(1) : plusHours(-hoursToSubtract)); } /** * Returns a copy of this duration with the specified duration _in minutes subtracted. * !(p) * The number of hours is multiplied by 60 to obtain the number of seconds to subtract. * !(p) * This instance is immutable and unaffected by this method call. * * @param minutesToSubtract the minutes to subtract, positive or negative * @return a {@code Duration} based on this duration with the specified minutes subtracted, not null * @throws ArithmeticException if numeric overflow occurs */ Duration minusMinutes(long minutesToSubtract) { return (minutesToSubtract == Long.MIN_VALUE ? plusMinutes(Long.MAX_VALUE).plusMinutes(1) : plusMinutes(-minutesToSubtract)); } /** * Returns a copy of this duration with the specified duration _in seconds subtracted. * !(p) * This instance is immutable and unaffected by this method call. * * @param secondsToSubtract the seconds to subtract, positive or negative * @return a {@code Duration} based on this duration with the specified seconds subtracted, not null * @throws ArithmeticException if numeric overflow occurs */ Duration minusSeconds(long secondsToSubtract) { return (secondsToSubtract == Long.MIN_VALUE ? plusSeconds(Long.MAX_VALUE).plusSeconds(1) : plusSeconds(-secondsToSubtract)); } /** * Returns a copy of this duration with the specified duration _in milliseconds subtracted. * !(p) * This instance is immutable and unaffected by this method call. * * @param millisToSubtract the milliseconds to subtract, positive or negative * @return a {@code Duration} based on this duration with the specified milliseconds subtracted, not null * @throws ArithmeticException if numeric overflow occurs */ Duration minusMillis(long millisToSubtract) { return (millisToSubtract == Long.MIN_VALUE ? plusMillis(Long.MAX_VALUE).plusMillis(1) : plusMillis(-millisToSubtract)); } /** * Returns a copy of this duration with the specified duration _in nanoseconds subtracted. * !(p) * This instance is immutable and unaffected by this method call. * * @param nanosToSubtract the nanoseconds to subtract, positive or negative * @return a {@code Duration} based on this duration with the specified nanoseconds subtracted, not null * @throws ArithmeticException if numeric overflow occurs */ Duration minusNanos(long nanosToSubtract) { return (nanosToSubtract == Long.MIN_VALUE ? plusNanos(Long.MAX_VALUE).plusNanos(1) : plusNanos(-nanosToSubtract)); } //----------------------------------------------------------------------- /** * Returns a copy of this duration multiplied by the scalar. * !(p) * This instance is immutable and unaffected by this method call. * * @param multiplicand the value to multiply the duration by, positive or negative * @return a {@code Duration} based on this duration multiplied by the specified scalar, not null * @throws ArithmeticException if numeric overflow occurs */ Duration multipliedBy(long multiplicand) { if (multiplicand == 0) { return ZERO; } if (multiplicand == 1) { return this; } return null /* create(toBigDecimalSeconds().multiply(BigDecimal.valueOf(multiplicand))) */; } /** * Returns a copy of this duration divided by the specified value. * !(p) * This instance is immutable and unaffected by this method call. * * @param divisor the value to divide the duration by, positive or negative, not zero * @return a {@code Duration} based on this duration divided by the specified divisor, not null * @throws ArithmeticException if the divisor is zero or if numeric overflow occurs */ ///@gxc // Duration dividedBy(long divisor) { // if (divisor == 0) { // throw new ArithmeticException("Cannot divide by zero"); // } // if (divisor == 1) { // return this; // } // return create(toBigDecimalSeconds().divide(BigDecimal.valueOf(divisor), RoundingMode.DOWN.oldMode())); // } /** * Returns number of whole times a specified Duration occurs within this Duration. * !(p) * This instance is immutable and unaffected by this method call. * * @param divisor the value to divide the duration by, positive or negative, not null * @return number of whole times, rounded toward zero, a specified * {@code Duration} occurs within this Duration, may be negative * @throws ArithmeticException if the divisor is zero, or if numeric overflow occurs * @since 9 */ ///@gxc // long dividedBy(Duration divisor) { // assert(divisor, "divisor"); // BigDecimal dividendBigD = toBigDecimalSeconds(); // BigDecimal divisorBigD = divisor.toBigDecimalSeconds(); // return dividendBigD.divideToIntegralValue(divisorBigD).longValueExact(); // } /** * Converts this duration to the total length _in seconds and * fractional nanoseconds expressed as a {@code BigDecimal}. * * @return the total length of the duration _in seconds, with a scale of 9, not null */ ///@gxc // private BigDecimal toBigDecimalSeconds() { // return BigDecimal.valueOf(seconds).add(BigDecimal.valueOf(nanos, 9)); // } /** * Creates an instance of {@code Duration} from a number of seconds. * * @param seconds the number of seconds, up to scale 9, positive or negative * @return a {@code Duration}, not null * @throws ArithmeticException if numeric overflow occurs */ private static Duration create(BigDecimal seconds) { BigInteger nanos = seconds.movePointRight(9).toBigIntegerExact(); BigInteger[] divRem = nanos.divideAndRemainder(BI_NANOS_PER_SECOND); if (divRem[0].bitLength() > 63) { throw new ArithmeticException("Exceeds capacity of Duration: " ~ nanos.toString); } return ofSeconds(divRem[0].longValue(), divRem[1].intValue()); } //----------------------------------------------------------------------- /** * Returns a copy of this duration with the length negated. * !(p) * This method swaps the sign of the total length of this duration. * For example, {@code PT1.3S} will be returned as {@code PT-1.3S}. * !(p) * This instance is immutable and unaffected by this method call. * * @return a {@code Duration} based on this duration with the amount negated, not null * @throws ArithmeticException if numeric overflow occurs */ Duration negated() { return multipliedBy(-1); } /** * Returns a copy of this duration with a positive length. * !(p) * This method returns a positive duration by effectively removing the sign from any negative total length. * For example, {@code PT-1.3S} will be returned as {@code PT1.3S}. * !(p) * This instance is immutable and unaffected by this method call. * * @return a {@code Duration} based on this duration with an absolute length, not null * @throws ArithmeticException if numeric overflow occurs */ Duration abs() { return isNegative() ? negated() : this; } //------------------------------------------------------------------------- /** * Adds this duration to the specified temporal object. * !(p) * This returns a temporal object of the same observable type as the input * with this duration added. * !(p) * In most cases, it is clearer to reverse the calling pattern by using * {@link Temporal#plus(TemporalAmount)}. * !(pre) * // these two lines are equivalent, but the second approach is recommended * dateTime = thisDuration.addTo(dateTime); * dateTime = dateTime.plus(thisDuration); * </pre> * !(p) * The calculation will add the seconds, then nanos. * Only non-zero amounts will be added. * !(p) * This instance is immutable and unaffected by this method call. * * @param temporal the temporal object to adjust, not null * @return an object of the same type with the adjustment made, not null * @throws DateTimeException if unable to add * @throws ArithmeticException if numeric overflow occurs */ override Temporal addTo(Temporal temporal) { if (seconds != 0) { temporal = temporal.plus(seconds, ChronoUnit.SECONDS); } if (nanos != 0) { temporal = temporal.plus(nanos, ChronoUnit.NANOS); } return temporal; } /** * Subtracts this duration from the specified temporal object. * !(p) * This returns a temporal object of the same observable type as the input * with this duration subtracted. * !(p) * In most cases, it is clearer to reverse the calling pattern by using * {@link Temporal#minus(TemporalAmount)}. * !(pre) * // these two lines are equivalent, but the second approach is recommended * dateTime = thisDuration.subtractFrom(dateTime); * dateTime = dateTime.minus(thisDuration); * </pre> * !(p) * The calculation will subtract the seconds, then nanos. * Only non-zero amounts will be added. * !(p) * This instance is immutable and unaffected by this method call. * * @param temporal the temporal object to adjust, not null * @return an object of the same type with the adjustment made, not null * @throws DateTimeException if unable to subtract * @throws ArithmeticException if numeric overflow occurs */ override Temporal subtractFrom(Temporal temporal) { if (seconds != 0) { temporal = temporal.minus(seconds, ChronoUnit.SECONDS); } if (nanos != 0) { temporal = temporal.minus(nanos, ChronoUnit.NANOS); } return temporal; } //----------------------------------------------------------------------- /** * Gets the number of days _in this duration. * !(p) * This returns the total number of days _in the duration by dividing the * number of seconds by 86400. * This is based on the standard definition of a day as 24 hours. * !(p) * This instance is immutable and unaffected by this method call. * * @return the number of days _in the duration, may be negative */ long toDays() { return seconds / TimeConstant.SECONDS_PER_DAY; } /** * Gets the number of hours _in this duration. * !(p) * This returns the total number of hours _in the duration by dividing the * number of seconds by 3600. * !(p) * This instance is immutable and unaffected by this method call. * * @return the number of hours _in the duration, may be negative */ long toHours() { return seconds / TimeConstant.SECONDS_PER_HOUR; } /** * Gets the number of minutes _in this duration. * !(p) * This returns the total number of minutes _in the duration by dividing the * number of seconds by 60. * !(p) * This instance is immutable and unaffected by this method call. * * @return the number of minutes _in the duration, may be negative */ long toMinutes() { return seconds / TimeConstant.SECONDS_PER_MINUTE; } /** * Gets the number of seconds _in this duration. * !(p) * This returns the total number of whole seconds _in the duration. * !(p) * This instance is immutable and unaffected by this method call. * * @return the whole seconds part of the length of the duration, positive or negative * @since 9 */ long toSeconds() { return seconds; } /** * Converts this duration to the total length _in milliseconds. * !(p) * If this duration is too large to fit _in a {@code long} milliseconds, then an * exception is thrown. * !(p) * If this duration has greater than millisecond precision, then the conversion * will drop any excess precision information as though the amount _in nanoseconds * was subject to integer division by one million. * * @return the total length of the duration _in milliseconds * @throws ArithmeticException if numeric overflow occurs */ long toMillis() { long tempSeconds = seconds; long tempNanos = nanos; if (tempSeconds < 0) { // change the seconds and nano value to // handle Long.MIN_VALUE case tempSeconds = tempSeconds + 1; tempNanos = tempNanos - TimeConstant.NANOS_PER_SECOND; } long millis = MathHelper.multiplyExact(tempSeconds , 1000); millis = MathHelper.addExact(millis, tempNanos / TimeConstant.NANOS_PER_MILLI); return millis; } /** * Converts this duration to the total length _in nanoseconds expressed as a {@code long}. * !(p) * If this duration is too large to fit _in a {@code long} nanoseconds, then an * exception is thrown. * * @return the total length of the duration _in nanoseconds * @throws ArithmeticException if numeric overflow occurs */ long toNanos() { long tempSeconds = seconds; long tempNanos = nanos; if (tempSeconds < 0) { // change the seconds and nano value to // handle Long.MIN_VALUE case tempSeconds = tempSeconds + 1; tempNanos = tempNanos - TimeConstant.NANOS_PER_SECOND; } long totalNanos = MathHelper.multiplyExact(tempSeconds , TimeConstant.NANOS_PER_SECOND); totalNanos = MathHelper.addExact(totalNanos , tempNanos); return totalNanos; } /** * Extracts the number of days _in the duration. * !(p) * This returns the total number of days _in the duration by dividing the * number of seconds by 86400. * This is based on the standard definition of a day as 24 hours. * !(p) * This instance is immutable and unaffected by this method call. * * @return the number of days _in the duration, may be negative * @since 9 */ long toDaysPart(){ return seconds / TimeConstant.SECONDS_PER_DAY; } /** * Extracts the number of hours part _in the duration. * !(p) * This returns the number of remaining hours when dividing {@link #toHours} * by hours _in a day. * This is based on the standard definition of a day as 24 hours. * !(p) * This instance is immutable and unaffected by this method call. * * @return the number of hours part _in the duration, may be negative * @since 9 */ int toHoursPart(){ return cast(int) (toHours() % 24); } /** * Extracts the number of minutes part _in the duration. * !(p) * This returns the number of remaining minutes when dividing {@link #toMinutes} * by minutes _in an hour. * This is based on the standard definition of an hour as 60 minutes. * !(p) * This instance is immutable and unaffected by this method call. * * @return the number of minutes parts _in the duration, may be negative * @since 9 */ int toMinutesPart(){ return cast(int) (toMinutes() % TimeConstant.MINUTES_PER_HOUR); } /** * Extracts the number of seconds part _in the duration. * !(p) * This returns the remaining seconds when dividing {@link #toSeconds} * by seconds _in a minute. * This is based on the standard definition of a minute as 60 seconds. * !(p) * This instance is immutable and unaffected by this method call. * * @return the number of seconds parts _in the duration, may be negative * @since 9 */ int toSecondsPart(){ return cast(int) (seconds % TimeConstant.SECONDS_PER_MINUTE); } /** * Extracts the number of milliseconds part of the duration. * !(p) * This returns the milliseconds part by dividing the number of nanoseconds by 1,000,000. * The length of the duration is stored using two fields - seconds and nanoseconds. * The nanoseconds part is a value from 0 to 999,999,999 that is an adjustment to * the length _in seconds. * The total duration is defined by calling {@link #getNano()} and {@link #getSeconds()}. * !(p) * This instance is immutable and unaffected by this method call. * * @return the number of milliseconds part of the duration. * @since 9 */ int toMillisPart(){ return nanos / 1000_000; } /** * Get the nanoseconds part within seconds of the duration. * !(p) * The length of the duration is stored using two fields - seconds and nanoseconds. * The nanoseconds part is a value from 0 to 999,999,999 that is an adjustment to * the length _in seconds. * The total duration is defined by calling {@link #getNano()} and {@link #getSeconds()}. * !(p) * This instance is immutable and unaffected by this method call. * * @return the nanoseconds within the second part of the length of the duration, from 0 to 999,999,999 * @since 9 */ int toNanosPart(){ return nanos; } //----------------------------------------------------------------------- /** * Returns a copy of this {@code Duration} truncated to the specified unit. * !(p) * Truncating the duration returns a copy of the original with conceptual fields * smaller than the specified unit set to zero. * For example, truncating with the {@link ChronoUnit#MINUTES MINUTES} unit will * round down towards zero to the nearest minute, setting the seconds and * nanoseconds to zero. * !(p) * The unit must have a {@linkplain TemporalUnit#getDuration() duration} * that divides into the length of a standard day without remainder. * This includes all * {@linkplain ChronoUnit#isTimeBased() time-based units on {@code ChronoUnit}} * and {@link ChronoUnit#DAYS DAYS}. Other ChronoUnits throw an exception. * !(p) * This instance is immutable and unaffected by this method call. * * @param unit the unit to truncate to, not null * @return a {@code Duration} based on this duration with the time truncated, not null * @throws DateTimeException if the unit is invalid for truncation * @throws UnsupportedTemporalTypeException if the unit is not supported * @since 9 */ Duration truncatedTo(TemporalUnit unit) { assert(unit, "unit"); if (unit == ChronoUnit.SECONDS && (seconds >= 0 || nanos == 0)) { return new Duration(seconds, 0); } else if (unit == ChronoUnit.NANOS) { return this; } Duration unitDur = unit.getDuration(); if (unitDur.getSeconds() > TimeConstant.SECONDS_PER_DAY) { throw new UnsupportedTemporalTypeException("Unit is too large to be used for truncation"); } long dur = unitDur.toNanos(); if ((TimeConstant.NANOS_PER_DAY % dur) != 0) { throw new UnsupportedTemporalTypeException("Unit must divide into a standard day without remainder"); } long nod = (seconds % TimeConstant.SECONDS_PER_DAY) * TimeConstant.NANOS_PER_SECOND + nanos; long result = (nod / dur) * dur; return plusNanos(result - nod); } //----------------------------------------------------------------------- /** * Compares this duration to the specified {@code Duration}. * !(p) * The comparison is based on the total length of the durations. * It is "consistent with equals", as defined by {@link Comparable}. * * @param otherDuration the other duration to compare to, not null * @return the comparator value, negative if less, positive if greater */ // override int compareTo(Duration otherDuration) { import hunt.util.Comparator; int cmp = compare(seconds, otherDuration.seconds); if (cmp != 0) { return cmp; } return nanos - otherDuration.nanos; } //----------------------------------------------------------------------- /** * Checks if this duration is equal to the specified {@code Duration}. * !(p) * The comparison is based on the total length of the durations. * * @param otherDuration the other duration, null returns false * @return true if the other duration is equal to this one */ override bool opEquals(Object otherDuration) { if (this == otherDuration) { return true; } if (cast(Duration)(otherDuration) !is null) { Duration other = cast(Duration) otherDuration; return this.seconds == other.seconds && this.nanos == other.nanos; } return false; } /** * A hash code for this duration. * * @return a suitable hash code */ override size_t toHash() @trusted nothrow { return (cast(int) (seconds ^ (seconds >>> 32))) + (51 * nanos); } //----------------------------------------------------------------------- /** * A string representation of this duration using ISO-8601 seconds * based representation, such as {@code PT8H6M12.345S}. * !(p) * The format of the returned string will be {@code PTnHnMnS}, where n is * the relevant hours, minutes or seconds part of the duration. * Any fractional seconds are placed after a decimal point _in the seconds section. * If a section has a zero value, it is omitted. * The hours, minutes and seconds will all have the same sign. * !(p) * Examples: * !(pre) * "20.345 seconds" -- "PT20.345S * "15 minutes" (15 * 60 seconds) -- "PT15M" * "10 hours" (10 * 3600 seconds) -- "PT10H" * "2 days" (2 * 86400 seconds) -- "PT48H" * </pre> * Note that multiples of 24 hours are not output as days to avoid confusion * with {@code Period}. * * @return an ISO-8601 representation of this duration, not null */ override string toString() { if (this == ZERO) { return "PT0S"; } long effectiveTotalSecs = seconds; if (seconds < 0 && nanos > 0) { effectiveTotalSecs++; } long hours = effectiveTotalSecs / TimeConstant.SECONDS_PER_HOUR; int minutes = cast(int) ((effectiveTotalSecs % TimeConstant.SECONDS_PER_HOUR) / TimeConstant.SECONDS_PER_MINUTE); int secs = cast(int) (effectiveTotalSecs % TimeConstant.SECONDS_PER_MINUTE); StringBuilder buf = new StringBuilder(24); buf.append("PT"); if (hours != 0) { buf.append(hours).append('H'); } if (minutes != 0) { buf.append(minutes).append('M'); } if (secs == 0 && nanos == 0 && buf.length() > 2) { return buf.toString(); } if (seconds < 0 && nanos > 0) { if (secs == 0) { buf.append("-0"); } else { buf.append(secs); } } else { buf.append(secs); } if (nanos > 0) { int pos = buf.length(); if (seconds < 0) { buf.append(2 * TimeConstant.NANOS_PER_SECOND - nanos); } else { buf.append(nanos + TimeConstant.NANOS_PER_SECOND); } while (buf.charAt(buf.length() - 1) == '0') { buf.setLength(buf.length() - 1); } buf.setCharAt(pos, '.'); } buf.append('S'); return buf.toString(); } //----------------------------------------------------------------------- /** * Writes the object using a * <a href="{@docRoot}/serialized-form.html#hunt.time.Ser">dedicated serialized form</a>. * @serialData * !(pre) * _out.writeByte(1); // identifies a Duration * _out.writeLong(seconds); * _out.writeInt(nanos); * </pre> * * @return the instance of {@code Ser}, not null */ private Object writeReplace() { return new Ser(Ser.DURATION_TYPE, this); } /** * Defend against malicious streams. * * @param s the stream to read * @throws InvalidObjectException always */ ///@gxc // private void readObject(ObjectInputStream s) /*throws InvalidObjectException*/ { // throw new InvalidObjectException("Deserialization via serialization delegate"); // } void writeExternal(DataOutput _out) /*throws IOException*/ { _out.writeLong(seconds); _out.writeInt(nanos); } static Duration readExternal(DataInput _in) /*throws IOException*/ { long seconds = _in.readLong(); int nanos = _in.readInt(); return Duration.ofSeconds(seconds, nanos); } override int opCmp(Duration o) { auto res = compare(this.seconds,o.seconds); if(res == 0) res = compare(this.nanos,o.nanos); return res; } // mixin SerializationMember!(typeof(this)); }
D
// EXTRA_FILES: imports/ice11513x.d /* TEST_OUTPUT: --- fail_compilation/imports/ice11513x.d(1): Error: package name 'ice11513a' conflicts with usage as a module name in file fail_compilation/ice11513a.d --- */ module ice11513a; import imports.ice11513x;
D
module Level; static import std.stdio; import std.stdio; import std.random: uniform; import Mesh; import Player; import Renderer; import Texture; import Vec3; public struct Meshes { Mesh.Mesh sword; Mesh.Mesh health; Mesh.Mesh monster1; Mesh.Mesh stairway; } public struct Textures { Texture.Texture tex; Texture.Texture health; Texture.Texture white; Texture.Texture damage; Texture.Texture floor; } private int CalculateDamage( Player.Weapon weapon ) { return 1; } public struct Monster { public int[ 2 ] levelPosition; public bool isAlive = true; public int health = 3; public int healthMax = 3; void TakeDamage( Player.Weapon weapon ) { health -= CalculateDamage( weapon ); isAlive = health > 0; } } private enum BlockType { None = 0, Wall1, Wall2, } immutable int blockCount = 7; byte[ 25 ][ blockCount ] block = [ [ 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1 ], ]; private struct Room { bool exitUp; bool exitDown; bool exitLeft; bool exitRight; } Room[ blockCount ] rooms; private int GetFittingBlock( int row, int col, int[] blockIndices, int dimension ) { int tries = 0; while (tries < 20) { // Map edge checks if (row == dimension / 5 - 1) { return 0; } if (col == dimension / 5 - 1) { return 0; } if (row == 0) { return 1; } if (col == 0) { return 6; } int candidateIndex = uniform( 0, blockCount - 1 ); int leftRoom = col > 0 ? blockIndices[ row * (dimension / 5) + col - 1 ] : -1; int upRoom = row > 0 ? blockIndices[ (row - 1) * (dimension / 5) + col ] : -1; if ((rooms[ leftRoom ].exitRight && rooms[ candidateIndex ].exitLeft) || (rooms[ upRoom ].exitDown && rooms[ candidateIndex ].exitUp)) { return candidateIndex; } ++tries; } writeln("invalid block index"); return 0; } public class Level { this( Renderer.Renderer renderer, Meshes aMeshes, Textures aTextures, bool aHasStairwayUp, bool aHasStairwayDown ) { rooms[ 0 ].exitUp = true; rooms[ 0 ].exitDown = false; rooms[ 0 ].exitLeft = false; rooms[ 0 ].exitRight = false; rooms[ 1 ].exitUp = false; rooms[ 1 ].exitDown = true; rooms[ 1 ].exitLeft = false; rooms[ 1 ].exitRight = false; rooms[ 2 ].exitUp = false; rooms[ 2 ].exitDown = false; rooms[ 2 ].exitLeft = true; rooms[ 2 ].exitRight = false; rooms[ 3 ].exitUp = false; rooms[ 3 ].exitDown = false; rooms[ 3 ].exitLeft = false; rooms[ 3 ].exitRight = true; rooms[ 4 ].exitUp = true; rooms[ 4 ].exitDown = true; rooms[ 4 ].exitLeft = false; rooms[ 4 ].exitRight = false; rooms[ 5 ].exitUp = false; rooms[ 5 ].exitDown = false; rooms[ 5 ].exitLeft = true; rooms[ 5 ].exitRight = true; rooms[ 6 ].exitUp = true; rooms[ 6 ].exitDown = true; rooms[ 6 ].exitLeft = false; rooms[ 6 ].exitRight = true; hasStairwayUp = aHasStairwayUp; hasStairwayDown = aHasStairwayDown; meshes = aMeshes; textures = aTextures; GenerateBlocks(); GenerateGeometry( renderer ); GeneratePickups(); GenerateMonsters(); } private bool CanTravelBetweenStairs() { if (!hasStairwayDown) { return true; } return true; } public int[] GetStairwayDownPosition() { return stairwayDownPosition; } public int[] GetStairwayUpPosition() { return stairwayUpPosition; } public Monster* GetMonsterInFrontOfPlayer( Player.Player player ) { auto playerForward = player.GetForwardPosition(); for (int m = 0; m < monsters.length; ++m) { if (monsters[ m ].levelPosition[ 0 ] == playerForward[ 0 ] && monsters[ m ].levelPosition[ 1 ] == playerForward[ 1 ]) { return &monsters[ m ]; } } return null; } public bool CanWalkForward( Player.Player player ) const { auto playerForward = player.GetForwardPosition(); bool isEnemyThere = false; for (int m = 0; m < monsters.length; ++m) { if (monsters[ m ].levelPosition[ 0 ] == playerForward[ 0 ] && monsters[ m ].levelPosition[ 1 ] == playerForward[ 1 ] && monsters[ m ].isAlive) { isEnemyThere = true; } } return !isEnemyThere && blocks[ playerForward[ 1 ] * dimension + playerForward[ 0 ] ] == BlockType.None; } public bool CanWalkBackward( Player.Player player ) const { auto playerBackward = player.GetBackwardPosition(); return blocks[ playerBackward[ 1 ] * dimension + playerBackward[ 0 ] ] == BlockType.None; } public bool HasHealthInPosition( int[] position ) const { for (int i = 0; i < healthPickups.length; ++i) { if (healthPickups[ i ].isActive && healthPickups[ i ].levelPosition == position) { return true; } } return false; } public void RemoveHealth( int[] position ) { for (int i = 0; i < healthPickups.length; ++i) { if (healthPickups[ i ].levelPosition == position) { healthPickups[ i ].isActive = false; } } } public void Simulate( int[] playerPosition ) { for (int i = 0; i < monsters.length; ++i) { if (monsters[ i ].isAlive) { const int moveDirection = uniform( 0, 6 ); int oldPos0 = monsters[ i ].levelPosition[ 0 ]; int oldPos1 = monsters[ i ].levelPosition[ 1 ]; if (moveDirection == 0 && monsters[ i ].levelPosition[ 0 ] > 0 && blocks[ monsters[ i ].levelPosition[ 1 ] * dimension + (monsters[ i ].levelPosition[ 0 ] - 1) ] == BlockType.None) { --monsters[ i ].levelPosition[ 0 ]; writeln("move 0"); } else if (moveDirection == 1 && monsters[ i ].levelPosition[ 0 ] < dimension - 1 && blocks[ monsters[ i ].levelPosition[ 1 ] * dimension + (monsters[ i ].levelPosition[ 0 ] + 1) ] == BlockType.None) { ++monsters[ i ].levelPosition[ 0 ]; writeln("move 1"); } else if (moveDirection == 2 && monsters[ i ].levelPosition[ 1 ] > 0 && blocks[ (monsters[ i ].levelPosition[ 1 ] - 1) * dimension + monsters[ i ].levelPosition[ 0 ] ] == BlockType.None) { --monsters[ i ].levelPosition[ 1 ]; writeln("move 2"); } else if (moveDirection == 3 && monsters[ i ].levelPosition[ 1 ] < dimension - 1 && blocks[ (monsters[ i ].levelPosition[ 1 ] + 1) * dimension + monsters[ i ].levelPosition[ 0 ] ] == BlockType.None) { ++monsters[ i ].levelPosition[ 1 ]; writeln("move 3"); } if (monsters[ i ].levelPosition[ 0 ] == playerPosition[ 0 ] && monsters[ i ].levelPosition[ 1 ] == playerPosition[ 1 ]) { monsters[ i ].levelPosition[ 0 ] = oldPos0; monsters[ i ].levelPosition[ 1 ] = oldPos1; } } } } public void DebugPrintMonsters() { for (int i = 0; i < monsters.length; ++i) { writeln( "monster ", i, " alive: ", monsters[ i ].isAlive, ", pos ", monsters[ i ].levelPosition[ 0 ], ", ", monsters[ i ].levelPosition[ 1 ] ); } } public void Draw( Renderer.Renderer renderer, float playerRotY ) { textures.tex.Bind(); renderer.SetMVP( Vec3.Vec3( 1, 1, 1 ), 0, 1 ); renderer.DrawVAO( vaoID, elementCount * 3, [ 1, 1, 1, 1 ] ); // Draws the ceiling. Wasteful, but there aren't a huge amount of tris in the level data. textures.floor.Bind(); renderer.SetMVP( Vec3.Vec3( 1, 40, 1 ), 0, 1 ); renderer.DrawVAO( vaoID, elementCount * 3, [ 1, 1, 1, 1 ] ); textures.health.Bind(); for (int i = 0; i < healthPickups.length; ++i) { if (healthPickups[ i ].isActive) { static float rotY = 0; ++rotY; renderer.SetMVP( Vec3.Vec3( healthPickups[ i ].levelPosition[ 0 ] * dimension * 2 - dimension, 0, healthPickups[ i ].levelPosition[ 1 ] * dimension * 2 - dimension * 2 ), rotY, 1 ); renderer.DrawVAO( meshes.health.GetVAO(), meshes.health.GetElementCount() * 3, [ 1, 1, 1, 1 ] ); } } textures.white.Bind(); for (int i = 0; i < monsters.length; ++i) { if (monsters[ i ].isAlive) { float x = monsters[ i ].levelPosition[ 0 ] * dimension * 1 - dimension * 2 + dimension * 3 - 20; float z = monsters[ i ].levelPosition[ 1 ] * dimension * 1 - dimension * 2 + dimension * 3 - 20; //float z = monsters[ i ].levelPosition[ 1 ] * dimension * 2 - dimension * 2; //writeln( "monster ", i, " alive: ", monsters[ i ].isAlive, ", level pos ", monsters[ i ].levelPosition[ 0 ], ", ", monsters[ i ].levelPosition[ 1 ], // ", visual pos: ", x, ", ", z, ", dimension: ", dimension ); renderer.SetMVP( Vec3.Vec3( x, -5, z ), 0, 1.0f ); float color = monsters[ i ].health / cast(float)monsters[ i ].healthMax; renderer.DrawVAO( meshes.monster1.GetVAO(), meshes.monster1.GetElementCount() * 3, [ 1, color, color, 1 ] ); } } textures.white.Bind(); if (hasStairwayUp) { renderer.SetMVP( Vec3.Vec3( stairwayUpPosition[ 0 ] * dimension * 2 - dimension, 0, stairwayUpPosition[ 1 ] * dimension * 2 - dimension * 2 ), 0, 8 ); renderer.DrawVAO( meshes.stairway.GetVAO(), meshes.stairway.GetElementCount() * 3, [ 1, 1, 1, 1 ] ); } if (hasStairwayDown) { renderer.SetMVP( Vec3.Vec3( stairwayDownPosition[ 0 ] * dimension * 2 - dimension, 0, stairwayDownPosition[ 1 ] * dimension * 2 - dimension * 2), 0, 8 ); renderer.DrawVAO( meshes.stairway.GetVAO(), meshes.stairway.GetElementCount() * 3, [ 1, 0, 0, 1 ] ); } } public bool CanGoUp( int[] playerPosition ) { return (playerPosition[ 0 ] == stairwayUpPosition[ 0 ] && playerPosition[ 1 ] == stairwayUpPosition[ 1 ]); } public bool CanGoDown( int[] playerPosition ) { return (playerPosition[ 0 ] == stairwayDownPosition[ 0 ] && playerPosition[ 1 ] == stairwayDownPosition[ 1 ]); } private void GeneratePickups() in { assert( elementCount > 0, "level geometry must be generated before placing pickups" ); } do { // Place one pickup directly in front of the player to test pickup. healthPickups[ 0 ].levelPosition = [ 1, 2 ]; int placedHealthPickupCounter = 1; int tries = 0; while (placedHealthPickupCounter < healthPickups.length && tries < 20) { ++tries; const int posCandidateX = uniform( 1, dimension - 2 ); const int posCandidateY = uniform( 1, dimension - 2 ); if (blocks[ posCandidateY * dimension + posCandidateX ] == BlockType.None) { healthPickups[ placedHealthPickupCounter ].levelPosition = [ posCandidateX, posCandidateY ]; ++placedHealthPickupCounter; } } bool placedStairwayUp = false; bool placedStairwayDown = false; tries = 0; while ((!placedStairwayUp || !placedStairwayDown) && tries < 20) { ++tries; const int posCandidateUpX = uniform( 1, dimension / 2 ); const int posCandidateUpZ = uniform( 1, dimension / 2 ); const int posCandidateDownX = uniform( dimension / 2 + 1, dimension - 2 ); const int posCandidateDownZ = uniform( dimension / 2 + 1, dimension - 2 ); if (!placedStairwayUp && blocks[ posCandidateUpZ * dimension + posCandidateUpX ] == BlockType.None) { stairwayUpPosition = [ posCandidateUpX, posCandidateUpZ ]; placedStairwayUp = true; } else if (!placedStairwayDown && blocks[ posCandidateDownZ * dimension + posCandidateDownX ] == BlockType.None && !(posCandidateDownX == stairwayUpPosition[ 0 ] && posCandidateDownZ == stairwayUpPosition[ 1 ] ) ) { stairwayDownPosition = [ posCandidateDownX, posCandidateDownZ ]; placedStairwayDown = true; } } } private void GenerateMonsters() in { assert( elementCount > 0, "level geometry must be generated before placing monsters" ); } do { int placedMonsterCounter = 0; int tries = 0; // TODO: remove after testing monsters[ placedMonsterCounter ].levelPosition = [ 1, 2 ]; ++placedMonsterCounter; monsters[ placedMonsterCounter ].levelPosition = [ 2, 2 ]; ++placedMonsterCounter; while (placedMonsterCounter < monsters.length && tries < 20) { ++tries; immutable int posCandidateX = uniform( 1, dimension - 2 ); immutable int posCandidateY = uniform( 1, dimension - 2 ); if (blocks[ posCandidateY * dimension + posCandidateX ] == BlockType.None) { monsters[ placedMonsterCounter ].levelPosition = [ posCandidateX, posCandidateY ]; ++placedMonsterCounter; } } } private void GenerateBlocks() { for (int i = 0; i < dimension * dimension; ++i) { blocks[ i ] = BlockType.Wall1; } int tries = 0; int[] blockIndices = new int[ (dimension / 5) * (dimension / 5) ]; while (tries < 40) { for (int row = 0; row < dimension / 5; ++row) { for (int col = 0; col < dimension / 5; ++col) { int blockIndex = GetFittingBlock( row, col, blockIndices, dimension ); blockIndices[ row * (dimension / 5) + col ] = blockIndex; } } bool success = true; for (int i = 0; i < blockIndices.length; ++i) { if (blockIndices[ i ] == -1) { success = false; } } if (success) { break; } ++tries; } // Converts rooms to blocks for (int y = 0; y < dimension; y += 5) { for (int x = 0; x < dimension; x += 5) { for (int inY = 0; inY < 5; ++inY) { for (int inX = 0; inX < 5; ++inX) { int blockIndex = (y + inY) * dimension + x + inX; int innerIndex = inY * 5 + inX; int innerBlockIndex = (y / 5) * (dimension / 5) + x / 5; int b = blockIndices[ innerBlockIndex ]; blocks[ blockIndex ] = (block[ b ][ innerIndex ] == 0) ? BlockType.None : BlockType.Wall1; } } } } writeln("level:"); for (int y = 0; y < dimension; ++y) { for (int x = 0; x < dimension; ++x) { write( blocks[ y * dimension + x ] != BlockType.None ? "0" : "_" ); } writeln(); } //blocks[ 1 * dimension + 3 ] = BlockType.Wall1; } private void GenerateGeometry( Renderer.Renderer renderer ) { Renderer.Vertex[] vertices; Renderer.Face[] faces; immutable int filledBlocks = dimension * dimension; immutable int vertexCount = 26; vertices = new Renderer.Vertex[ filledBlocks * vertexCount ]; faces = new Renderer.Face[ filledBlocks * 6 * 2 ]; elementCount = cast(int)faces.length; int vertexCounter = 0; int faceCounter = 0; for (int r = 0; r < dimension; ++r) { for (int c = 0; c < dimension; ++c) { //if (blocks[ r * dimension + c ] != BlockType.None) { vertices[ vertexCounter++ ] = Renderer.Vertex([ 1.000000, -1.000000, 1.000000 ], [ 1.000000, 0.000000 ]); vertices[ vertexCounter++ ] = Renderer.Vertex([ -1.000000, -1.000000, -1.000000 ], [ 0.000000, 1.000000 ]); vertices[ vertexCounter++ ] = Renderer.Vertex([ 1.000000, -1.000000, -1.000000 ], [ 0.000000, 0.000000 ]); vertices[ vertexCounter++ ] = Renderer.Vertex([ -1.000000, 1.000000, -1.000000 ], [ 1.000000, 0.000000 ]); vertices[ vertexCounter++ ] = Renderer.Vertex([ 1.000000, 1.000000, 1.000001 ], [ 0.000000, 1.000000 ]); vertices[ vertexCounter++ ] = Renderer.Vertex([ 1.000000, 1.000000, -1.000000 ], [ 0.000000, 0.000000 ]); vertices[ vertexCounter++ ] = Renderer.Vertex([ 1.000000, 1.000000, -1.00000 ], [ 1.000000, 0.000000 ]); vertices[ vertexCounter++ ] = Renderer.Vertex([ 1.000000, -1.000000, 1.000000 ], [ 0.000000, 1.000000 ]); vertices[ vertexCounter++ ] = Renderer.Vertex([ 1.000000, 1.000000, 1.000001 ], [ 1.000000, 0.000000 ]); vertices[ vertexCounter++ ] = Renderer.Vertex([ -1.000000, -1.000000, 1.000000 ], [ 0.000000, 1.000000 ]); vertices[ vertexCounter++ ] = Renderer.Vertex([ 1.000000, -1.000000, 1.000000 ], [ 0.000000, 0.000000 ]); vertices[ vertexCounter++ ] = Renderer.Vertex([ -1.000000, -1.000000, 1.000000 ], [ 0.000000, 0.000000 ]); vertices[ vertexCounter++ ] = Renderer.Vertex([ -1.000000, 1.000000, -1.000000 ], [ 1.000000, 1.000000 ]); vertices[ vertexCounter++ ] = Renderer.Vertex([ -1.000000, -1.000000, -1.000000 ], [ 0.000000, 1.000000 ]); vertices[ vertexCounter++ ] = Renderer.Vertex([ 1.000000, -1.000000, -1.000000 ], [ 1.000000, 0.000000 ]); vertices[ vertexCounter++ ] = Renderer.Vertex([ -1.000000, 1.000000, -1.000000 ], [ 0.000000, 1.000000 ]); vertices[ vertexCounter++ ] = Renderer.Vertex([ -1.000000, -1.000000, 1.000000 ], [ 1.000000, 1.000000 ]); vertices[ vertexCounter++ ] = Renderer.Vertex([ -1.000000, 1.000000, 1.000000 ], [ 1.000000, 1.000000 ]); vertices[ vertexCounter++ ] = Renderer.Vertex([ 1.00000, 1.000000, 1.000001 ], [ 0.000000, 1.000000 ]); vertices[ vertexCounter++ ] = Renderer.Vertex([ 1.000000, 1.000000, 1.000001 ], [ 1.000000, 1.000000 ]); vertices[ vertexCounter++ ] = Renderer.Vertex([ 1.000000, -1.000000, 1.000000 ], [ 0.000000, 1.000000 ]); vertices[ vertexCounter++ ] = Renderer.Vertex([ -1.000000, -1.000000, 1.000000 ], [ 0.000000, 1.000000 ]); vertices[ vertexCounter++ ] = Renderer.Vertex([ -1.000000, 1.000000, 1.000000 ], [ 1.000000, 0.000000 ]); vertices[ vertexCounter++ ] = Renderer.Vertex([ -1.000000, 1.000000, -1.000000 ], [ 1.000000, 1.000000 ]); vertices[ vertexCounter++ ] = Renderer.Vertex([ -1.000000, -1.000000, -1.000000 ], [ 1.000000, 1.000000 ]); vertices[ vertexCounter++ ] = Renderer.Vertex([ -1.000000, 1.000000, -1.000000 ], [ 0.000000, 1.000000 ]); for (int i = 0; i < vertexCount; ++i) { immutable int s = 10; immutable int s2 = s * 2; const float y = blocks[ r * dimension + c ] != BlockType.None ? 0 : s * 2; vertices[ vertexCounter - i - 1 ].pos[ 0 ] *= s; vertices[ vertexCounter - i - 1 ].pos[ 1 ] *= s; vertices[ vertexCounter - i - 1 ].pos[ 2 ] *= s; vertices[ vertexCounter - i - 1 ].pos[ 0 ] += c * s2; vertices[ vertexCounter - i - 1 ].pos[ 1 ] -= y; vertices[ vertexCounter - i - 1 ].pos[ 2 ] += r * s2; } faces[ faceCounter++ ] = Renderer.Face( 0, 1, 2 ); faces[ faceCounter++ ] = Renderer.Face( 3, 4, 5 ); faces[ faceCounter++ ] = Renderer.Face( 6, 7, 2 ); faces[ faceCounter++ ] = Renderer.Face( 8, 9, 10 ); faces[ faceCounter++ ] = Renderer.Face( 11, 12, 13 ); faces[ faceCounter++ ] = Renderer.Face( 14, 15, 5 ); faces[ faceCounter++ ] = Renderer.Face( 0, 16, 13 ); faces[ faceCounter++ ] = Renderer.Face( 3, 17, 18 ); faces[ faceCounter++ ] = Renderer.Face( 6, 19, 20 ); faces[ faceCounter++ ] = Renderer.Face( 8, 17, 21 ); faces[ faceCounter++ ] = Renderer.Face( 11, 22, 23 ); faces[ faceCounter++ ] = Renderer.Face( 14, 24, 25 ); for (int f = 0; f < 12; ++f) { faces[ faceCounter - f - 1 ].a += vertexCounter - vertexCount; faces[ faceCounter - f - 1 ].b += vertexCounter - vertexCount; faces[ faceCounter - f - 1 ].c += vertexCounter - vertexCount; } } } } renderer.GenerateVAO( vertices, faces, vaoID ); } private Textures textures; private Meshes meshes; private immutable int dimension = 20; static assert( dimension % 5 == 0 ); private BlockType[ dimension * dimension ] blocks = BlockType.None; private uint vaoID; private int elementCount; private int[ 2 ] stairwayUpPosition; private int[ 2 ] stairwayDownPosition; private bool hasStairwayDown; private bool hasStairwayUp; private struct HealthPickup { int[ 2 ] levelPosition; bool isActive = true; } private HealthPickup[ 3 ] healthPickups; private Monster[ 3 ] monsters; }
D
//Sarah ranger CHAIN IF WEIGHT #-2~Global("SanSarahR","GLOBAL",1)~THEN K#SarahB Forestlove1 @0 DO~SetGlobal("SanSarahR","GLOBAL",2) RealSetGlobalTimer("SanSarT","LOCALS",1800)~ ==BSandr@1 =@2 ==K#SarahB@3 ==BSandr@4 ==K#SarahB@5 ==BSandr@6 ==K#SarahB@7 ==BSandr@8EXIT CHAIN IF WEIGHT #-2~Global("SanSarahR","GLOBAL",3)~THEN K#SarahB Forestlove2 @9 DO~SetGlobal("SanSarahR","GLOBAL",4) RealSetGlobalTimer("SanSarT","LOCALS",1800)~ ==BSandr@10 ==K#SarahB@11 ==BSandr@12 ==K#SarahB@13 ==BSandr@14 ==K#SarahB@15 ==BSandr@16EXIT CHAIN IF WEIGHT #-2~Global("SanSarahR","GLOBAL",5)~THEN K#SarahB Forestlove3 @17 =@18 DO~SetGlobal("SanSarahR","GLOBAL",6) RealSetGlobalTimer("SanSarT","LOCALS",1800)~ ==BSandr@19 ==K#SarahB@20 ==BSandr@21 ==K#SarahB@22 ==BSandr@23 =@24 ==K#SarahB@25 = @26 = @27 = @28 = @29 ==BSandr@30 ==K#SarahB@31 = @32 = @33 = @34 ==BSandr@35 ==K#SarahB@36EXIT CHAIN IF WEIGHT #-2~Global("SanSarahR","GLOBAL",7)~THEN K#SarahB Forestlove4 @37 DO~SetGlobal("SanSarahR","GLOBAL",8) RealSetGlobalTimer("SanSarT","LOCALS",1800)~ ==BSandr@38 ==K#SarahB@39 ==BSandr@40 ==K#SarahB@41 ==BSandr@42 ==K#SarahB~(Blushes) If what I am today is interesting for you...~ ~All right, then.~ = @44 = @45 ==BSandr@46 ==K#SarahB@47 =@48 = @49 = @50 = @51 = @52 = @53 = @54 = @55 ==BSandr@56 ==K#SarahB@57EXIT CHAIN IF WEIGHT #-2~Global("SanSarahR","GLOBAL",9)~THEN K#SarahB Forestlove5 @58 DO~SetGlobal("SanSarahR","GLOBAL",10) RealSetGlobalTimer("SanSarT","LOCALS",1800)~ ==BSandr@59 ==K#SarahB@60 ==BSandr@61 ==K#SarahB@62 ==BSandr@63 ==K#SarahB@64 ==BSandr@65 ==K#SarahB @66 ==BSandr@67 ==K#SarahB @68 ==BSandr@69 ==K#SarahB @70 ==BSandr@71 ==K#SarahB @72 ==BSandr@73DO~StartCutSceneMode() Wait(2) FadeToColor([30.0],0) Wait(4) FadeFromColor([30.0],0) Wait(2) EndCutSceneMode()~EXIT
D
/* * file.d * * This module has the structure that is kept with a File class for Windows. * * Author: Dave Wilkinson * Originated: July 22th, 2009 * */ module platform.vars.file; import platform.win.common; struct FilePlatformVars { HANDLE f; }
D
# FIXED Startup/OSAL_ICallBle.obj: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Projects/ble/SensorTag/CC26xx/Source/Stack/OSAL_ICallBle.c Startup/OSAL_ICallBle.obj: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/icall/include/ICall.h Startup/OSAL_ICallBle.obj: C:/ti/ccsv6/tools/compiler/ti-cgt-arm_16.9.0.LTS/include/stdbool.h Startup/OSAL_ICallBle.obj: C:/ti/ccsv6/tools/compiler/ti-cgt-arm_16.9.0.LTS/include/stdint.h Startup/OSAL_ICallBle.obj: C:/ti/ccsv6/tools/compiler/ti-cgt-arm_16.9.0.LTS/include/stdlib.h Startup/OSAL_ICallBle.obj: C:/ti/ccsv6/tools/compiler/ti-cgt-arm_16.9.0.LTS/include/linkage.h Startup/OSAL_ICallBle.obj: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/hal/target/CC2650TIRTOS/hal_types.h Startup/OSAL_ICallBle.obj: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/hal/target/CC2650TIRTOS/../_common/cc26xx/_hal_types.h Startup/OSAL_ICallBle.obj: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/osal/include/OSAL.h Startup/OSAL_ICallBle.obj: C:/ti/ccsv6/tools/compiler/ti-cgt-arm_16.9.0.LTS/include/limits.h Startup/OSAL_ICallBle.obj: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/osal/include/comdef.h Startup/OSAL_ICallBle.obj: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/hal/target/CC2650TIRTOS/hal_types.h Startup/OSAL_ICallBle.obj: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/hal/include/hal_defs.h Startup/OSAL_ICallBle.obj: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/osal/include/OSAL_Memory.h Startup/OSAL_ICallBle.obj: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/osal/include/OSAL_Timers.h Startup/OSAL_ICallBle.obj: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/osal/include/OSAL_Tasks.h Startup/OSAL_ICallBle.obj: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/osal/include/osal_snv.h Startup/OSAL_ICallBle.obj: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/hal/target/CC2650TIRTOS/hal_types.h Startup/OSAL_ICallBle.obj: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/ble/controller/CC26xx/include/ll.h Startup/OSAL_ICallBle.obj: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/ble/include/bcomdef.h Startup/OSAL_ICallBle.obj: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/osal/include/osal_cbtimer.h Startup/OSAL_ICallBle.obj: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/ble/include/l2cap.h Startup/OSAL_ICallBle.obj: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/ble/include/gap.h Startup/OSAL_ICallBle.obj: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/ble/include/sm.h Startup/OSAL_ICallBle.obj: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/ble/include/gatt.h Startup/OSAL_ICallBle.obj: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/ble/include/att.h Startup/OSAL_ICallBle.obj: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/ble/hci/hci_tl.h Startup/OSAL_ICallBle.obj: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/ble/include/hci.h Startup/OSAL_ICallBle.obj: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/hal/include/hal_assert.h Startup/OSAL_ICallBle.obj: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/hal/include/hal_uart.h Startup/OSAL_ICallBle.obj: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/hal/include/hal_board.h Startup/OSAL_ICallBle.obj: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/hal/target/CC2650TIRTOS/hal_board_cfg.h Startup/OSAL_ICallBle.obj: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/hal/target/CC2650TIRTOS/hal_mcu.h Startup/OSAL_ICallBle.obj: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/hal/target/CC2650TIRTOS/hal_types.h Startup/OSAL_ICallBle.obj: C:/ti/tirex-content/tirtos_simplelink_2_13_00_06/products/cc26xxware_2_21_01_15600/inc/hw_nvic.h Startup/OSAL_ICallBle.obj: C:/ti/tirex-content/tirtos_simplelink_2_13_00_06/products/cc26xxware_2_21_01_15600/inc/hw_ints.h Startup/OSAL_ICallBle.obj: C:/ti/tirex-content/tirtos_simplelink_2_13_00_06/products/cc26xxware_2_21_01_15600/inc/hw_types.h Startup/OSAL_ICallBle.obj: C:/ti/tirex-content/tirtos_simplelink_2_13_00_06/products/cc26xxware_2_21_01_15600/inc/hw_chip_def.h Startup/OSAL_ICallBle.obj: C:/ti/tirex-content/tirtos_simplelink_2_13_00_06/products/cc26xxware_2_21_01_15600/inc/hw_gpio.h Startup/OSAL_ICallBle.obj: C:/ti/tirex-content/tirtos_simplelink_2_13_00_06/products/cc26xxware_2_21_01_15600/inc/hw_memmap.h Startup/OSAL_ICallBle.obj: C:/ti/tirex-content/tirtos_simplelink_2_13_00_06/products/cc26xxware_2_21_01_15600/driverlib/systick.h Startup/OSAL_ICallBle.obj: C:/ti/tirex-content/tirtos_simplelink_2_13_00_06/products/cc26xxware_2_21_01_15600/driverlib/debug.h Startup/OSAL_ICallBle.obj: C:/ti/tirex-content/tirtos_simplelink_2_13_00_06/products/cc26xxware_2_21_01_15600/driverlib/interrupt.h Startup/OSAL_ICallBle.obj: C:/ti/tirex-content/tirtos_simplelink_2_13_00_06/products/cc26xxware_2_21_01_15600/driverlib/cpu.h Startup/OSAL_ICallBle.obj: C:/ti/tirex-content/tirtos_simplelink_2_13_00_06/products/cc26xxware_2_21_01_15600/driverlib/rom.h Startup/OSAL_ICallBle.obj: C:/ti/tirex-content/tirtos_simplelink_2_13_00_06/products/cc26xxware_2_21_01_15600/driverlib/uart.h Startup/OSAL_ICallBle.obj: C:/ti/tirex-content/tirtos_simplelink_2_13_00_06/products/cc26xxware_2_21_01_15600/inc/hw_uart.h Startup/OSAL_ICallBle.obj: C:/ti/tirex-content/tirtos_simplelink_2_13_00_06/products/cc26xxware_2_21_01_15600/driverlib/gpio.h Startup/OSAL_ICallBle.obj: C:/ti/tirex-content/tirtos_simplelink_2_13_00_06/products/cc26xxware_2_21_01_15600/driverlib/flash.h Startup/OSAL_ICallBle.obj: C:/ti/tirex-content/tirtos_simplelink_2_13_00_06/products/cc26xxware_2_21_01_15600/inc/hw_flash.h Startup/OSAL_ICallBle.obj: C:/ti/tirex-content/tirtos_simplelink_2_13_00_06/products/cc26xxware_2_21_01_15600/inc/hw_aon_sysctl.h Startup/OSAL_ICallBle.obj: C:/ti/tirex-content/tirtos_simplelink_2_13_00_06/products/cc26xxware_2_21_01_15600/inc/hw_fcfg1.h Startup/OSAL_ICallBle.obj: C:/ti/tirex-content/tirtos_simplelink_2_13_00_06/products/cc26xxware_2_21_01_15600/driverlib/ioc.h Startup/OSAL_ICallBle.obj: C:/ti/tirex-content/tirtos_simplelink_2_13_00_06/products/cc26xxware_2_21_01_15600/inc/hw_ioc.h Startup/OSAL_ICallBle.obj: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/hal/target/CC2650TIRTOS/hal_types.h Startup/OSAL_ICallBle.obj: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/ble/hci/hci_data.h Startup/OSAL_ICallBle.obj: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/ble/hci/hci_event.h Startup/OSAL_ICallBle.obj: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/ble/hci/hci_tl.h Startup/OSAL_ICallBle.obj: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Projects/ble/Include/gattservapp.h Startup/OSAL_ICallBle.obj: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Projects/ble/Profiles/Roles/gapbondmgr.h Startup/OSAL_ICallBle.obj: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Projects/ble/ICall/Include/bleUserConfig.h Startup/OSAL_ICallBle.obj: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Projects/ble/ICall/Include/bleDispatch.h Startup/OSAL_ICallBle.obj: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/hal/target/_common/cc26xx/rfHal.h Startup/OSAL_ICallBle.obj: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/hal/target/CC2650TIRTOS/hal_types.h C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Projects/ble/SensorTag/CC26xx/Source/Stack/OSAL_ICallBle.c: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/icall/include/ICall.h: C:/ti/ccsv6/tools/compiler/ti-cgt-arm_16.9.0.LTS/include/stdbool.h: C:/ti/ccsv6/tools/compiler/ti-cgt-arm_16.9.0.LTS/include/stdint.h: C:/ti/ccsv6/tools/compiler/ti-cgt-arm_16.9.0.LTS/include/stdlib.h: C:/ti/ccsv6/tools/compiler/ti-cgt-arm_16.9.0.LTS/include/linkage.h: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/hal/target/CC2650TIRTOS/hal_types.h: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/hal/target/CC2650TIRTOS/../_common/cc26xx/_hal_types.h: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/osal/include/OSAL.h: C:/ti/ccsv6/tools/compiler/ti-cgt-arm_16.9.0.LTS/include/limits.h: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/osal/include/comdef.h: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/hal/target/CC2650TIRTOS/hal_types.h: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/hal/include/hal_defs.h: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/osal/include/OSAL_Memory.h: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/osal/include/OSAL_Timers.h: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/osal/include/OSAL_Tasks.h: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/osal/include/osal_snv.h: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/hal/target/CC2650TIRTOS/hal_types.h: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/ble/controller/CC26xx/include/ll.h: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/ble/include/bcomdef.h: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/osal/include/osal_cbtimer.h: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/ble/include/l2cap.h: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/ble/include/gap.h: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/ble/include/sm.h: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/ble/include/gatt.h: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/ble/include/att.h: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/ble/hci/hci_tl.h: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/ble/include/hci.h: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/hal/include/hal_assert.h: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/hal/include/hal_uart.h: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/hal/include/hal_board.h: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/hal/target/CC2650TIRTOS/hal_board_cfg.h: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/hal/target/CC2650TIRTOS/hal_mcu.h: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/hal/target/CC2650TIRTOS/hal_types.h: C:/ti/tirex-content/tirtos_simplelink_2_13_00_06/products/cc26xxware_2_21_01_15600/inc/hw_nvic.h: C:/ti/tirex-content/tirtos_simplelink_2_13_00_06/products/cc26xxware_2_21_01_15600/inc/hw_ints.h: C:/ti/tirex-content/tirtos_simplelink_2_13_00_06/products/cc26xxware_2_21_01_15600/inc/hw_types.h: C:/ti/tirex-content/tirtos_simplelink_2_13_00_06/products/cc26xxware_2_21_01_15600/inc/hw_chip_def.h: C:/ti/tirex-content/tirtos_simplelink_2_13_00_06/products/cc26xxware_2_21_01_15600/inc/hw_gpio.h: C:/ti/tirex-content/tirtos_simplelink_2_13_00_06/products/cc26xxware_2_21_01_15600/inc/hw_memmap.h: C:/ti/tirex-content/tirtos_simplelink_2_13_00_06/products/cc26xxware_2_21_01_15600/driverlib/systick.h: C:/ti/tirex-content/tirtos_simplelink_2_13_00_06/products/cc26xxware_2_21_01_15600/driverlib/debug.h: C:/ti/tirex-content/tirtos_simplelink_2_13_00_06/products/cc26xxware_2_21_01_15600/driverlib/interrupt.h: C:/ti/tirex-content/tirtos_simplelink_2_13_00_06/products/cc26xxware_2_21_01_15600/driverlib/cpu.h: C:/ti/tirex-content/tirtos_simplelink_2_13_00_06/products/cc26xxware_2_21_01_15600/driverlib/rom.h: C:/ti/tirex-content/tirtos_simplelink_2_13_00_06/products/cc26xxware_2_21_01_15600/driverlib/uart.h: C:/ti/tirex-content/tirtos_simplelink_2_13_00_06/products/cc26xxware_2_21_01_15600/inc/hw_uart.h: C:/ti/tirex-content/tirtos_simplelink_2_13_00_06/products/cc26xxware_2_21_01_15600/driverlib/gpio.h: C:/ti/tirex-content/tirtos_simplelink_2_13_00_06/products/cc26xxware_2_21_01_15600/driverlib/flash.h: C:/ti/tirex-content/tirtos_simplelink_2_13_00_06/products/cc26xxware_2_21_01_15600/inc/hw_flash.h: C:/ti/tirex-content/tirtos_simplelink_2_13_00_06/products/cc26xxware_2_21_01_15600/inc/hw_aon_sysctl.h: C:/ti/tirex-content/tirtos_simplelink_2_13_00_06/products/cc26xxware_2_21_01_15600/inc/hw_fcfg1.h: C:/ti/tirex-content/tirtos_simplelink_2_13_00_06/products/cc26xxware_2_21_01_15600/driverlib/ioc.h: C:/ti/tirex-content/tirtos_simplelink_2_13_00_06/products/cc26xxware_2_21_01_15600/inc/hw_ioc.h: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/hal/target/CC2650TIRTOS/hal_types.h: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/ble/hci/hci_data.h: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/ble/hci/hci_event.h: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/ble/hci/hci_tl.h: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Projects/ble/Include/gattservapp.h: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Projects/ble/Profiles/Roles/gapbondmgr.h: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Projects/ble/ICall/Include/bleUserConfig.h: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Projects/ble/ICall/Include/bleDispatch.h: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/hal/target/_common/cc26xx/rfHal.h: C:/ti/tirex-content/simplelink/ble_cc26xx_2_01_00_44423_cloud/Components/hal/target/CC2650TIRTOS/hal_types.h:
D
/** * Copyright © DiamondMVC 2018 * License: MIT (https://github.com/DiamondMVC/Diamond/blob/master/LICENSE) * Author: Jacob Jensen (bausshf) */ module diamond.errors.checks; import diamond.errors.exceptions : EnforceException; /** * Enforces the value of an input to be defined. * Params: * value = The value of an input. * message = A given message when the value is undefined. * Returns: * The value of the input. */ T enforceInput(T)(T value, lazy string message = null) if (is(typeof({ if (!value) {} }))) { if (!value) { throw new EnforceException(message ? message : "Enforcement failed."); } return value; } /** * Enforces a value to be defined. * Params: * value = The value. * message = A given message when the value is undefined. */ void enforce(T)(T value, lazy string message = null) if (is(typeof({ if (!value) {} }))) { if (!value) { throw new EnforceException(message ? message : "Enforcement failed."); } }
D
.\" $Header: XLookStr.d,v 1.1 87/08/27 14:23:42 mento Exp $ The .PN XLookupString function is a convenience routine that can be used to map a key event to an ASCII string, using the modifier bits in the key event to deal with shift, lock, and control.
D
module startup; version(GNU) { static import gcc.attribute; // we need this to get the section, weak and alias attributes void wfi(){ version(ALLOW_WFI){ asm{ "wfi"; } } } } else version(LDC) { import ldc.llvmasm; void wfi(){ version(ALLOW_WFI){ __asm("wfi"); } } } import core.stdc.config; // we need this for c_ulong, so we can get symbols from the linker-script import core.stdc.stdint; // these are the types normally used on microcontrollers // Create convenience enums and aliases for the weak and alias attributes: enum isr_vector = gcc.attribute.attribute("section",".isr_vector.ro"); enum naked = gcc.attribute.attribute("naked"); enum weak = gcc.attribute.attribute("weak"); alias Tuple(A...) = A; alias rst = Tuple!(weak, gcc.attribute.attribute("alias", "defaultResetHandler")); alias exc = Tuple!(weak, gcc.attribute.attribute("alias", "defaultExceptionHandler")); // The following symbols are provided by our linker-script: extern(C) extern __gshared c_ulong _stack; // initial stack address extern(C) extern __gshared c_ulong _siccmram; // pointer to read-only data that needs to be copied to CCMRAM extern(C) extern __gshared c_ulong _sccmram; // start address of .ccmram section (somewhere within CCMRAM) extern(C) extern __gshared c_ulong _eccmram; // end address of .ccmram section (somewhere within CCMRAM) extern(C) extern __gshared c_ulong _sirelocated; // pointer to read-only data that needs to be copied to normal SRAM extern(C) extern __gshared c_ulong _srelocated; // start address of .relocated section (somewhere within SRAM) extern(C) extern __gshared c_ulong _erelocated; // end address of .relocated section (somewhere within SRAM) extern(C) extern __gshared c_ulong _szeroed; // start address of .zeroed section (somewhere within SRAM or CCMRAM) extern(C) extern __gshared c_ulong _ezeroed; // end address of .zeroed section (somewhere within SRAM or CCMRAM) // Create a convenience alias for our vector functions: //alias extern(C) const void function() VectorFunc; // currently, this won't work for me alias extern(C) const void *VectorFunc; // so I'm using a void* instead. @rst extern(C) void Reset_Handler(); @exc extern(C) void NMI_Handler(); @exc extern(C) void HardFault_Handler(); @exc extern(C) void MemManage_Handler(); @exc extern(C) void BusFault_Handler(); @exc extern(C) void UsageFault_Handler(); @exc extern(C) void SVC_Handler(); @exc extern(C) void DebugMon_Handler(); @exc extern(C) void PendSV_Handler(); @exc extern(C) void SysTick_Handler(); @exc extern(C) void WWDG_IRQHandler(); @exc extern(C) void PVD_IRQHandler(); @exc extern(C) void TAMP_STAMP_IRQHandler(); @exc extern(C) void RTC_WKUP_IRQHandler(); @exc extern(C) void FLASH_IRQHandler(); @exc extern(C) void RCC_IRQHandler(); @exc extern(C) void EXTI0_IRQHandler(); @exc extern(C) void EXTI1_IRQHandler(); @exc extern(C) void EXTI2_IRQHandler(); @exc extern(C) void EXTI3_IRQHandler(); @exc extern(C) void EXTI4_IRQHandler(); @exc extern(C) void DMA1_Stream0_IRQHandler(); @exc extern(C) void DMA1_Stream1_IRQHandler(); @exc extern(C) void DMA1_Stream2_IRQHandler(); @exc extern(C) void DMA1_Stream3_IRQHandler(); @exc extern(C) void DMA1_Stream4_IRQHandler(); @exc extern(C) void DMA1_Stream5_IRQHandler(); @exc extern(C) void DMA1_Stream6_IRQHandler(); @exc extern(C) void ADC_IRQHandler(); @exc extern(C) void CAN1_TX_IRQHandler(); @exc extern(C) void CAN1_RX0_IRQHandler(); @exc extern(C) void CAN1_RX1_IRQHandler(); @exc extern(C) void CAN1_SCE_IRQHandler(); @exc extern(C) void EXTI9_5_IRQHandler(); @exc extern(C) void TIM1_BRK_TIM9_IRQHandler(); @exc extern(C) void TIM1_UP_TIM10_IRQHandler(); @exc extern(C) void TIM1_TRG_COM_TIM11_IRQHandler(); @exc extern(C) void TIM1_CC_IRQHandler(); @exc extern(C) void TIM2_IRQHandler(); @exc extern(C) void TIM3_IRQHandler(); @exc extern(C) void TIM4_IRQHandler(); @exc extern(C) void I2C1_EV_IRQHandler(); @exc extern(C) void I2C1_ER_IRQHandler(); @exc extern(C) void I2C2_EV_IRQHandler(); @exc extern(C) void I2C2_ER_IRQHandler(); @exc extern(C) void SPI1_IRQHandler(); @exc extern(C) void SPI2_IRQHandler(); @exc extern(C) void USART1_IRQHandler(); @exc extern(C) void USART2_IRQHandler(); @exc extern(C) void USART3_IRQHandler(); @exc extern(C) void EXTI15_10_IRQHandler(); @exc extern(C) void RTC_Alarm_IRQHandler(); @exc extern(C) void OTG_FS_WKUP_IRQHandler(); @exc extern(C) void TIM8_BRK_TIM12_IRQHandler(); @exc extern(C) void TIM8_UP_TIM13_IRQHandler(); @exc extern(C) void TIM8_TRG_COM_TIM14_IRQHandler(); @exc extern(C) void TIM8_CC_IRQHandler(); @exc extern(C) void DMA1_Stream7_IRQHandler(); @exc extern(C) void FMC_IRQHandler(); @exc extern(C) void SDMMC1_IRQHandler(); @exc extern(C) void TIM5_IRQHandler(); @exc extern(C) void SPI3_IRQHandler(); @exc extern(C) void UART4_IRQHandler(); @exc extern(C) void UART5_IRQHandler(); @exc extern(C) void TIM6_DAC_IRQHandler(); @exc extern(C) void TIM7_IRQHandler(); @exc extern(C) void DMA2_Stream0_IRQHandler(); @exc extern(C) void DMA2_Stream1_IRQHandler(); @exc extern(C) void DMA2_Stream2_IRQHandler(); @exc extern(C) void DMA2_Stream3_IRQHandler(); @exc extern(C) void DMA2_Stream4_IRQHandler(); @exc extern(C) void ETH_IRQHandler(); @exc extern(C) void ETH_WKUP_IRQHandler(); @exc extern(C) void CAN2_TX_IRQHandler(); @exc extern(C) void CAN2_RX0_IRQHandler(); @exc extern(C) void CAN2_RX1_IRQHandler(); @exc extern(C) void CAN2_SCE_IRQHandler(); @exc extern(C) void OTG_FS_IRQHandler(); @exc extern(C) void DMA2_Stream5_IRQHandler(); @exc extern(C) void DMA2_Stream6_IRQHandler(); @exc extern(C) void DMA2_Stream7_IRQHandler(); @exc extern(C) void USART6_IRQHandler(); @exc extern(C) void I2C3_EV_IRQHandler(); @exc extern(C) void I2C3_ER_IRQHandler(); @exc extern(C) void OTG_HS_EP1_OUT_IRQHandler(); @exc extern(C) void OTG_HS_EP1_IN_IRQHandler(); @exc extern(C) void OTG_HS_WKUP_IRQHandler(); @exc extern(C) void OTG_HS_IRQHandler(); @exc extern(C) void DCMI_IRQHandler(); @exc extern(C) void RNG_IRQHandler(); @exc extern(C) void FPU_IRQHandler(); @exc extern(C) void UART7_IRQHandler(); @exc extern(C) void UART8_IRQHandler(); @exc extern(C) void SPI4_IRQHandler(); @exc extern(C) void SPI5_IRQHandler(); @exc extern(C) void SPI6_IRQHandler(); @exc extern(C) void SAI1_IRQHandler(); @exc extern(C) void LTDC_IRQHandler(); @exc extern(C) void LTDC_ER_IRQHandler(); @exc extern(C) void DMA2D_IRQHandler(); @exc extern(C) void SAI2_IRQHandler(); @exc extern(C) void QUADSPI_IRQHandler(); @exc extern(C) void LPTIM1_IRQHandler(); @exc extern(C) void CEC_IRQHandler(); @exc extern(C) void I2C4_EV_IRQHandler(); @exc extern(C) void I2C4_ER_IRQHandler(); @exc extern(C) void SPDIF_RX_IRQHandler(); @isr_vector VectorFunc[114] g_pfnVectors = [ cast(VectorFunc)&_stack, /* -16 $0000 Initial Stack Pointer */ &Reset_Handler, /* -15 $0004 Reset Vector */ &NMI_Handler, /* -14 $0008 Non Maskable Interrupt Vector */ &HardFault_Handler, /* -13 $000c Hard Fault Vector */ &MemManage_Handler, /* -12 $0010 Memory Protection Unit Fault Vector */ &BusFault_Handler, /* -11 $0014 Bus Fault Vector */ &UsageFault_Handler, /* -10 $0018 Usage Fault Vector */ cast(VectorFunc)0, /* -9 $001c Reserved */ cast(VectorFunc)0, /* -8 $0020 Reserved */ cast(VectorFunc)0, /* -7 $0024 Reserved */ cast(VectorFunc)0, /* -6 $0028 Reserved */ &SVC_Handler, /* -5 $002c SuperVisor Call Vector */ &DebugMon_Handler, /* -4 $0030 Debug Monitor Vector */ cast(VectorFunc)0, /* -3 $0034 Reserved */ &PendSV_Handler, /* -2 $0038 Pending SuperVisor Vector */ &SysTick_Handler, /* -1 $003c System Tick Vector */ &WWDG_IRQHandler, /* 0 $0040 Windowed WatchDog */ &PVD_IRQHandler, /* 1 $0044 PVD through EXTI Line detection */ &TAMP_STAMP_IRQHandler, /* 2 $0048 Tamper and TimeStamps through the EXTI line */ &RTC_WKUP_IRQHandler, /* 3 $004c RTC Wakeup through the EXTI line */ &FLASH_IRQHandler, /* 4 $0050 FLASH */ &RCC_IRQHandler, /* 5 $0054 RCC */ &EXTI0_IRQHandler, /* 6 $0058 EXTI Line0 */ &EXTI1_IRQHandler, /* 7 $005c EXTI Line1 */ &EXTI2_IRQHandler, /* 8 $0060 EXTI Line2 */ &EXTI3_IRQHandler, /* 9 $0064 EXTI Line3 */ &EXTI4_IRQHandler, /* 10 $0068 EXTI Line4 */ &DMA1_Stream0_IRQHandler, /* 11 $006c DMA1 Stream 0 */ &DMA1_Stream1_IRQHandler, /* 12 $0070 DMA1 Stream 1 */ &DMA1_Stream2_IRQHandler, /* 13 $0074 DMA1 Stream 2 */ &DMA1_Stream3_IRQHandler, /* 14 $0078 DMA1 Stream 3 */ &DMA1_Stream4_IRQHandler, /* 15 $007c DMA1 Stream 4 */ &DMA1_Stream5_IRQHandler, /* 16 $0080 DMA1 Stream 5 */ &DMA1_Stream6_IRQHandler, /* 17 $0084 DMA1 Stream 6 */ &ADC_IRQHandler, /* 18 $0088 ADC1, ADC2 and ADC3s */ &CAN1_TX_IRQHandler, /* 19 $008c CAN1 TX */ &CAN1_RX0_IRQHandler, /* 20 $0090 CAN1 RX0 */ &CAN1_RX1_IRQHandler, /* 21 $0094 CAN1 RX1 */ &CAN1_SCE_IRQHandler, /* 22 $0098 CAN1 SCE */ &EXTI9_5_IRQHandler, /* 23 $009c External Line[9:5]s */ &TIM1_BRK_TIM9_IRQHandler, /* 24 $00a0 TIM1 Break and TIM9 */ &TIM1_UP_TIM10_IRQHandler, /* 25 $00a4 TIM1 Update and TIM10 */ &TIM1_TRG_COM_TIM11_IRQHandler, /* 26 $00a8 TIM1 Trigger and Commutation and TIM11 */ &TIM1_CC_IRQHandler, /* 27 $00ac TIM1 Capture Compare */ &TIM2_IRQHandler, /* 28 $00b0 TIM2 */ &TIM3_IRQHandler, /* 29 $00b4 TIM3 */ &TIM4_IRQHandler, /* 30 $00b8 TIM4 */ &I2C1_EV_IRQHandler, /* 31 $00bc I2C1 Event */ &I2C1_ER_IRQHandler, /* 32 $00c0 I2C1 Error */ &I2C2_EV_IRQHandler, /* 33 $00c4 I2C2 Event */ &I2C2_ER_IRQHandler, /* 34 $00c8 I2C2 Error */ &SPI1_IRQHandler, /* 35 $00cc SPI1 */ &SPI2_IRQHandler, /* 36 $00d0 SPI2 */ &USART1_IRQHandler, /* 37 $00d4 USART1 */ &USART2_IRQHandler, /* 38 $00d8 USART2 */ &USART3_IRQHandler, /* 39 $00dc USART3 */ &EXTI15_10_IRQHandler, /* 40 $00e0 External Line[15:10]s */ &RTC_Alarm_IRQHandler, /* 41 $00e4 RTC Alarm (A and B) through EXTI Line */ &OTG_FS_WKUP_IRQHandler, /* 42 $00e8 USB OTG FS Wakeup through EXTI line */ &TIM8_BRK_TIM12_IRQHandler, /* 43 $00ec TIM8 Break and TIM12 */ &TIM8_UP_TIM13_IRQHandler, /* 44 $00f0 TIM8 Update and TIM13 */ &TIM8_TRG_COM_TIM14_IRQHandler, /* 45 $00f4 TIM8 Trigger and Commutation and TIM14 */ &TIM8_CC_IRQHandler, /* 46 $00f8 TIM8 Capture Compare */ &DMA1_Stream7_IRQHandler, /* 47 $00fc DMA1 Stream7 */ &FMC_IRQHandler, /* 48 $0100 FMC */ &SDMMC1_IRQHandler, /* 49 $0104 SDMMC1 */ &TIM5_IRQHandler, /* 50 $0108 TIM5 */ &SPI3_IRQHandler, /* 51 $010c SPI3 */ &UART4_IRQHandler, /* 52 $0110 UART4 */ &UART5_IRQHandler, /* 53 $0114 UART5 */ &TIM6_DAC_IRQHandler, /* 54 $0118 TIM6 and DAC1&2 underrun errors */ &TIM7_IRQHandler, /* 55 $011c TIM7 */ &DMA2_Stream0_IRQHandler, /* 56 $0120 DMA2 Stream 0 */ &DMA2_Stream1_IRQHandler, /* 57 $0124 DMA2 Stream 1 */ &DMA2_Stream2_IRQHandler, /* 58 $0128 DMA2 Stream 2 */ &DMA2_Stream3_IRQHandler, /* 59 $012c DMA2 Stream 3 */ &DMA2_Stream4_IRQHandler, /* 60 $0130 DMA2 Stream 4 */ &ETH_IRQHandler, /* 61 $0134 Ethernet */ &ETH_WKUP_IRQHandler, /* 62 $0138 Ethernet Wakeup through EXTI line */ &CAN2_TX_IRQHandler, /* 63 $013c CAN2 TX */ &CAN2_RX0_IRQHandler, /* 64 $0140 CAN2 RX0 */ &CAN2_RX1_IRQHandler, /* 65 $0144 CAN2 RX1 */ &CAN2_SCE_IRQHandler, /* 66 $0148 CAN2 SCE */ &OTG_FS_IRQHandler, /* 67 $014c USB OTG FS */ &DMA2_Stream5_IRQHandler, /* 68 $0150 DMA2 Stream 5 */ &DMA2_Stream6_IRQHandler, /* 69 $0154 DMA2 Stream 6 */ &DMA2_Stream7_IRQHandler, /* 70 $0158 DMA2 Stream 7 */ &USART6_IRQHandler, /* 71 $015c USART6 */ &I2C3_EV_IRQHandler, /* 72 $0160 I2C3 event */ &I2C3_ER_IRQHandler, /* 73 $0164 I2C3 error */ &OTG_HS_EP1_OUT_IRQHandler, /* 74 $0168 USB OTG HS End Point 1 Out */ &OTG_HS_EP1_IN_IRQHandler, /* 75 $016c USB OTG HS End Point 1 In */ &OTG_HS_WKUP_IRQHandler, /* 76 $0170 USB OTG HS Wakeup through EXTI */ &OTG_HS_IRQHandler, /* 77 $0174 USB OTG HS */ &DCMI_IRQHandler, /* 78 $0178 DCMI */ cast(VectorFunc)0, /* 79 $017c Reserved */ &RNG_IRQHandler, /* 80 $0180 Rng */ &FPU_IRQHandler, /* 81 $0184 FPU */ &UART7_IRQHandler, /* 82 $0188 UART7 */ &UART8_IRQHandler, /* 83 $018c UART8 */ &SPI4_IRQHandler, /* 84 $0190 SPI4 */ &SPI5_IRQHandler, /* 85 $0194 SPI5 */ &SPI6_IRQHandler, /* 86 $0198 SPI6 */ &SAI1_IRQHandler, /* 87 $019c SAI1 */ &LTDC_IRQHandler, /* 88 $01a0 LTDC */ &LTDC_ER_IRQHandler, /* 89 $01a4 LTDC error */ &DMA2D_IRQHandler, /* 90 $01a8 DMA2D */ &SAI2_IRQHandler, /* 91 $01ac SAI2 */ &QUADSPI_IRQHandler, /* 92 $01b0 QUADSPI */ &LPTIM1_IRQHandler, /* 93 $01b4 LPTIM1 */ &CEC_IRQHandler, /* 94 $01b8 HDMI_CEC */ &I2C4_EV_IRQHandler, /* 95 $01bc I2C4 Event */ &I2C4_ER_IRQHandler, /* 96 $01c0 I2C4 Error */ &SPDIF_RX_IRQHandler, /* 97 $01c4 SPDIF_RX */ ]; @weak extern(C) void LowLevelInit(); @weak extern(C) void SystemInit(); @weak extern(C) void __libc_init_array(); @weak extern(C) extern __gshared c_ulong SystemCoreClock; extern(C) void main(); void copyBlock(const(void) *aSource, void *aDestination, void *aDestinationEnd) { const(uint32_t) *s = cast(const(uint32_t) *)aSource; uint32_t *d = cast(uint32_t *)aDestination; uint32_t *e = cast(uint32_t *)aDestinationEnd; while(d < e) { *d++ = *s++; } } void zeroBlock(void *aDestination, void *aDestinationEnd) { uint32_t *d = cast(uint32_t *)aDestination; uint32_t *e = cast(uint32_t *)aDestinationEnd; while(d < e) { *d++ = 0; } } @naked extern(C) void defaultResetHandler() /* we can mark this naked, as it never returns and should never save any registers on the stack */ { uint32_t saveFreq; LowLevelInit(); SystemInit(); saveFreq = SystemCoreClock; copyBlock(&_siccmram, &_sccmram, &_eccmram); copyBlock(&_sirelocated, &_srelocated, &_erelocated); zeroBlock(&_szeroed, &_ezeroed); __libc_init_array(); if(&SystemCoreClock) SystemCoreClock = saveFreq; main(); defaultExceptionHandler(); } @naked extern(C) void defaultExceptionHandler() { while(true) { wfi(); } }
D
/Users/shimmennobuyoshi/Desktop/OnTheMap/Build/Intermediates/OnTheMap.build/Debug-iphonesimulator/OnTheMap.build/Objects-normal/x86_64/UdacityAnnotation.o : /Users/shimmennobuyoshi/Desktop/OnTheMap/OnTheMap/UdacityAnnotation.swift /Users/shimmennobuyoshi/Desktop/OnTheMap/OnTheMap/UIColorExtension.swift /Users/shimmennobuyoshi/Desktop/OnTheMap/OnTheMap/UdacityViewController.swift /Users/shimmennobuyoshi/Desktop/OnTheMap/OnTheMap/ParseConstants.swift /Users/shimmennobuyoshi/Desktop/OnTheMap/OnTheMap/UdacityStudent.swift /Users/shimmennobuyoshi/Desktop/OnTheMap/OnTheMap/MapViewController.swift /Users/shimmennobuyoshi/Desktop/OnTheMap/OnTheMap/PostingViewController.swift /Users/shimmennobuyoshi/Desktop/OnTheMap/OnTheMap/LoginViewController.swift /Users/shimmennobuyoshi/Desktop/OnTheMap/OnTheMap/UdacityConstants.swift /Users/shimmennobuyoshi/Desktop/OnTheMap/OnTheMap/ParseClient.swift /Users/shimmennobuyoshi/Desktop/OnTheMap/OnTheMap/AppDelegate.swift /Users/shimmennobuyoshi/Desktop/OnTheMap/OnTheMap/UdacityClient.swift /Users/shimmennobuyoshi/Desktop/OnTheMap/OnTheMap/ListViewController.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/Swift.swiftmodule /Users/shimmennobuyoshi/Desktop/OnTheMap/OnTheMap/OnTheMap-Bridging-Header.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/Parse.h /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/Security.swiftmodule /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFACL.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFNullability.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFAnalytics.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFConstants.h /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/CoreImage.swiftmodule /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFAnonymousUtils.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFUser.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFObject.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFSubclassing.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFCloud.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFConfig.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFFile.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFGeoPoint.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFObject+Subclass.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFQuery.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFRelation.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFRole.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFSession.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFInstallation.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFNetworkActivityIndicatorManager.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFProduct.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFPurchase.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFPush.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFTwitterUtils.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PF_Twitter.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKCoreKit/FBSDKCoreKit.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKCoreKit/FBSDKAccessToken.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKCoreKit/FBSDKCopying.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKCoreKit/FBSDKGraphRequestConnection.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKCoreKit/FBSDKMacros.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKCoreKit/FBSDKAppEvents.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKCoreKit/FBSDKAppLinkUtility.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKCoreKit/FBSDKApplicationDelegate.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKCoreKit/FBSDKConstants.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKCoreKit/FBSDKGraphRequest.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKCoreKit/FBSDKMutableCopying.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKCoreKit/FBSDKProfile.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKCoreKit/FBSDKProfilePictureView.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKCoreKit/FBSDKSettings.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKCoreKit/FBSDKUtility.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKShareKit.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKAppGroupAddDialog.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKAppGroupContent.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKAppGroupJoinDialog.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKAppInviteContent.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKAppInviteDialog.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKGameRequestContent.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKGameRequestDialog.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKLikeButton.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKCoreKit/FBSDKButton.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKLikeObjectType.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKLiking.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKLikeControl.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKMessageDialog.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKSharing.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKSharingContent.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKSendButton.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKSharingButton.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKShareAPI.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKShareOpenGraphObject.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKShareOpenGraphValueContainer.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKShareButton.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKShareConstants.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKShareDialog.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKShareDialogMode.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKShareLinkContent.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKShareOpenGraphAction.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKShareOpenGraphContent.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKSharePhoto.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKSharePhotoContent.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKShareVideo.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKShareVideoContent.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginButton.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginManager.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKLoginKit/FBSDKLoginKit/FBSDKTooltipView.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginConstants.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginManagerLoginResult.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginTooltipView.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/ParseFacebookUtilsV4/PFFacebookUtils.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Bolts/BFTask.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Build/Intermediates/OnTheMap.build/Debug-iphonesimulator/OnTheMap.build/Objects-normal/x86_64/UdacityAnnotation~partial.swiftmodule : /Users/shimmennobuyoshi/Desktop/OnTheMap/OnTheMap/UdacityAnnotation.swift /Users/shimmennobuyoshi/Desktop/OnTheMap/OnTheMap/UIColorExtension.swift /Users/shimmennobuyoshi/Desktop/OnTheMap/OnTheMap/UdacityViewController.swift /Users/shimmennobuyoshi/Desktop/OnTheMap/OnTheMap/ParseConstants.swift /Users/shimmennobuyoshi/Desktop/OnTheMap/OnTheMap/UdacityStudent.swift /Users/shimmennobuyoshi/Desktop/OnTheMap/OnTheMap/MapViewController.swift /Users/shimmennobuyoshi/Desktop/OnTheMap/OnTheMap/PostingViewController.swift /Users/shimmennobuyoshi/Desktop/OnTheMap/OnTheMap/LoginViewController.swift /Users/shimmennobuyoshi/Desktop/OnTheMap/OnTheMap/UdacityConstants.swift /Users/shimmennobuyoshi/Desktop/OnTheMap/OnTheMap/ParseClient.swift /Users/shimmennobuyoshi/Desktop/OnTheMap/OnTheMap/AppDelegate.swift /Users/shimmennobuyoshi/Desktop/OnTheMap/OnTheMap/UdacityClient.swift /Users/shimmennobuyoshi/Desktop/OnTheMap/OnTheMap/ListViewController.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/Swift.swiftmodule /Users/shimmennobuyoshi/Desktop/OnTheMap/OnTheMap/OnTheMap-Bridging-Header.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/Parse.h /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/Security.swiftmodule /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFACL.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFNullability.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFAnalytics.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFConstants.h /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/CoreImage.swiftmodule /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFAnonymousUtils.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFUser.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFObject.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFSubclassing.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFCloud.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFConfig.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFFile.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFGeoPoint.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFObject+Subclass.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFQuery.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFRelation.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFRole.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFSession.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFInstallation.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFNetworkActivityIndicatorManager.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFProduct.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFPurchase.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFPush.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFTwitterUtils.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PF_Twitter.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKCoreKit/FBSDKCoreKit.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKCoreKit/FBSDKAccessToken.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKCoreKit/FBSDKCopying.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKCoreKit/FBSDKGraphRequestConnection.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKCoreKit/FBSDKMacros.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKCoreKit/FBSDKAppEvents.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKCoreKit/FBSDKAppLinkUtility.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKCoreKit/FBSDKApplicationDelegate.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKCoreKit/FBSDKConstants.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKCoreKit/FBSDKGraphRequest.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKCoreKit/FBSDKMutableCopying.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKCoreKit/FBSDKProfile.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKCoreKit/FBSDKProfilePictureView.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKCoreKit/FBSDKSettings.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKCoreKit/FBSDKUtility.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKShareKit.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKAppGroupAddDialog.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKAppGroupContent.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKAppGroupJoinDialog.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKAppInviteContent.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKAppInviteDialog.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKGameRequestContent.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKGameRequestDialog.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKLikeButton.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKCoreKit/FBSDKButton.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKLikeObjectType.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKLiking.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKLikeControl.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKMessageDialog.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKSharing.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKSharingContent.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKSendButton.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKSharingButton.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKShareAPI.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKShareOpenGraphObject.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKShareOpenGraphValueContainer.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKShareButton.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKShareConstants.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKShareDialog.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKShareDialogMode.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKShareLinkContent.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKShareOpenGraphAction.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKShareOpenGraphContent.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKSharePhoto.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKSharePhotoContent.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKShareVideo.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKShareVideoContent.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginButton.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginManager.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKLoginKit/FBSDKLoginKit/FBSDKTooltipView.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginConstants.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginManagerLoginResult.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginTooltipView.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/ParseFacebookUtilsV4/PFFacebookUtils.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Bolts/BFTask.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Build/Intermediates/OnTheMap.build/Debug-iphonesimulator/OnTheMap.build/Objects-normal/x86_64/UdacityAnnotation~partial.swiftdoc : /Users/shimmennobuyoshi/Desktop/OnTheMap/OnTheMap/UdacityAnnotation.swift /Users/shimmennobuyoshi/Desktop/OnTheMap/OnTheMap/UIColorExtension.swift /Users/shimmennobuyoshi/Desktop/OnTheMap/OnTheMap/UdacityViewController.swift /Users/shimmennobuyoshi/Desktop/OnTheMap/OnTheMap/ParseConstants.swift /Users/shimmennobuyoshi/Desktop/OnTheMap/OnTheMap/UdacityStudent.swift /Users/shimmennobuyoshi/Desktop/OnTheMap/OnTheMap/MapViewController.swift /Users/shimmennobuyoshi/Desktop/OnTheMap/OnTheMap/PostingViewController.swift /Users/shimmennobuyoshi/Desktop/OnTheMap/OnTheMap/LoginViewController.swift /Users/shimmennobuyoshi/Desktop/OnTheMap/OnTheMap/UdacityConstants.swift /Users/shimmennobuyoshi/Desktop/OnTheMap/OnTheMap/ParseClient.swift /Users/shimmennobuyoshi/Desktop/OnTheMap/OnTheMap/AppDelegate.swift /Users/shimmennobuyoshi/Desktop/OnTheMap/OnTheMap/UdacityClient.swift /Users/shimmennobuyoshi/Desktop/OnTheMap/OnTheMap/ListViewController.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/Swift.swiftmodule /Users/shimmennobuyoshi/Desktop/OnTheMap/OnTheMap/OnTheMap-Bridging-Header.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/Parse.h /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/Security.swiftmodule /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFACL.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFNullability.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFAnalytics.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFConstants.h /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/CoreImage.swiftmodule /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFAnonymousUtils.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFUser.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFObject.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFSubclassing.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFCloud.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFConfig.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFFile.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFGeoPoint.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFObject+Subclass.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFQuery.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFRelation.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFRole.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFSession.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFInstallation.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFNetworkActivityIndicatorManager.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFProduct.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFPurchase.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFPush.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PFTwitterUtils.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Parse/PF_Twitter.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKCoreKit/FBSDKCoreKit.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKCoreKit/FBSDKAccessToken.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKCoreKit/FBSDKCopying.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKCoreKit/FBSDKGraphRequestConnection.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKCoreKit/FBSDKMacros.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKCoreKit/FBSDKAppEvents.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKCoreKit/FBSDKAppLinkUtility.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKCoreKit/FBSDKApplicationDelegate.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKCoreKit/FBSDKConstants.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKCoreKit/FBSDKGraphRequest.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKCoreKit/FBSDKMutableCopying.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKCoreKit/FBSDKProfile.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKCoreKit/FBSDKProfilePictureView.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKCoreKit/FBSDKSettings.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKCoreKit/FBSDKUtility.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKShareKit.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKAppGroupAddDialog.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKAppGroupContent.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKAppGroupJoinDialog.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKAppInviteContent.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKAppInviteDialog.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKGameRequestContent.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKGameRequestDialog.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKLikeButton.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKCoreKit/FBSDKButton.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKLikeObjectType.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKLiking.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKLikeControl.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKMessageDialog.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKSharing.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKSharingContent.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKSendButton.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKSharingButton.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKShareAPI.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKShareOpenGraphObject.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKShareOpenGraphValueContainer.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKShareButton.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKShareConstants.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKShareDialog.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKShareDialogMode.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKShareLinkContent.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKShareOpenGraphAction.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKShareOpenGraphContent.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKSharePhoto.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKSharePhotoContent.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKShareVideo.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKShareKit/FBSDKShareKit/FBSDKShareVideoContent.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginButton.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginManager.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKLoginKit/FBSDKLoginKit/FBSDKTooltipView.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginConstants.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginManagerLoginResult.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginTooltipView.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/ParseFacebookUtilsV4/PFFacebookUtils.h /Users/shimmennobuyoshi/Desktop/OnTheMap/Pods/Headers/Public/Bolts/BFTask.h
D
relating to or concerned with the formation of admissible words in a language pertaining to geological structure relating to or concerned with the morphology of plants and animals
D
import std.stdio; import std.range; import std.conv; import core.stdc.stdlib; import lib.funcs; import thing; import parser; import vector; import intern; Vector!Node todo; Vector!Value stack; Vector!(Value[Intern]) locals; static this() { Value[Intern] base; void first(string k, Value v) { base[Intern(k)] = v; } first("nil", makeThing()); first("true", makeThing(true)); first("false", makeThing(false)); first("+", dFunc("+")); first("-", dFunc("-")); first("*", dFunc("*")); first("/", dFunc("/")); first("%", dFunc("%")); first("=", dFunc("=")); first("!=", dFunc("!=")); first("<", dFunc("<")); first(">", dFunc(">")); first("<=", dFunc("<=")); first(">=", dFunc(">=")); first("cat", dFunc("cat")); first("strip", dFunc("strip")); first("to-json", dFunc("to-json")); first("exec", dFunc("exec")); first("system", dFunc("system")); first("make-world", dFunc("make-world")); first("save-to", dFunc("save-to")); first("read-from", dFunc("read-from")); first("if", dFunc("if")); first("while", dFunc("while")); first("pass", dFunc("pass")); first("set", dFunc("set")); first("proc", dFunc("proc")); first("lambda", dFunc("lambda")); first("print", dFunc("print")); first("write", dFunc("write")); first("table", dFunc("table")); first("table-index", dFunc("table-index")); first("table-set", dFunc("table-set")); first("list", dFunc("list")); first("list-index", dFunc("list-index")); first("list-set", dFunc("list-set")); locals ~= base; Value[Intern] second; locals ~= second; } Value getLocal(Intern s) { Value* tops = s in locals[$ - 1]; if (tops) { return *tops; } tops = s in locals[0]; if (tops) { return *tops; } tops = s in locals[1]; if (tops) { return *tops; } for (size_t i = locals.length; i > 0; i--) { tops = s in locals[i]; if (tops) { return *tops; } } throw new Exception("cannot find " ~ s.val); } void run() { runloop: while (todo.length != 0) { Node cur = todo[$ - 1]; todo.popBack; final switch (cur.type) { case Node.Type.NONE: break; case Node.Type.POP: stack.popBack; break; case Node.Type.POPV: stack[$ - 2] = stack[$ - 1]; stack.popBack; break; case Node.Type.PUSH: stack ~= cur.value.value; break; case Node.Type.LOAD: stack ~= getLocal(cur.value.interned); break; case Node.Type.CALL: size_t len = cur.value.nodes.length; Node doc; doc.type = Node.Type.DOCALL; doc.value.unum = len - 1; todo ~= doc; foreach_reverse (node; cur.value.nodes) { todo ~= node; } break; case Node.Type.DOCALL: Args args = Args(stack[$ - cur.value.unum .. $]); stack.length -= cur.value.unum; Value last = stack[$ - 1]; stack.popBack; while (true) { switch (last.type) { case Value.Type.NODES: Proc proc = last.get!Proc; callNodes(proc, args); continue runloop; case Value.Type.FUNC: stack ~= last.value.f.dfunc(args); continue runloop; case Value.Type.STRING: last = getLocal(Intern(last.get!string)); break; case Value.Type.INTERN: last = getLocal(last.get!Intern); break; default: throw new Exception("not callable " ~ last.to!string); } } break; case Node.Type.ENTER: locals ~= cur.value.table; break; case Node.Type.EXIT: locals.popBack; break; } } } void callNodes(bool scoped = true)(Proc proc, Args args) { Node[] nodes = proc.nodes; static if (scoped) { Node exNode; exNode.type = Node.Type.EXIT; todo ~= exNode; } foreach_reverse (i, node; nodes) { todo ~= node; if (i != 0) { Node popNode; popNode.type = Node.Type.POP; todo ~= popNode; } } if (nodes.length == 0) { Node nn; nn.type = Node.Type.PUSH; nn.value.value = nil; todo ~= nn; } static if (scoped) { Node enNode; enNode.type = Node.Type.ENTER; Value[Intern] argt; foreach (i, v; args) { argt[proc.args[i]] = v; } enNode.value.table = argt; todo ~= enNode; } } void runNode(Node n) { todo ~= n; }
D
module android.java.android.view.View_OnLongClickListener_d_interface; import arsd.jni : IJavaObjectImplementation, JavaPackageId, JavaName, IJavaObject, ImportExportImpl, JavaInterfaceMembers; static import arsd.jni; import import0 = android.java.android.view.View_d_interface; import import1 = android.java.java.lang.Class_d_interface; @JavaName("View$OnLongClickListener") final class View_OnLongClickListener : IJavaObject { static immutable string[] _d_canCastTo = [ ]; @Import bool onLongClick(import0.View); @Import import1.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/view/View$OnLongClickListener;"; }
D
# FIXED Startup/icall_startup.obj: C:/ti/simplelink_cc26x2_sdk_2_30_00_34/source/ti/ble5stack/common/cc26xx/icall_startup.c Startup/icall_startup.obj: C:/ti/simplelink_cc26x2_sdk_2_30_00_34/source/ti/ble5stack/hal/src/target/_common/hal_types.h Startup/icall_startup.obj: C:/ti/simplelink_cc26x2_sdk_2_30_00_34/source/ti/ble5stack/hal/src/target/_common/../_common/cc26xx/_hal_types.h Startup/icall_startup.obj: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.3.LTS/include/stdint.h Startup/icall_startup.obj: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.3.LTS/include/sys/stdint.h Startup/icall_startup.obj: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.3.LTS/include/sys/cdefs.h Startup/icall_startup.obj: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.3.LTS/include/sys/_types.h Startup/icall_startup.obj: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.3.LTS/include/machine/_types.h Startup/icall_startup.obj: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.3.LTS/include/machine/_stdint.h Startup/icall_startup.obj: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.3.LTS/include/sys/_stdint.h Startup/icall_startup.obj: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.3.LTS/include/stdbool.h Startup/icall_startup.obj: C:/ti/simplelink_cc26x2_sdk_2_30_00_34/source/ti/ble5stack/rom/rom_jt.h Startup/icall_startup.obj: C:/ti/simplelink_cc26x2_sdk_2_30_00_34/source/ti/ble5stack/rom/map_direct.h Startup/icall_startup.obj: C:/ti/simplelink_cc26x2_sdk_2_30_00_34/source/ti/ble5stack/icall/src/inc/icall.h Startup/icall_startup.obj: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.3.LTS/include/stdlib.h Startup/icall_startup.obj: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.3.LTS/include/_ti_config.h Startup/icall_startup.obj: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.3.LTS/include/linkage.h Startup/icall_startup.obj: C:/ti/simplelink_cc26x2_sdk_2_30_00_34/source/ti/ble5stack/hal/src/inc/hal_assert.h Startup/icall_startup.obj: C:/ti/simplelink_cc26x2_sdk_2_30_00_34/source/ti/ble5stack/hal/src/target/_common/hal_types.h Startup/icall_startup.obj: C:/ti/simplelink_cc26x2_sdk_2_30_00_34/source/ti/ble5stack/hal/src/inc/hal_defs.h C:/ti/simplelink_cc26x2_sdk_2_30_00_34/source/ti/ble5stack/common/cc26xx/icall_startup.c: C:/ti/simplelink_cc26x2_sdk_2_30_00_34/source/ti/ble5stack/hal/src/target/_common/hal_types.h: C:/ti/simplelink_cc26x2_sdk_2_30_00_34/source/ti/ble5stack/hal/src/target/_common/../_common/cc26xx/_hal_types.h: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.3.LTS/include/stdint.h: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.3.LTS/include/sys/stdint.h: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.3.LTS/include/sys/cdefs.h: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.3.LTS/include/sys/_types.h: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.3.LTS/include/machine/_types.h: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.3.LTS/include/machine/_stdint.h: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.3.LTS/include/sys/_stdint.h: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.3.LTS/include/stdbool.h: C:/ti/simplelink_cc26x2_sdk_2_30_00_34/source/ti/ble5stack/rom/rom_jt.h: C:/ti/simplelink_cc26x2_sdk_2_30_00_34/source/ti/ble5stack/rom/map_direct.h: C:/ti/simplelink_cc26x2_sdk_2_30_00_34/source/ti/ble5stack/icall/src/inc/icall.h: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.3.LTS/include/stdlib.h: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.3.LTS/include/_ti_config.h: C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.3.LTS/include/linkage.h: C:/ti/simplelink_cc26x2_sdk_2_30_00_34/source/ti/ble5stack/hal/src/inc/hal_assert.h: C:/ti/simplelink_cc26x2_sdk_2_30_00_34/source/ti/ble5stack/hal/src/target/_common/hal_types.h: C:/ti/simplelink_cc26x2_sdk_2_30_00_34/source/ti/ble5stack/hal/src/inc/hal_defs.h:
D
# FIXED Profiles/gatt_uuid.obj: D:/ti/simplelink_cc13x2_26x2_sdk_4_40_04_04/source/ti/ble5stack/host/gatt_uuid.c Profiles/gatt_uuid.obj: D:/ti/simplelink_cc13x2_26x2_sdk_4_40_04_04/source/ti/ble5stack/osal/src/inc/comdef.h Profiles/gatt_uuid.obj: D:/ti/simplelink_cc13x2_26x2_sdk_4_40_04_04/source/ti/ble5stack/hal/src/target/_common/hal_types.h Profiles/gatt_uuid.obj: D:/ti/simplelink_cc13x2_26x2_sdk_4_40_04_04/source/ti/ble5stack/hal/src/target/_common/../_common/cc26xx/_hal_types.h Profiles/gatt_uuid.obj: D:/ti/ccs1020/ccs/tools/compiler/ti-cgt-arm_20.2.4.LTS/include/stdint.h Profiles/gatt_uuid.obj: D:/ti/ccs1020/ccs/tools/compiler/ti-cgt-arm_20.2.4.LTS/include/_ti_config.h Profiles/gatt_uuid.obj: D:/ti/ccs1020/ccs/tools/compiler/ti-cgt-arm_20.2.4.LTS/include/linkage.h Profiles/gatt_uuid.obj: D:/ti/ccs1020/ccs/tools/compiler/ti-cgt-arm_20.2.4.LTS/include/_stdint40.h Profiles/gatt_uuid.obj: D:/ti/ccs1020/ccs/tools/compiler/ti-cgt-arm_20.2.4.LTS/include/sys/stdint.h Profiles/gatt_uuid.obj: D:/ti/ccs1020/ccs/tools/compiler/ti-cgt-arm_20.2.4.LTS/include/sys/cdefs.h Profiles/gatt_uuid.obj: D:/ti/ccs1020/ccs/tools/compiler/ti-cgt-arm_20.2.4.LTS/include/sys/_types.h Profiles/gatt_uuid.obj: D:/ti/ccs1020/ccs/tools/compiler/ti-cgt-arm_20.2.4.LTS/include/machine/_types.h Profiles/gatt_uuid.obj: D:/ti/ccs1020/ccs/tools/compiler/ti-cgt-arm_20.2.4.LTS/include/machine/_stdint.h Profiles/gatt_uuid.obj: D:/ti/ccs1020/ccs/tools/compiler/ti-cgt-arm_20.2.4.LTS/include/sys/_stdint.h Profiles/gatt_uuid.obj: D:/ti/ccs1020/ccs/tools/compiler/ti-cgt-arm_20.2.4.LTS/include/stdbool.h Profiles/gatt_uuid.obj: D:/ti/simplelink_cc13x2_26x2_sdk_4_40_04_04/source/ti/ble5stack/hal/src/inc/hal_defs.h Profiles/gatt_uuid.obj: D:/ti/simplelink_cc13x2_26x2_sdk_4_40_04_04/source/ti/ble5stack/osal/src/inc/osal.h Profiles/gatt_uuid.obj: D:/ti/ccs1020/ccs/tools/compiler/ti-cgt-arm_20.2.4.LTS/include/limits.h Profiles/gatt_uuid.obj: D:/ti/simplelink_cc13x2_26x2_sdk_4_40_04_04/source/ti/ble5stack/osal/src/inc/osal_memory.h Profiles/gatt_uuid.obj: D:/ti/simplelink_cc13x2_26x2_sdk_4_40_04_04/source/ti/ble5stack/osal/src/inc/osal_timers.h Profiles/gatt_uuid.obj: D:/ti/simplelink_cc13x2_26x2_sdk_4_40_04_04/source/ti/ble5stack/icall/src/inc/icall.h Profiles/gatt_uuid.obj: D:/ti/ccs1020/ccs/tools/compiler/ti-cgt-arm_20.2.4.LTS/include/stdlib.h Profiles/gatt_uuid.obj: D:/ti/simplelink_cc13x2_26x2_sdk_4_40_04_04/source/ti/ble5stack/hal/src/inc/hal_assert.h Profiles/gatt_uuid.obj: D:/ti/simplelink_cc13x2_26x2_sdk_4_40_04_04/source/ti/ble5stack/hal/src/target/_common/hal_types.h Profiles/gatt_uuid.obj: D:/ti/simplelink_cc13x2_26x2_sdk_4_40_04_04/source/ti/ble5stack/inc/gatt.h Profiles/gatt_uuid.obj: D:/ti/simplelink_cc13x2_26x2_sdk_4_40_04_04/source/ti/ble5stack/inc/bcomdef.h Profiles/gatt_uuid.obj: D:/ti/simplelink_cc13x2_26x2_sdk_4_40_04_04/source/ti/ble5stack/inc/att.h Profiles/gatt_uuid.obj: D:/ti/simplelink_cc13x2_26x2_sdk_4_40_04_04/source/ti/ble5stack/inc/l2cap.h Profiles/gatt_uuid.obj: D:/ti/simplelink_cc13x2_26x2_sdk_4_40_04_04/source/ti/ble5stack/inc/gatt_uuid.h D:/ti/simplelink_cc13x2_26x2_sdk_4_40_04_04/source/ti/ble5stack/host/gatt_uuid.c: D:/ti/simplelink_cc13x2_26x2_sdk_4_40_04_04/source/ti/ble5stack/osal/src/inc/comdef.h: D:/ti/simplelink_cc13x2_26x2_sdk_4_40_04_04/source/ti/ble5stack/hal/src/target/_common/hal_types.h: D:/ti/simplelink_cc13x2_26x2_sdk_4_40_04_04/source/ti/ble5stack/hal/src/target/_common/../_common/cc26xx/_hal_types.h: D:/ti/ccs1020/ccs/tools/compiler/ti-cgt-arm_20.2.4.LTS/include/stdint.h: D:/ti/ccs1020/ccs/tools/compiler/ti-cgt-arm_20.2.4.LTS/include/_ti_config.h: D:/ti/ccs1020/ccs/tools/compiler/ti-cgt-arm_20.2.4.LTS/include/linkage.h: D:/ti/ccs1020/ccs/tools/compiler/ti-cgt-arm_20.2.4.LTS/include/_stdint40.h: D:/ti/ccs1020/ccs/tools/compiler/ti-cgt-arm_20.2.4.LTS/include/sys/stdint.h: D:/ti/ccs1020/ccs/tools/compiler/ti-cgt-arm_20.2.4.LTS/include/sys/cdefs.h: D:/ti/ccs1020/ccs/tools/compiler/ti-cgt-arm_20.2.4.LTS/include/sys/_types.h: D:/ti/ccs1020/ccs/tools/compiler/ti-cgt-arm_20.2.4.LTS/include/machine/_types.h: D:/ti/ccs1020/ccs/tools/compiler/ti-cgt-arm_20.2.4.LTS/include/machine/_stdint.h: D:/ti/ccs1020/ccs/tools/compiler/ti-cgt-arm_20.2.4.LTS/include/sys/_stdint.h: D:/ti/ccs1020/ccs/tools/compiler/ti-cgt-arm_20.2.4.LTS/include/stdbool.h: D:/ti/simplelink_cc13x2_26x2_sdk_4_40_04_04/source/ti/ble5stack/hal/src/inc/hal_defs.h: D:/ti/simplelink_cc13x2_26x2_sdk_4_40_04_04/source/ti/ble5stack/osal/src/inc/osal.h: D:/ti/ccs1020/ccs/tools/compiler/ti-cgt-arm_20.2.4.LTS/include/limits.h: D:/ti/simplelink_cc13x2_26x2_sdk_4_40_04_04/source/ti/ble5stack/osal/src/inc/osal_memory.h: D:/ti/simplelink_cc13x2_26x2_sdk_4_40_04_04/source/ti/ble5stack/osal/src/inc/osal_timers.h: D:/ti/simplelink_cc13x2_26x2_sdk_4_40_04_04/source/ti/ble5stack/icall/src/inc/icall.h: D:/ti/ccs1020/ccs/tools/compiler/ti-cgt-arm_20.2.4.LTS/include/stdlib.h: D:/ti/simplelink_cc13x2_26x2_sdk_4_40_04_04/source/ti/ble5stack/hal/src/inc/hal_assert.h: D:/ti/simplelink_cc13x2_26x2_sdk_4_40_04_04/source/ti/ble5stack/hal/src/target/_common/hal_types.h: D:/ti/simplelink_cc13x2_26x2_sdk_4_40_04_04/source/ti/ble5stack/inc/gatt.h: D:/ti/simplelink_cc13x2_26x2_sdk_4_40_04_04/source/ti/ble5stack/inc/bcomdef.h: D:/ti/simplelink_cc13x2_26x2_sdk_4_40_04_04/source/ti/ble5stack/inc/att.h: D:/ti/simplelink_cc13x2_26x2_sdk_4_40_04_04/source/ti/ble5stack/inc/l2cap.h: D:/ti/simplelink_cc13x2_26x2_sdk_4_40_04_04/source/ti/ble5stack/inc/gatt_uuid.h:
D
instance Mod_965_STT_Snaf_MT (Npc_Default) { // ------ NSC ------ name = "Snaf"; guild = GIL_OUT; id = 965; voice = 6; flags = 0; npctype = NPCTYPE_main; // ------ Attribute ------ B_SetAttributesToChapter (self, 4); // ------ Kampf-Taktik ------ fight_tactic = FAI_HUMAN_NORMAL; // ------ Equippte Waffen ------ EquipItem (self, ItMw_1h_Sld_Sword); // ------ Inventory ------ B_CreateAmbientInv (self); CreateInvItems (self, ItFo_Addon_LousHammer, 1); // ------ visuals ------ B_SetNpcVisual (self, MALE, "Hum_Head_Fighter", Face_N_Snaf, BodyTex_N, ITAR_SMITH); Mdl_SetModelFatness (self, 2); Mdl_ApplyOverlayMds (self, "Humans_Relaxed.mds"); // ------ NSC-relevante Talente vergeben ------ B_GiveNpcTalents (self); // ------ Kampf-Talente ------ B_SetFightSkills (self, 65); // ------ TA anmelden ------ daily_routine = Rtn_Start_965; }; FUNC VOID Rtn_Start_965 () { TA_Wash_FP (08,00,08,30,"OCR_OUTSIDE_HUT_13_B"); TA_Cook_Cauldron (08,00,12,00,"OCR_CAULDRON_2"); TA_Sit_Chair (12,00,14,00,"OCR_HUT_14"); TA_Cook_Cauldron (14,00,20,00,"OCR_CAULDRON_2"); TA_Smoke_Joint (20,00,22,00,"OCR_CAULDRON_2"); TA_Sleep (22,00,08,00,"OCR_HUT_14"); };
D
// Cairo: Draw and Save a JPeg import std.stdio; import std.conv; import gtk.MainWindow; import gtk.Main; import gtk.Box; import gtk.Widget; import cairo.Context; import gtk.DrawingArea; import gdk.Pixbuf; import gdkpixbuf.Pixbuf; // so we can see which file options exist void main(string[] args) { TestRigWindow testRigWindow; Main.init(args); testRigWindow = new TestRigWindow(); Main.run(); } // main() class TestRigWindow : MainWindow { string title = "Cairo: Draw and Save a JPeg"; AppBox appBox; this() { super(title); setSizeRequest(640, 360); addOnDestroy(&quitApp); appBox = new AppBox(); add(appBox); showAll(); } // this() CONSTRUCTOR void quitApp(Widget widget) { writeln("Bye."); Main.quit(); } // quitApp() } // class TestRigWindow class AppBox : Box { MyDrawingArea myDrawingArea; this() { super(Orientation.VERTICAL, 10); myDrawingArea = new MyDrawingArea(); packStart(myDrawingArea, true, true, 0); // LEFT justify } // this() } // class AppBox class MyDrawingArea : DrawingArea { GtkAllocation size; // the area assigned to the DrawingArea by its parent Pixbuf pixbuf; // an 8-bit/pixel image buffer string[] jpegOptions, jpegOptionValues; int xOffset = 0, yOffset = 0; this() { addOnDraw(&onDraw); } // this() bool onDraw(Scoped!Context context, Widget w) { // set up and draw a rectangle context.setSourceRgb(0.541, 0.835, 0.886); // pen color context.rectangle(150, 100, 340, 170); // rectangle upper-left/lower-right corners context.fill(); // draw the rectangle // set up and draw text context.selectFontFace("Comic Sans MS", CairoFontSlant.NORMAL, CairoFontWeight.NORMAL); // set the font context.setFontSize(15); // set the font size context.setSourceRgb(0.129, 0.220, 0.886); // set the pen color context.moveTo(260, 185); // put the pen in position context.showText("Hello, JPeg World."); // and draw getAllocation(size); // grab the widget's size as allocated by its parent pixbuf = getFromSurface(context.getTarget(), xOffset, yOffset, size.width, size.height); // the contents of the surface go into the buffer // prep and write JPEG file jpegOptions = ["quality"]; jpegOptionValues = ["100"]; if(pixbuf.savev("./rectangle_hw.jpg", "jpeg", jpegOptions, jpegOptionValues)) { writeln("JPEG was successfully saved."); } return(true); } // onDraw() } // class MyDrawingArea
D
/Users/brunodaluz/Desktop/project/Build/Intermediates/project.build/Debug/TemplateKit.build/Objects-normal/x86_64/Print.o : /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Data/TemplateData.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/AST/TemplateEmbed.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Deprecated.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/AST/TemplateSource.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Data/TemplateDataStorage.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Pipeline/ASTCache.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Data/TemplateDataRepresentable.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Utilities/HTMLEscape.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/AST/TemplateSyntaxType.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Tag/Uppercase.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Tag/Lowercase.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Tag/Capitalize.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/AST/TemplateTag.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/AST/TemplateConditional.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/AST/TemplateCustom.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/AST/TemplateExpression.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Tag/Var.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Data/TemplateDataEncoder.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/AST/TemplateIdentifier.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Pipeline/TemplateByteScanner.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Pipeline/TemplateRenderer.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Tag/TagRenderer.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Pipeline/PlaintextRenderer.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/ViewRenderer.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Pipeline/TemplateParser.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Pipeline/TemplateSerializer.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Utilities/TemplateError.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/AST/TemplateIterator.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Tag/Contains.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Utilities/Exports.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Tag/DateFormat.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/AST/TemplateConstant.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Tag/Comment.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Tag/Print.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Tag/Count.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/AST/TemplateDataContext.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Tag/TagContext.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Tag/Raw.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/AST/TemplateRaw.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/View.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/AST/TemplateSyntax.swift /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Users/brunodaluz/Desktop/project/Build/Products/Debug/NIO.framework/Modules/NIO.swiftmodule/x86_64.swiftmodule /Users/brunodaluz/Desktop/project/Build/Products/Debug/Async.framework/Modules/Async.swiftmodule/x86_64.swiftmodule /Users/brunodaluz/Desktop/project/Build/Products/Debug/Service.framework/Modules/Service.swiftmodule/x86_64.swiftmodule /Users/brunodaluz/Desktop/project/Build/Products/Debug/Core.framework/Modules/Core.swiftmodule/x86_64.swiftmodule /Users/brunodaluz/Desktop/project/Build/Products/Debug/Debugging.framework/Modules/Debugging.swiftmodule/x86_64.swiftmodule /Users/brunodaluz/Desktop/project/Build/Products/Debug/COperatingSystem.framework/Modules/COperatingSystem.swiftmodule/x86_64.swiftmodule /Users/brunodaluz/Desktop/project/Build/Products/Debug/NIOConcurrencyHelpers.framework/Modules/NIOConcurrencyHelpers.swiftmodule/x86_64.swiftmodule /Users/brunodaluz/Desktop/project/Build/Products/Debug/Bits.framework/Modules/Bits.swiftmodule/x86_64.swiftmodule /Users/brunodaluz/Desktop/project/Build/Products/Debug/NIOFoundationCompat.framework/Modules/NIOFoundationCompat.swiftmodule/x86_64.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/brunodaluz/Desktop/project/.build/checkouts/swift-nio.git--325538877768392360/Sources/CNIOAtomics/include/cpp_magic.h /Users/brunodaluz/Desktop/project/.build/checkouts/swift-nio.git--325538877768392360/Sources/CNIODarwin/include/c_nio_darwin.h /Users/brunodaluz/Desktop/project/.build/checkouts/swift-nio.git--325538877768392360/Sources/CNIOAtomics/include/c-atomics.h /Users/brunodaluz/Desktop/project/.build/checkouts/swift-nio.git--325538877768392360/Sources/CNIOLinux/include/c_nio_linux.h /Users/brunodaluz/Desktop/project/project.xcodeproj/GeneratedModuleMap/CNIOSHA1/module.modulemap /Users/brunodaluz/Desktop/project/.build/checkouts/swift-nio-zlib-support.git-4597058737275259177/module.modulemap /Users/brunodaluz/Desktop/project/project.xcodeproj/GeneratedModuleMap/CNIODarwin/module.modulemap /Users/brunodaluz/Desktop/project/project.xcodeproj/GeneratedModuleMap/CNIOAtomics/module.modulemap /Users/brunodaluz/Desktop/project/project.xcodeproj/GeneratedModuleMap/CNIOLinux/module.modulemap /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/Darwin.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/brunodaluz/Desktop/project/Build/Intermediates/project.build/Debug/TemplateKit.build/Objects-normal/x86_64/Print~partial.swiftmodule : /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Data/TemplateData.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/AST/TemplateEmbed.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Deprecated.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/AST/TemplateSource.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Data/TemplateDataStorage.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Pipeline/ASTCache.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Data/TemplateDataRepresentable.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Utilities/HTMLEscape.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/AST/TemplateSyntaxType.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Tag/Uppercase.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Tag/Lowercase.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Tag/Capitalize.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/AST/TemplateTag.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/AST/TemplateConditional.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/AST/TemplateCustom.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/AST/TemplateExpression.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Tag/Var.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Data/TemplateDataEncoder.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/AST/TemplateIdentifier.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Pipeline/TemplateByteScanner.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Pipeline/TemplateRenderer.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Tag/TagRenderer.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Pipeline/PlaintextRenderer.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/ViewRenderer.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Pipeline/TemplateParser.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Pipeline/TemplateSerializer.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Utilities/TemplateError.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/AST/TemplateIterator.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Tag/Contains.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Utilities/Exports.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Tag/DateFormat.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/AST/TemplateConstant.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Tag/Comment.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Tag/Print.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Tag/Count.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/AST/TemplateDataContext.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Tag/TagContext.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Tag/Raw.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/AST/TemplateRaw.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/View.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/AST/TemplateSyntax.swift /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Users/brunodaluz/Desktop/project/Build/Products/Debug/NIO.framework/Modules/NIO.swiftmodule/x86_64.swiftmodule /Users/brunodaluz/Desktop/project/Build/Products/Debug/Async.framework/Modules/Async.swiftmodule/x86_64.swiftmodule /Users/brunodaluz/Desktop/project/Build/Products/Debug/Service.framework/Modules/Service.swiftmodule/x86_64.swiftmodule /Users/brunodaluz/Desktop/project/Build/Products/Debug/Core.framework/Modules/Core.swiftmodule/x86_64.swiftmodule /Users/brunodaluz/Desktop/project/Build/Products/Debug/Debugging.framework/Modules/Debugging.swiftmodule/x86_64.swiftmodule /Users/brunodaluz/Desktop/project/Build/Products/Debug/COperatingSystem.framework/Modules/COperatingSystem.swiftmodule/x86_64.swiftmodule /Users/brunodaluz/Desktop/project/Build/Products/Debug/NIOConcurrencyHelpers.framework/Modules/NIOConcurrencyHelpers.swiftmodule/x86_64.swiftmodule /Users/brunodaluz/Desktop/project/Build/Products/Debug/Bits.framework/Modules/Bits.swiftmodule/x86_64.swiftmodule /Users/brunodaluz/Desktop/project/Build/Products/Debug/NIOFoundationCompat.framework/Modules/NIOFoundationCompat.swiftmodule/x86_64.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/brunodaluz/Desktop/project/.build/checkouts/swift-nio.git--325538877768392360/Sources/CNIOAtomics/include/cpp_magic.h /Users/brunodaluz/Desktop/project/.build/checkouts/swift-nio.git--325538877768392360/Sources/CNIODarwin/include/c_nio_darwin.h /Users/brunodaluz/Desktop/project/.build/checkouts/swift-nio.git--325538877768392360/Sources/CNIOAtomics/include/c-atomics.h /Users/brunodaluz/Desktop/project/.build/checkouts/swift-nio.git--325538877768392360/Sources/CNIOLinux/include/c_nio_linux.h /Users/brunodaluz/Desktop/project/project.xcodeproj/GeneratedModuleMap/CNIOSHA1/module.modulemap /Users/brunodaluz/Desktop/project/.build/checkouts/swift-nio-zlib-support.git-4597058737275259177/module.modulemap /Users/brunodaluz/Desktop/project/project.xcodeproj/GeneratedModuleMap/CNIODarwin/module.modulemap /Users/brunodaluz/Desktop/project/project.xcodeproj/GeneratedModuleMap/CNIOAtomics/module.modulemap /Users/brunodaluz/Desktop/project/project.xcodeproj/GeneratedModuleMap/CNIOLinux/module.modulemap /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/Darwin.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/brunodaluz/Desktop/project/Build/Intermediates/project.build/Debug/TemplateKit.build/Objects-normal/x86_64/Print~partial.swiftdoc : /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Data/TemplateData.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/AST/TemplateEmbed.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Deprecated.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/AST/TemplateSource.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Data/TemplateDataStorage.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Pipeline/ASTCache.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Data/TemplateDataRepresentable.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Utilities/HTMLEscape.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/AST/TemplateSyntaxType.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Tag/Uppercase.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Tag/Lowercase.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Tag/Capitalize.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/AST/TemplateTag.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/AST/TemplateConditional.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/AST/TemplateCustom.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/AST/TemplateExpression.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Tag/Var.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Data/TemplateDataEncoder.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/AST/TemplateIdentifier.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Pipeline/TemplateByteScanner.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Pipeline/TemplateRenderer.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Tag/TagRenderer.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Pipeline/PlaintextRenderer.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/ViewRenderer.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Pipeline/TemplateParser.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Pipeline/TemplateSerializer.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Utilities/TemplateError.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/AST/TemplateIterator.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Tag/Contains.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Utilities/Exports.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Tag/DateFormat.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/AST/TemplateConstant.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Tag/Comment.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Tag/Print.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Tag/Count.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/AST/TemplateDataContext.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Tag/TagContext.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/Tag/Raw.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/AST/TemplateRaw.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/View.swift /Users/brunodaluz/Desktop/project/.build/checkouts/template-kit.git-4631460999338977621/Sources/TemplateKit/AST/TemplateSyntax.swift /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Users/brunodaluz/Desktop/project/Build/Products/Debug/NIO.framework/Modules/NIO.swiftmodule/x86_64.swiftmodule /Users/brunodaluz/Desktop/project/Build/Products/Debug/Async.framework/Modules/Async.swiftmodule/x86_64.swiftmodule /Users/brunodaluz/Desktop/project/Build/Products/Debug/Service.framework/Modules/Service.swiftmodule/x86_64.swiftmodule /Users/brunodaluz/Desktop/project/Build/Products/Debug/Core.framework/Modules/Core.swiftmodule/x86_64.swiftmodule /Users/brunodaluz/Desktop/project/Build/Products/Debug/Debugging.framework/Modules/Debugging.swiftmodule/x86_64.swiftmodule /Users/brunodaluz/Desktop/project/Build/Products/Debug/COperatingSystem.framework/Modules/COperatingSystem.swiftmodule/x86_64.swiftmodule /Users/brunodaluz/Desktop/project/Build/Products/Debug/NIOConcurrencyHelpers.framework/Modules/NIOConcurrencyHelpers.swiftmodule/x86_64.swiftmodule /Users/brunodaluz/Desktop/project/Build/Products/Debug/Bits.framework/Modules/Bits.swiftmodule/x86_64.swiftmodule /Users/brunodaluz/Desktop/project/Build/Products/Debug/NIOFoundationCompat.framework/Modules/NIOFoundationCompat.swiftmodule/x86_64.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreFoundation.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/brunodaluz/Desktop/project/.build/checkouts/swift-nio.git--325538877768392360/Sources/CNIOAtomics/include/cpp_magic.h /Users/brunodaluz/Desktop/project/.build/checkouts/swift-nio.git--325538877768392360/Sources/CNIODarwin/include/c_nio_darwin.h /Users/brunodaluz/Desktop/project/.build/checkouts/swift-nio.git--325538877768392360/Sources/CNIOAtomics/include/c-atomics.h /Users/brunodaluz/Desktop/project/.build/checkouts/swift-nio.git--325538877768392360/Sources/CNIOLinux/include/c_nio_linux.h /Users/brunodaluz/Desktop/project/project.xcodeproj/GeneratedModuleMap/CNIOSHA1/module.modulemap /Users/brunodaluz/Desktop/project/.build/checkouts/swift-nio-zlib-support.git-4597058737275259177/module.modulemap /Users/brunodaluz/Desktop/project/project.xcodeproj/GeneratedModuleMap/CNIODarwin/module.modulemap /Users/brunodaluz/Desktop/project/project.xcodeproj/GeneratedModuleMap/CNIOAtomics/module.modulemap /Users/brunodaluz/Desktop/project/project.xcodeproj/GeneratedModuleMap/CNIOLinux/module.modulemap /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/Darwin.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
D
module smw.entity; public import smw.entity.goomba; public import smw.entity.mario; public import smw.entity.entity; public import smw.entity.enemy; public import smw.entity.mushroom;
D
module android.java.android.provider.Contacts_Intents_Insert; public import android.java.android.provider.Contacts_Intents_Insert_d_interface; import arsd.jni : ImportExportImpl; mixin ImportExportImpl!Contacts_Intents_Insert; import import0 = android.java.java.lang.Class;
D
/* * console.d * * This file implements the Console interfaces for the Linux system. * * Author: Dave Wilkinson * */ module scaffold.console; import djehuty; import platform.unix.common; import platform.unix.main; import platform.application; import synch.thread; import cui.application; import cui.window; private int _toNearestConsoleColor(Color clr) { // 16 colors on console // For each channel, it can be 00, 88, or ff // That is, something mid range int nearRed, nearGreen, nearBlue; int ret; nearRed = cast(int)((clr.red * 3.0) + 0.5); nearGreen = cast(int)((clr.green * 3.0) + 0.5); nearBlue = cast(int)((clr.blue * 3.0) + 0.5); if ((nearRed == nearGreen) && (nearGreen == nearBlue)) { // gray if (clr.red < (Color.DarkGray.red / 2.0)) { // Closer to black ret = 0; } else if (clr.red < ((Color.Gray.red - Color.DarkGray.red) / 2.0) + Color.DarkGray.red) { // Closer to dark gray ret = 8; } else if (clr.red < ((Color.White.red - Color.Gray.red) / 2.0) + Color.Gray.red) { // Closer to light gray ret = 7; } else { // Closer to white ret = 15; } } else { // Nearest color match static int[3][] translations = [ [1,0,0], // 1, Dark Red [0,1,0], // 2, Dark Green [1,1,0], // 3, Dark Yellow [0,0,1], // 4, Dark Blue [1,0,1], // 5, Dark Magenta [0,1,1], // 6, Dark Cyan [2,0,0], // 9, Dark Red [0,2,0], // 10, Dark Green [2,2,0], // 11, Dark Yellow [0,0,2], // 12, Dark Blue [2,0,2], // 13, Dark Magenta [0,2,2], // 14, Dark Cyan ]; float mindistance = 4*3; foreach(size_t i, coord; translations) { // Compare euclidian distance float distance = 0.0; float intermediate; intermediate = coord[0] - nearRed; intermediate *= intermediate; distance += intermediate; intermediate = coord[1] - nearGreen; intermediate *= intermediate; distance += intermediate; intermediate = coord[2] - nearBlue; intermediate *= intermediate; distance += intermediate; // Omitting square root, it is unnecessary for comparison if (mindistance > distance) { mindistance = distance; ret = i; ret++; if (ret > 6) { ret += 2; } } } } return ret; } void ConsoleSetColors(Color fg, Color bg) { int fgidx = _toNearestConsoleColor(fg); int bgidx = _toNearestConsoleColor(bg); int bright = 0; if (fgidx > 7) { fgidx %= 8; bright = 1; } bgidx %= 8; if (ApplicationController.instance.usingCurses) { int idx = fgidx << 3; idx |= bgidx; if (bright) { Curses.attron(Curses.A_BOLD); } else { Curses.attroff(Curses.A_BOLD); } Curses.init_pair(idx, fgidx, bgidx); Curses.attron(Curses.COLOR_PAIR(idx)); } else { printf("\x1B[%d;%d;%dm", bright, 30 + fgidx, 40 + bgidx); } } //will return the next character pressed Key consoleGetKey() { Key ret; ubyte[18] tmp; uint count; ret.code = Curses.getch(); // Curses.move(0,0); // Console.put(" "); // Curses.move(0,0); // Console.put(ret.code, " "); if (ret.code != 0x1B) { // Not an escape sequence if (ret.code == Curses.KEY_MOUSE || ret.code == Curses.KEY_RESIZE || ret.code == Curses.KEY_EVENT || ret.code >= Curses.KEY_MAX) { return ret; } if (ret.code == 127 || ret.code == 8 || ret.code == 9 || ret.code == 13) { } // For ctrl+char else if (ret.code < 26) { ret.ctrl = true; ret.code = Key.A + ret.code - 1; //Curses.move(1,0); //Console.put(" "); //Curses.move(1,0); //Console.put("alt: ", ret.alt, " ctrl: ", ret.ctrl, " shift: ", ret.shift, " code: ", ret.code); return ret; } // For F5-F16: else if (ret.code >= 281 && ret.code <= 292) { ret.code -= 12; ret.shift = true; } else if (ret.code >= 293 && ret.code <= 304) { ret.code -= 24; ret.ctrl = true; } else if (ret.code >= 305 && ret.code <= 316) { ret.code -= 36; ret.ctrl = true; ret.shift = true; } else if (ret.code >= 317 && ret.code <= 328) { ret.code -= 48; ret.alt = true; } consoleTranslateKey(ret); //Curses.move(1,0); //Console.put(" "); //Curses.move(1,0); //Console.put("alt: ", ret.alt, " ctrl: ", ret.ctrl, " shift: ", ret.shift, " code: ", ret.code); return ret; } // Escape sequence... ret.code = Curses.getch(); //Console.put(ret.code, " "); // Get extended commands if (ret.code == 0x1B) { // ESCAPE ESCAPE -> Escape ret.code = Key.Escape; } else if (ret.code == '[') { ret.code = Curses.getch(); //Console.put(ret.code, " "); if (ret.code == '1') { ret.code = Curses.getch(); //Console.put(ret.code, " "); if (ret.code == '~') { ret.code = Key.Home; } else if (ret.code == '#') { ret.code = Curses.getch(); //Console.put(ret.code, " "); if (ret.code == '~') { ret.code = Key.F5; } else if (ret.code == ';') { ret.code = Curses.getch(); //Console.put(ret.code, " "); if (ret.code == '2') { ret.shift = true; ret.code = Key.F5; } } } else if (ret.code == '7') { ret.code = Curses.getch(); //Console.put(ret.code, " "); if (ret.code == '~') { ret.code = Key.F6; } else if (ret.code == ';') { ret.code = Curses.getch(); //Console.put(ret.code, " "); if (ret.code == '2') { ret.shift = true; ret.code = Key.F6; } } } else if (ret.code == ';') { // Arrow Keys ret.code = Curses.getch(); //Console.put(ret.code, " "); getModifiers(ret); //Console.put(ret.code, " "); if (ret.code == 'A') { ret.code = Key.Up; } else if (ret.code == 'B') { ret.code = Key.Down; } else if (ret.code == 'C') { ret.code = Key.Right; } else if (ret.code == 'D') { ret.code = Key.Left; } } else { ret.code = Curses.getch(); //Console.put(ret.code, " "); } } else if (ret.code == '2') { ret.code = Curses.getch(); //Console.put(ret.code, " "); if (ret.code == '~') { } else if (ret.code == ';') { // Alt + Insert ret.code = Curses.getch(); //Console.put(ret.code, " "); getModifiers(ret); //Console.put(ret.code, " "); if (ret.code == '~') { ret.code = Key.Insert; } } } else if (ret.code == '3') { ret.code = Curses.getch(); //Console.put(ret.code, " "); } else if (ret.code == '4') { ret.code = Curses.getch(); //Console.put(ret.code, " "); } else if (ret.code == '5') { ret.code = Curses.getch(); //Console.put(ret.code, " "); } else if (ret.code == '6') { ret.code = Curses.getch(); //Console.put(ret.code, " "); } else { } } else if (ret.code == 'O') { ret.code = Curses.getch(); // F1, F2, F3, F4 if (ret.code == '1') { ret.code = Curses.getch(); //Console.put(ret.code, " "); if (ret.code == ';') { ret.code = Curses.getch(); //Console.put(ret.code, " "); getModifiers(ret); //Console.put(ret.code, " "); if (ret.code == 'P') { ret.code = Key.F1; } else if (ret.code == 'Q') { ret.code = Key.F2; } else if (ret.code == 'R') { ret.code = Key.F3; } else if (ret.code == 'S') { ret.code = Key.F4; } } } else if (ret.code == 'H') { ret.code = Key.Home; } else if (ret.code == 'F') { ret.code = Key.End; } else if (ret.code == 0x80) { ret.code = Key.F1; } else if (ret.code == 0x81) { ret.code = Key.F2; } else if (ret.code == 0x82) { ret.code = Key.F3; } else if (ret.code == 0x83) { ret.code = Key.F4; } } else { // Alt + Char ret.alt = true; consoleTranslateKey(ret); } //Curses.move(1,0); //Console.put(" "); //Curses.move(1,0); //Console.put("alt: ", ret.alt, " ctrl: ", ret.ctrl, " shift: ", ret.shift, " code: ", ret.code); return ret; } void getModifiers(ref Key key) { if (key.code == '2' || key.code == '4' || key.code == '6' || key.code == '8') { key.shift = true; } if (key.code == '3' || key.code == '4' || key.code == '7' || key.code == '8') { key.alt = true; } if (key.code == '5' || key.code == '6' || key.code == '7' || key.code == '8') { key.ctrl = true; } if (key.shift || key.alt || key.ctrl) { key.code = Curses.getch(); } } void consoleTranslateKey(ref Key ky) { switch(ky.code) { case '~': case '!': case '@': case '#': case '$': case '%': case '^': case '&': case '*': case '(': case ')': case '_': case '+': case '{': case '}': case ':': case '"': case '<': case '>': case '|': case '?': ky.shift = true; break; default: if (ky.code >= 'A' && ky.code <= 'Z') { ky.shift = true; } else if (ky.code >= '0' && ky.code <= '9') { ky.shift = false; } break; } ky.code = keyTranslation[ky.code]; } uint keyTranslation[Curses.KEY_MAX] = [ ' ': Key.Space, '\n': Key.Return, '\r': Key.Return, '\t': Key.Tab, '\b': Key.Backspace, 127: Key.Backspace, 'a': Key.A, 'b': Key.B, 'c': Key.C, 'd': Key.D, 'e': Key.E, 'f': Key.F, 'g': Key.G, 'h': Key.H, 'i': Key.I, 'j': Key.J, 'k': Key.K, 'l': Key.L, 'm': Key.M, 'n': Key.N, 'o': Key.O, 'p': Key.P, 'q': Key.Q, 'r': Key.R, 's': Key.S, 't': Key.T, 'u': Key.U, 'v': Key.V, 'w': Key.W, 'x': Key.X, 'y': Key.Y, 'z': Key.Z, 'A': Key.A, 'B': Key.B, 'C': Key.C, 'D': Key.D, 'E': Key.E, 'F': Key.F, 'G': Key.G, 'H': Key.H, 'I': Key.I, 'J': Key.J, 'K': Key.K, 'L': Key.L, 'M': Key.M, 'N': Key.N, 'O': Key.O, 'P': Key.P, 'Q': Key.Q, 'R': Key.R, 'S': Key.S, 'T': Key.T, 'U': Key.U, 'V': Key.V, 'W': Key.W, 'X': Key.X, 'Y': Key.Y, 'Z': Key.Z, '0': Key.Zero, '1': Key.One, '2': Key.Two, '3': Key.Three, '4': Key.Four, '5': Key.Five, '6': Key.Six, '7': Key.Seven, '8': Key.Eight, '9': Key.Nine, '`': Key.SingleQuote, '~': Key.SingleQuote, '!': Key.One, '@': Key.Two, '#': Key.Three, '$': Key.Four, '%': Key.Five, '^': Key.Six, '&': Key.Seven, '*': Key.Eight, '(': Key.Nine, ')': Key.Zero, '-': Key.Minus, '_': Key.Minus, '=': Key.Equals, '+': Key.Equals, '[': Key.LeftBracket, '{': Key.LeftBracket, ']': Key.RightBracket, '}': Key.RightBracket, ';': Key.Semicolon, ':': Key.Semicolon, '\'': Key.Quote, '"': Key.Quote, ',': Key.Comma, '<': Key.Comma, '>': Key.Period, '.': Key.Period, '/': Key.Foreslash, '?': Key.Foreslash, '\\': Key.Backslash, '|': Key.Backslash, Curses.KEY_DOWN: Key.Down, Curses.KEY_UP: Key.Up, Curses.KEY_LEFT: Key.Left, Curses.KEY_RIGHT: Key.Right, Curses.KEY_HOME: Key.Home, Curses.KEY_BACKSPACE: Key.Backspace, Curses.KEY_DC: Key.Delete, Curses.KEY_F1: Key.F1, Curses.KEY_F2: Key.F2, Curses.KEY_F3: Key.F3, Curses.KEY_F4: Key.F4, Curses.KEY_F5: Key.F5, Curses.KEY_F6: Key.F6, Curses.KEY_F7: Key.F7, Curses.KEY_F8: Key.F8, Curses.KEY_F9: Key.F9, Curses.KEY_F10: Key.F10, Curses.KEY_F11: Key.F11, Curses.KEY_F12: Key.F12, Curses.KEY_F13: Key.F13, Curses.KEY_F14: Key.F14, Curses.KEY_F15: Key.F15, Curses.KEY_F16: Key.F16, Curses.KEY_NPAGE: Key.PageDown, Curses.KEY_PPAGE: Key.PageUp, Curses.KEY_ENTER: Key.Return, Curses.KEY_END: Key.End ]; struct winsize { ushort ws_row; ushort ws_col; ushort ws_xpixel; ushort ws_ypixel; } //window size int m_width; int m_height; bool m_winsize_state; const auto TIOCGWINSZ = 0x5413; const auto SIGWINCH = 28; //position tracking int m_x; int m_y; winsize m_winsize_saved; winsize m_winsize_working; termios m_term_info_saved; termios m_term_info_working; //signal handler for terminal Size extern(C) void close_sig_handler(int signal) { // Djehuty.end(0); // for(int i=0; i<256; i++) { // printf("\x1B[48;5;%dma", i); // } ConsoleUninit(); exit(0); } extern(C) void size_sig_handler(int signal) { ioctl(STDIN, TIOCGWINSZ, &m_winsize_working); if (m_width != m_winsize_working.ws_col || m_height != m_winsize_working.ws_row) { m_width = m_winsize_working.ws_col; m_height = m_winsize_working.ws_row; while (m_x >= m_width) { m_y++; m_x -= m_width; } if (m_y >= m_height) { m_y = m_height-1; } if (m_x < 0) { m_x = 0; } if (m_y < 0) { m_y = 0; } //reset (this will be retained when program exits) m_winsize_saved = m_winsize_working; //the window resized through the users actions, not through the class' resize() //therefore don't change it back to anything on exit m_winsize_state = false; } //fire Size event CuiApplication app = cast(CuiApplication)Djehuty.app; app.window.onResize(); } void ConsoleInit() { printf("\x1B7"); setlocale(LC_ALL, ""); setlocale(LC_CTYPE, ""); setvbuf (stdout, null, _IONBF, 0); setlocale(LC_ALL, ""); setlocale(LC_CTYPE, ""); } void ConsoleUninit() { printf("\x1B[0m"); } void ConsoleClear() { if (ApplicationController.instance.usingCurses) { Curses.clear(); Curses.refresh(); } else { printf("\x1B[2J\x1B[0;0H"); } } void ConsoleSetRelative(int x, int y) { int newx; int newy; Curses.getyx(Curses.stdscr, m_y, m_x); newx = m_x + x; newy = m_y + y; Curses.move(newy, newx); } void ConsoleGetPosition(uint* x, uint* y) { Curses.getyx(Curses.stdscr, m_y, m_x); *x = m_x; *y = m_y; } void ConsoleSetPosition(uint x, uint y) { if (x >= m_width) { x = m_width-1; } if (y >= m_height) { y = m_height-1; } if (x < 0) { x = 0; } if (y < 0) { y = 0; } Curses.move(y,x); } void ConsoleHideCaret() { printf("\x1B[?25l"); Curses.curs_set(0); } void ConsoleShowCaret() { printf("\x1B[?25h"); Curses.curs_set(1); } void ConsoleSetHome() { if (ApplicationController.instance.usingCurses) { Curses.getyx(Curses.stdscr, m_y, m_x); m_x = 0; Curses.move(m_y, m_x); } else { printf("\x1B[0G"); } } void ConsolePutString(char[] chrs) { chrs ~= '\0'; Curses.getyx(Curses.stdscr, m_y, m_x); char[] utf8 = chrs; bool goBackOneLine = false; if (ApplicationController.instance.usingCurses) { for (uint i; i < utf8.length; i++) { if (utf8[i] == '\r' || utf8[i] == '\n' || utf8[i] == '\0') { if (i + m_x >= m_width) { i = m_width - m_x; goBackOneLine = true; } utf8[i] = '\0'; Curses.wprintw(Curses.stdscr, "%s", &utf8[0]); if (goBackOneLine) { ConsoleSetPosition(m_width - 1, m_y); } Curses.refresh(); return; } } } else { printf("%s", utf8.ptr); } } void ConsolePutChar(dchar chr) { dchar[] chrarray = [ chr, '\0' ]; char[] chrs = Unicode.toUtf8(chrarray); if (ApplicationController.instance.usingCurses) { if (chr == '\r' || chr == '\n') { ConsoleSetRelative(0, 1); ConsoleSetHome(); } else { Curses.wprintw(Curses.stdscr, "%s", chrs.ptr); Curses.refresh(); } } else { printf("%s", chrs.ptr); } } void ConsoleGetSize(out uint width, out uint height) { Curses.getmaxyx(Curses.stdscr, m_height, m_width); width = m_width; height = m_height; } void ConsoleGetChar(out dchar chr, out uint code) { }
D
/Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/URLEncodedForm.build/Data/URLEncodedFormParser.swift.o : /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/url-encoded-form/Sources/URLEncodedForm/Data/URLEncodedFormData.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/url-encoded-form/Sources/URLEncodedForm/Data/URLEncodedFormDataConvertible.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/url-encoded-form/Sources/URLEncodedForm/Codable/URLEncodedFormDecoder.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/url-encoded-form/Sources/URLEncodedForm/Codable/URLEncodedFormEncoder.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/url-encoded-form/Sources/URLEncodedForm/Data/URLEncodedFormParser.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/url-encoded-form/Sources/URLEncodedForm/Data/URLEncodedFormSerializer.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/url-encoded-form/Sources/URLEncodedForm/Utilities/URLEncodedFormError.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/url-encoded-form/Sources/URLEncodedForm/Utilities/Exports.swift /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/XPC.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/ObjectiveC.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/Dispatch.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/Darwin.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/Foundation.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/CoreFoundation.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/CoreGraphics.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/Swift.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/IOKit.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/SwiftOnoneSupport.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Combine.framework/Modules/Combine.swiftmodule/x86_64-apple-macos.swiftinterface /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/NIO.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Async.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Core.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Debugging.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/COperatingSystem.swiftmodule /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/Swift.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/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Bits.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/NIOFoundationCompat.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/cpp_magic.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOLinux/include/ifaddrs-android.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIODarwin/include/CNIODarwin.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOSHA1.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOOpenSSL.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CCryptoOpenSSL.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOZlib.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIODarwin.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOHTTPParser.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOAtomics.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOLinux.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio-zlib-support/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/xpc/XPC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.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/MacOSX10.15.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/URLEncodedForm.build/Data/URLEncodedFormParser~partial.swiftmodule : /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/url-encoded-form/Sources/URLEncodedForm/Data/URLEncodedFormData.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/url-encoded-form/Sources/URLEncodedForm/Data/URLEncodedFormDataConvertible.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/url-encoded-form/Sources/URLEncodedForm/Codable/URLEncodedFormDecoder.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/url-encoded-form/Sources/URLEncodedForm/Codable/URLEncodedFormEncoder.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/url-encoded-form/Sources/URLEncodedForm/Data/URLEncodedFormParser.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/url-encoded-form/Sources/URLEncodedForm/Data/URLEncodedFormSerializer.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/url-encoded-form/Sources/URLEncodedForm/Utilities/URLEncodedFormError.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/url-encoded-form/Sources/URLEncodedForm/Utilities/Exports.swift /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/XPC.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/ObjectiveC.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/Dispatch.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/Darwin.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/Foundation.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/CoreFoundation.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/CoreGraphics.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/Swift.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/IOKit.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/SwiftOnoneSupport.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Combine.framework/Modules/Combine.swiftmodule/x86_64-apple-macos.swiftinterface /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/NIO.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Async.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Core.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Debugging.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/COperatingSystem.swiftmodule /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/Swift.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/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Bits.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/NIOFoundationCompat.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/cpp_magic.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOLinux/include/ifaddrs-android.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIODarwin/include/CNIODarwin.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOSHA1.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOOpenSSL.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CCryptoOpenSSL.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOZlib.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIODarwin.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOHTTPParser.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOAtomics.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOLinux.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio-zlib-support/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/xpc/XPC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.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/MacOSX10.15.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/URLEncodedForm.build/Data/URLEncodedFormParser~partial.swiftdoc : /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/url-encoded-form/Sources/URLEncodedForm/Data/URLEncodedFormData.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/url-encoded-form/Sources/URLEncodedForm/Data/URLEncodedFormDataConvertible.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/url-encoded-form/Sources/URLEncodedForm/Codable/URLEncodedFormDecoder.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/url-encoded-form/Sources/URLEncodedForm/Codable/URLEncodedFormEncoder.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/url-encoded-form/Sources/URLEncodedForm/Data/URLEncodedFormParser.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/url-encoded-form/Sources/URLEncodedForm/Data/URLEncodedFormSerializer.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/url-encoded-form/Sources/URLEncodedForm/Utilities/URLEncodedFormError.swift /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/url-encoded-form/Sources/URLEncodedForm/Utilities/Exports.swift /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/XPC.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/ObjectiveC.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/Dispatch.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/Darwin.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/Foundation.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/CoreFoundation.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/CoreGraphics.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/Swift.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/IOKit.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift/SwiftOnoneSupport.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Combine.framework/Modules/Combine.swiftmodule/x86_64-apple-macos.swiftinterface /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/NIO.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Async.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Core.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Debugging.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/COperatingSystem.swiftmodule /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/Swift.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/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/Bits.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/NIOFoundationCompat.swiftmodule /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/cpp_magic.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOLinux/include/ifaddrs-android.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIODarwin/include/CNIODarwin.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.h /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOSHA1.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOOpenSSL.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CCryptoOpenSSL.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOZlib.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIODarwin.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOHTTPParser.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOAtomics.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/x86_64-apple-macosx/debug/CNIOLinux.build/module.modulemap /Users/weirujian/Desktop/WeiRuJian/Vapor/AuthServer/.build/checkouts/swift-nio-zlib-support/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/xpc/XPC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.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/MacOSX10.15.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
D
/work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/EBTools/BaseEBCellFAB.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /opt/apps/intel15/impi_5_0/phdf5/1.8.16/x86_64/include/H5Cpublic.h /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /opt/apps/intel15/impi_5_0/phdf5/1.8.16/x86_64/include/H5Lpublic.h /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /opt/apps/intel15/impi_5_0/phdf5/1.8.16/x86_64/include/H5FDmpi.h /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BaseTools/Misc.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /opt/apps/intel15/impi_5_0/phdf5/1.8.16/x86_64/include/H5FDcore.h /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : EBLoHiCenter.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/EBTools/BaseIndex.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BaseTools/Tuple.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BaseTools/ClockTicks.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BoxTools/LevelData.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /opt/apps/intel15/impi_5_0/phdf5/1.8.16/x86_64/include/H5Zpublic.h /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /opt/apps/intel15/impi_5_0/phdf5/1.8.16/x86_64/include/H5FDfamily.h /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BoxTools/BaseFabImplem.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/EBTools/BaseEBFaceFABI.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BaseTools/Pool.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BaseTools/BitSet.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /opt/apps/intel15/impi_5_0/phdf5/1.8.16/x86_64/include/H5Tpublic.h /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/EBTools/BaseIVFABI.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BaseTools/IndexTM.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BoxTools/DebugOut.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/EBTools/FaceIterator.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BoxTools/CH_HDF5.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /opt/apps/intel15/impi_5_0/phdf5/1.8.16/x86_64/include/H5public.h /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /opt/apps/intel15/impi_5_0/phdf5/1.8.16/x86_64/include/H5PLpublic.h /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/EBTools/FaceIndex.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BoxTools/IVSFAB.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BoxTools/FArrayBox.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /opt/apps/intel15/impi_5_0/phdf5/1.8.16/x86_64/include/H5FDsec2.h /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/EBTools/EBISBox.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/EBTools/VoFIterator.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /opt/apps/intel15/impi_5_0/phdf5/1.8.16/x86_64/include/H5pubconf.h /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BaseTools/GenericArithmetic.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : EBPhysIBC.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/EBTools/GraphNode.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BaseTools/List.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /opt/apps/intel15/impi_5_0/phdf5/1.8.16/x86_64/include/H5version.h /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BaseTools/memtrack.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/EBTools/BaseIFFABI.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BaseTools/Arena.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BaseTools/BaseNamespaceHeader.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/EBTools/MiniIVFABI.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : EBPhysIBCFactory.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/EBTools/BaseEBFaceFAB.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/EBTools/EBDebugOut.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /opt/apps/intel15/impi_5_0/phdf5/1.8.16/x86_64/include/H5FDlog.h /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /opt/apps/intel15/impi_5_0/phdf5/1.8.16/x86_64/include/H5FDmpio.h /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : EBPatchGodunovF_F.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /opt/apps/intel15/impi_5_0/phdf5/1.8.16/x86_64/include/H5Apublic.h /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/EBTools/Stencils.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/EBAMRTools/EBAMRIO.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BoxTools/SliceSpec.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /opt/apps/intel15/impi_5_0/phdf5/1.8.16/x86_64/include/H5FDmulti.h /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BaseTools/SPMD.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BaseTools/NamespaceVar.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /opt/apps/intel15/impi_5_0/phdf5/1.8.16/x86_64/include/H5Fpublic.h /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BoxTools/DenseIntVectSet.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/EBTools/MiniIVFAB.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/EBTools/BaseIVFAB.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : EBPatchGodunov.cpp /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /opt/apps/intel15/impi_5_0/phdf5/1.8.16/x86_64/include/H5FDstdio.h /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BaseTools/GenericArithmeticI.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/EBTools/EBArith.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /opt/apps/intel15/impi_5_0/phdf5/1.8.16/x86_64/include/H5Ppublic.h /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BaseTools/CH_Timer.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BoxTools/IntVect.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BaseTools/Metaprograms.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BaseTools/CH_assert.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BaseTools/BaseNamespaceFooter.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /opt/apps/intel15/impi_5_0/phdf5/1.8.16/x86_64/include/H5ACpublic.h /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/EBTools/BaseIFFAB.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BaseTools/SPMDI.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/EBTools/EBFluxFAB.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BaseTools/ParmParse.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BoxTools/DataIndex.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/EBTools/PolyGeom.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/EBTools/AggStencil.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BoxTools/TreeIntVectSet.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BoxTools/FluxBox.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BoxTools/Copier.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BoxTools/NodeFArrayBox.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BoxTools/CH_OpenMP.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : EBPatchGodunov.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BoxTools/LevelDataI.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BaseTools/RefCountedPtr.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BaseTools/Vector.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BaseTools/NamespaceHeader.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BoxTools/BoxLayout.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /opt/apps/intel15/impi_5_0/phdf5/1.8.16/x86_64/include/H5MMpublic.h /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BaseTools/ListImplem.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BaseTools/NamespaceFooter.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /opt/apps/intel15/impi_5_0/phdf5/1.8.16/x86_64/include/H5FDdirect.h /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/EBTools/AggStencilI.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /opt/apps/intel15/impi_5_0/phdf5/1.8.16/x86_64/include/H5Epubgen.h /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/EBTools/EBCellFAB.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BoxTools/Box.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BaseTools/Interval.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /opt/apps/intel15/impi_5_0/phdf5/1.8.16/x86_64/include/H5Rpublic.h /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/EBTools/MiniIFFABI.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BoxTools/BaseFabMacros.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BoxTools/BoxIterator.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /opt/apps/intel15/impi_5_0/phdf5/1.8.16/x86_64/include/H5Dpublic.h /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BaseTools/parstream.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BoxTools/LayoutIterator.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BoxTools/SPACE.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BaseTools/CH_Thread.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BoxTools/BoxLayoutData.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/EBTools/EBISLayout.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/EBTools/IrregNode.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/EBTools/EBGraph.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /opt/apps/intel15/impi_5_0/phdf5/1.8.16/x86_64/include/H5api_adpt.h /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BaseTools/REAL.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BoxTools/TimedDataIterator.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/EBTools/MiniIFFAB.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BoxTools/RealVect.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BoxTools/LayoutData.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/EBTools/VolIndex.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /opt/apps/intel15/impi_5_0/phdf5/1.8.16/x86_64/include/H5Opublic.h /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BoxTools/IntVectSet.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /opt/apps/intel15/impi_5_0/phdf5/1.8.16/x86_64/include/H5Epublic.h /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BoxTools/IVSFABI.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BoxTools/BaseFab.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BoxTools/DisjointBoxLayout.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BaseTools/IndexTMI.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BoxTools/DataIterator.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/EBTools/EBData.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /opt/apps/intel15/impi_5_0/phdf5/1.8.16/x86_64/include/H5Ipublic.h /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /opt/apps/intel15/impi_5_0/phdf5/1.8.16/x86_64/include/H5FDpublic.h /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /opt/apps/intel15/impi_5_0/phdf5/1.8.16/x86_64/include/H5Gpublic.h /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BoxTools/BoxLayoutDataI.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BaseTools/MayDay.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BoxTools/LoadBalance.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BoxTools/ProblemDomain.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/EBTools/BaseEBCellFABI.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BaseTools/LoHiSide.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BoxTools/HDF5Portable.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /opt/apps/intel15/impi_5_0/phdf5/1.8.16/x86_64/include/H5Spublic.h /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/EBTools/EBFaceFAB.H /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /opt/apps/intel15/impi_5_0/phdf5/1.8.16/x86_64/include/hdf5.h /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../libebamrtimedependent2d.Linux.mpicxx.ifort.DEBUG.MPI.a(EBPatchGodunov.o) d/2d.Linux.mpicxx.ifort.DEBUG.MPI/EBPatchGodunov.d : /work/02138/siddarth/CHOMBO/EBAMRRANS/lib/src/EBAMRTimeDependent/../../src/BoxTools/LayoutDataI.H
D
/* * Copyright (c) 2004-2008 Derelict Developers * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the names 'Derelict', 'DerelictFT', nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** This module is a collection of all types (alias/struct/union), enum constants and * macros (enums or functions here) defined in the freetype 2 header files. * * It is missing some of the C macros (in particular lots of truetype identifiers), but should * otherwise be fairly complete as of freetype version 2.3.5. * * Comments show which files the definitions are from; brackets show which C macros include the * file (excluding the inclusion of freetype.h in most files). */ module derelict.freetype.fttypes; //BEGIN Basic types // config/ftconfig.h (FT_CONFIG_CONFIG_H, FT_FREETYPE_H) alias short FT_Int16; alias ushort FT_UInt16; alias int FT_Int32; alias uint FT_UInt32; alias int FT_Fast; alias uint FT_UFast; // fttypes.h (FT_FREETYPE_H, FT_TYPES_H) alias byte FT_Bool; alias short FT_FWord; alias ushort FT_UFWord; alias char FT_Char; alias ubyte FT_Byte; alias FT_Byte* FT_Bytes; alias FT_UInt32 FT_Tag; alias char FT_String; alias short FT_Short; alias ushort FT_UShort; alias int FT_Int; alias uint FT_UInt; // The C long type corresponds to either D's int or long type. // But it might depend on compiler as well as architechture? version(X86_64) { alias long FT_Long; alias ulong FT_ULong; } else { alias int FT_Long; alias uint FT_ULong; } alias short FT_F2Dot14; alias FT_Long FT_F26Dot6; alias FT_Long FT_Fixed; alias int FT_Error; alias void* FT_Pointer; alias size_t FT_Offset; alias ptrdiff_t FT_PtrDist; // ftimage.h (FT_FREETYPE_H, FT_TYPES_H, FT_IMAGE_H) alias FT_Long FT_Pos; //END Basic types //BEGIN Other aliases // ftsystem.h (FT_FREETYPE_H, FT_TYPES_H, FT_SYSTEM_H) alias FT_MemoryRec* FT_Memory; alias FT_StreamRec* FT_Stream; // ftimage.h (FT_FREETYPE_H, FT_TYPES_H, FT_IMAGE_H) alias FT_RasterRec* FT_Raster; // fttypes.h (FT_FREETYPE_H, FT_TYPES_H) alias FT_ListNodeRec* FT_ListNode; alias FT_ListRec* FT_List; // freetype.h (FT_FREETYPE_H) alias FT_LibraryRec* FT_Library; alias FT_ModuleRec* FT_Module; alias FT_DriverRec* FT_Driver; alias FT_RendererRec* FT_Renderer; alias FT_FaceRec* FT_Face; alias FT_SizeRec* FT_Size; alias FT_GlyphSlotRec* FT_GlyphSlot; alias FT_CharMapRec* FT_CharMap; alias FT_Face_InternalRec* FT_Face_Internal; alias FT_Size_InternalRec* FT_Size_Internal; alias FT_SubGlyphRec* FT_SubGlyph; alias FT_Slot_InternalRec* FT_Slot_Internal; alias FT_Size_RequestRec* FT_Size_Request; // ftmodapi.h (FT_MODULE_H, FT_RENDER_H) alias FT_Pointer FT_Module_Interface; // t1tables.h (FT_TYPE1_TABLES_H) alias PS_FontInfoRec* PS_FontInfo; deprecated alias PS_FontInfoRec T1_FontInfo; alias PS_PrivateRec* PS_Private; deprecated alias PS_PrivateRec T1_Private; alias PS_DesignMapRec* PS_DesignMap; deprecated alias PS_DesignMapRec T1_DesignMap; alias PS_BlendRec* PS_Blend; deprecated alias PS_BlendRec T1_Blend; alias CID_FaceDictRec* CID_FaceDict; deprecated alias CID_FaceDictRec CID_FontDict; alias CID_FaceInfoRec* CID_FaceInfo; deprecated alias CID_FaceInfoRec CID_Info; // ftbdf.h (FT_BDF_H) alias BDF_PropertyRec* BDF_Property; // ftwinfnt.h (FT_WINFONTS_H) alias FT_WinFNT_HeaderRec* FT_WinFNT_Header; // ftglyph.h (FT_GLYPH_H, FT_CACHE_H, FT_STROKER_H) alias FT_GlyphRec* FT_Glyph; alias FT_BitmapGlyphRec* FT_BitmapGlyph; alias FT_OutlineGlyphRec* FT_OutlineGlyph; // ftcache.h (FT_CACHE_H) alias FTC_FaceIDRec* FTC_FaceID; alias FTC_ManagerRec* FTC_Manager; alias FTC_NodeRec* FTC_Node; alias FTC_ScalerRec* FTC_Scaler; alias FTC_CMapCacheRec* FTC_CMapCache; alias FTC_ImageTypeRec* FTC_ImageType; alias FTC_ImageCacheRec* FTC_ImageCache; alias FTC_SBitRec* FTC_SBit; alias FTC_SBitCacheRec* FTC_SBitCache; // ftstroke.h (FT_STROKER_H) alias FT_StrokerRec* FT_Stroker; // fttrigon.h (FT_TRIGONOMETRY_H) alias FT_Fixed FT_Angle; // ftincrem.h (FT_INCREMENTAL_H) alias FT_IncrementalRec* FT_Incremental; alias FT_Incremental_MetricsRec* FT_Incremental_Metrics; alias FT_Incremental_InterfaceRec* FT_Incremental_Interface; /+ other alias FTC_MruNodeRec* FTC_MruNode; alias FTC_MruListRec* FTC_MruList; alias FTC_MruListClassRec* FTC_MruListClass; alias FTC_CacheRec* FTC_Cache; alias FTC_CacheClassRec* FTC_CacheClass; alias FTC_FamilyRec* FTC_Family; alias FTC_GNodeRec* FTC_GNode; alias FTC_GQueryRec* FTC_GQuery; alias FTC_GCacheRec* FTC_GCache; alias FTC_GCacheClassRec* FTC_GCacheClass; alias FTC_INodeRec* FTC_INode; alias FTC_IFamilyClassRec* FTC_IFamilyClass; alias FTC_SNodeRec* FTC_SNode; alias FTC_SFamilyClassRec* FTC_SFamilyClass; alias FT_GlyphLoaderRec* FT_GlyphLoader ; alias FT_GlyphLoadRec* FT_GlyphLoad; alias FT_Driver_ClassRec* FT_Driver_Class; alias FT_AutoHinterRec* FT_AutoHinter; alias FT_AutoHinter_ServiceRec* FT_AutoHinter_Service; alias FT_ServiceDescRec* FT_ServiceDesc; alias FT_ServiceCacheRec* FT_ServiceCache; alias FT_CMapRec* FT_CMap; alias FT_CMap_ClassRec* FT_CMap_Class; alias SFNT_HeaderRec* SFNT_Header; alias TT_TableRec* TT_Table; alias TT_LongMetricsRec* TT_LongMetrics; alias FT_Short TT_ShortMetrics; alias TT_NameEntryRec* TT_NameEntry; alias TT_NameTableRec* TT_NameTable; alias TT_GaspRangeRec* TT_GaspRange; alias TT_HdmxEntryRec* TT_HdmxEntry; alias TT_HdmxRec* TT_Hdmx; alias TT_Kern0_PairRec* TT_Kern0_Pair; alias TT_SBit_MetricsRec* TT_SBit_Metrics; alias TT_SBit_SmallMetricsRec* TT_SBit_SmallMetrics; alias TT_SBit_LineMetricsRec* TT_SBit_LineMetrics; alias TT_SBit_RangeRec* TT_SBit_Range; alias TT_SBit_StrikeRec* TT_SBit_Strike; alias TT_SBit_ComponentRec* TT_SBit_Component; alias TT_SBit_ScaleRec* TT_SBit_Scale; alias TT_Post_20Rec* TT_Post_20; alias TT_Post_25Rec* TT_Post_25; alias TT_Post_NamesRec* TT_Post_Names; alias GX_BlendRec* GX_Blend; alias TT_FaceRec* TT_Face; alias TT_GlyphZoneRec* TT_GlyphZone; alias TT_ExecContextRec* TT_ExecContext; alias SFNT_Interface* SFNT_Service; alias FT_ValidatorRec* FT_Validator; alias PSH_GlobalsRec* PSH_Globals; alias PSH_Globals_FuncsRec* PSH_Globals_Funcs; alias T1_HintsRec* T1_Hints; alias T1_Hints_FuncsRec* T1_Hints_Funcs; alias T2_HintsRec* T2_Hints; alias T2_Hints_FuncsRec* T2_Hints_Funcs; alias PSHinter_Interface* PSHinter_Service; // alias FT_Service_PsCMapsRec FT_Service_PsCMapsRec; alias FT_Service_PsCMapsRec* FT_Service_PsCMaps; alias T1_EncodingRec* T1_Encoding; alias T1_FontRec* T1_Font; alias CID_SubrsRec* CID_Subrs; alias T1_FaceRec* T1_Face; alias CID_FaceRec* CID_Face; alias PS_TableRec* PS_Table; alias PS_Table_FuncsRec* PS_Table_Funcs; alias PS_ParserRec* PS_Parser; alias T1_TokenRec* T1_Token; alias T1_FieldRec* T1_Field; alias PS_Parser_FuncsRec* PS_Parser_Funcs; alias T1_BuilderRec* T1_Builder; alias T1_Builder_FuncsRec* T1_Builder_Funcs; alias T1_Decoder_ZoneRec* T1_Decoder_Zone; alias T1_DecoderRec* T1_Decoder; alias T1_Decoder_FuncsRec* T1_Decoder_Funcs; alias T1_CMap_ClassesRec* T1_CMap_Classes; alias PSAux_ServiceRec* PSAux_Service; alias PSAux_ServiceRec PSAux_Interface; alias TT_LoaderRec* TT_Loader; +/ //END Other aliases //BEGIN Enums /******************************************************************** * Freetype constants ********************************************************************/ // freetype.h (FT_FREETYPE_H) enum FT_Encoding { FT_ENCODING_NONE = ( ( cast(FT_UInt32)(0) << 24 ) | ( cast(FT_UInt32)(0) << 16 ) | ( cast(FT_UInt32)(0) << 8 ) | cast(FT_UInt32)(0) ) , FT_ENCODING_MS_SYMBOL = ( ( cast(FT_UInt32)('s') << 24 ) | ( cast(FT_UInt32)('y') << 16 ) | ( cast(FT_UInt32)('m') << 8 ) | cast(FT_UInt32)('b') ) , FT_ENCODING_UNICODE = ( ( cast(FT_UInt32)('u') << 24 ) | ( cast(FT_UInt32)('n') << 16 ) | ( cast(FT_UInt32)('i') << 8 ) | cast(FT_UInt32)('c') ) , FT_ENCODING_SJIS = ( ( cast(FT_UInt32)('s') << 24 ) | ( cast(FT_UInt32)('j') << 16 ) | ( cast(FT_UInt32)('i') << 8 ) | cast(FT_UInt32)('s') ) , FT_ENCODING_GB2312 = ( ( cast(FT_UInt32)('g') << 24 ) | ( cast(FT_UInt32)('b') << 16 ) | ( cast(FT_UInt32)(' ') << 8 ) | cast(FT_UInt32)(' ') ) , FT_ENCODING_BIG5 = ( ( cast(FT_UInt32)('b') << 24 ) | ( cast(FT_UInt32)('i') << 16 ) | ( cast(FT_UInt32)('g') << 8 ) | cast(FT_UInt32)('5') ) , FT_ENCODING_WANSUNG = ( ( cast(FT_UInt32)('w') << 24 ) | ( cast(FT_UInt32)('a') << 16 ) | ( cast(FT_UInt32)('n') << 8 ) | cast(FT_UInt32)('s') ) , FT_ENCODING_JOHAB = ( ( cast(FT_UInt32)('j') << 24 ) | ( cast(FT_UInt32)('o') << 16 ) | ( cast(FT_UInt32)('h') << 8 ) | cast(FT_UInt32)('a') ) , FT_ENCODING_MS_SJIS = FT_ENCODING_SJIS, FT_ENCODING_MS_GB2312 = FT_ENCODING_GB2312, FT_ENCODING_MS_BIG5 = FT_ENCODING_BIG5, FT_ENCODING_MS_WANSUNG = FT_ENCODING_WANSUNG, FT_ENCODING_MS_JOHAB = FT_ENCODING_JOHAB, FT_ENCODING_ADOBE_STANDARD = ( ( cast(FT_UInt32)('A') << 24 ) | ( cast(FT_UInt32)('D') << 16 ) | ( cast(FT_UInt32)('O') << 8 ) | cast(FT_UInt32)('B') ) , FT_ENCODING_ADOBE_EXPERT = ( ( cast(FT_UInt32)('A') << 24 ) | ( cast(FT_UInt32)('D') << 16 ) | ( cast(FT_UInt32)('B') << 8 ) | cast(FT_UInt32)('E') ) , FT_ENCODING_ADOBE_CUSTOM = ( ( cast(FT_UInt32)('A') << 24 ) | ( cast(FT_UInt32)('D') << 16 ) | ( cast(FT_UInt32)('B') << 8 ) | cast(FT_UInt32)('C') ) , FT_ENCODING_ADOBE_LATIN_1 = ( ( cast(FT_UInt32)('l') << 24 ) | ( cast(FT_UInt32)('a') << 16 ) | ( cast(FT_UInt32)('t') << 8 ) | cast(FT_UInt32)('1') ) , FT_ENCODING_OLD_LATIN_2 = ( ( cast(FT_UInt32)('l') << 24 ) | ( cast(FT_UInt32)('a') << 16 ) | ( cast(FT_UInt32)('t') << 8 ) | cast(FT_UInt32)('2') ) , FT_ENCODING_APPLE_ROMAN = ( ( cast(FT_UInt32)('a') << 24 ) | ( cast(FT_UInt32)('r') << 16 ) | ( cast(FT_UInt32)('m') << 8 ) | cast(FT_UInt32)('n') ) } enum : FT_Long { FT_FACE_FLAG_SCALABLE = 1 << 0, FT_FACE_FLAG_FIXED_SIZES = 1 << 1, FT_FACE_FLAG_FIXED_WIDTH = 1 << 2, FT_FACE_FLAG_SFNT = 1 << 3, FT_FACE_FLAG_HORIZONTAL = 1 << 4, FT_FACE_FLAG_VERTICAL = 1 << 5, FT_FACE_FLAG_KERNING = 1 << 6, FT_FACE_FLAG_FAST_GLYPHS = 1 << 7, FT_FACE_FLAG_MULTIPLE_MASTERS = 1 << 8, FT_FACE_FLAG_GLYPH_NAMES = 1 << 9, FT_FACE_FLAG_EXTERNAL_STREAM = 1 << 10, FT_FACE_FLAG_HINTER = 1 << 11, } enum { FT_STYLE_FLAG_ITALIC = 1 << 0, FT_STYLE_FLAG_BOLD = 1 << 1, } enum FT_Size_Request_Type { FT_SIZE_REQUEST_TYPE_NOMINAL, FT_SIZE_REQUEST_TYPE_REAL_DIM, FT_SIZE_REQUEST_TYPE_BBOX, FT_SIZE_REQUEST_TYPE_CELL, FT_SIZE_REQUEST_TYPE_SCALES, FT_SIZE_REQUEST_TYPE_MAX } enum : uint { FT_OPEN_MEMORY = 0x1, FT_OPEN_STREAM = 0x2, FT_OPEN_DRIVER = 0x4, FT_OPEN_PATHNAME = 0x8, FT_OPEN_PARAMS = 0x10, } enum : uint { FT_LOAD_DEFAULT = 0x0, FT_LOAD_NO_SCALE = 0x1, FT_LOAD_NO_HINTING = 0x2, FT_LOAD_RENDER = 0x4, FT_LOAD_NO_BITMAP = 0x8, FT_LOAD_VERTICAL_LAYOUT = 0x10, FT_LOAD_FORCE_AUTOHINT = 0x20, FT_LOAD_CROP_BITMAP = 0x40, FT_LOAD_PEDANTIC = 0x80, FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH = 0x200, FT_LOAD_NO_RECURSE = 0x400, FT_LOAD_IGNORE_TRANSFORM = 0x800, FT_LOAD_MONOCHROME = 0x1000, FT_LOAD_LINEAR_DESIGN = 0x2000, /* temporary hack! */ FT_LOAD_SBITS_ONLY = 0x4000, FT_LOAD_NO_AUTOHINT = 0x8000U, } enum FT_Render_Mode { FT_RENDER_MODE_NORMAL = 0, FT_RENDER_MODE_LIGHT, FT_RENDER_MODE_MONO, FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V, FT_RENDER_MODE_MAX } enum { FT_LOAD_TARGET_NORMAL = ( FT_Render_Mode.FT_RENDER_MODE_NORMAL & 15 ) << 16, FT_LOAD_TARGET_LIGHT = ( FT_Render_Mode.FT_RENDER_MODE_LIGHT & 15 ) << 16, FT_LOAD_TARGET_MONO = ( FT_Render_Mode.FT_RENDER_MODE_MONO & 15 ) << 16, FT_LOAD_TARGET_LCD = ( FT_Render_Mode.FT_RENDER_MODE_LCD & 15 ) << 16, FT_LOAD_TARGET_LCD_V = ( FT_Render_Mode.FT_RENDER_MODE_LCD_V & 15 ) << 16, } enum FT_Kerning_Mode { FT_KERNING_DEFAULT = 0, FT_KERNING_UNFITTED, FT_KERNING_UNSCALED } enum { FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS = 1, FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES = 2, FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID = 4, FT_SUBGLYPH_FLAG_SCALE = 8, FT_SUBGLYPH_FLAG_XY_SCALE = 0x40, FT_SUBGLYPH_FLAG_2X2 = 0x80, FT_SUBGLYPH_FLAG_USE_MY_METRICS = 0x200, } enum // FreeType version { FREETYPE_MAJOR = 2, FREETYPE_MINOR = 3, FREETYPE_PATCH = 5, } // ftimage.h (FT_FREETYPE_H, FT_TYPES_H, FT_IMAGE_H) enum FT_Pixel_Mode { FT_PIXEL_MODE_NONE = 0, FT_PIXEL_MODE_MONO, FT_PIXEL_MODE_GRAY, FT_PIXEL_MODE_GRAY2, FT_PIXEL_MODE_GRAY4, FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V, FT_PIXEL_MODE_MAX } enum : uint { FT_OUTLINE_NONE = 0x0, FT_OUTLINE_OWNER = 0x1, FT_OUTLINE_EVEN_ODD_FILL = 0x2, FT_OUTLINE_REVERSE_FILL = 0x4, FT_OUTLINE_IGNORE_DROPOUTS = 0x8, FT_OUTLINE_HIGH_PRECISION = 0x100, FT_OUTLINE_SINGLE_PASS = 0x200, } enum { FT_CURVE_TAG_ON = 1, FT_CURVE_TAG_CONIC = 0, FT_CURVE_TAG_CUBIC = 2, FT_CURVE_TAG_TOUCH_X = 8, FT_CURVE_TAG_TOUCH_Y = 16, FT_CURVE_TAG_TOUCH_BOTH = FT_CURVE_TAG_TOUCH_X | FT_CURVE_TAG_TOUCH_Y, } enum FT_Glyph_Format { FT_GLYPH_FORMAT_NONE = ( ( cast(uint)0 << 24 ) | ( cast(uint)0 << 16 ) | ( cast(uint)0 << 8 ) | cast(uint)0 ) , FT_GLYPH_FORMAT_COMPOSITE = ( ( cast(uint)'c' << 24 ) | ( cast(uint)'o' << 16 ) | ( cast(uint)'m' << 8 ) | cast(uint)'p' ) , FT_GLYPH_FORMAT_BITMAP = ( ( cast(uint)'b' << 24 ) | ( cast(uint)'i' << 16 ) | ( cast(uint)'t' << 8 ) | cast(uint)'s' ) , FT_GLYPH_FORMAT_OUTLINE = ( ( cast(uint)'o' << 24 ) | ( cast(uint)'u' << 16 ) | ( cast(uint)'t' << 8 ) | cast(uint)'l' ) , FT_GLYPH_FORMAT_PLOTTER = ( ( cast(uint)'p' << 24 ) | ( cast(uint)'l' << 16 ) | ( cast(uint)'o' << 8 ) | cast(uint)'t' ) } enum { FT_RASTER_FLAG_DEFAULT = 0x0, FT_RASTER_FLAG_AA = 0x1, FT_RASTER_FLAG_DIRECT = 0x2, FT_RASTER_FLAG_CLIP = 0x4 } // ftmodapi.h (FT_MODULE_H, FT_RENDER_H) enum { FT_MODULE_FONT_DRIVER = 1, FT_MODULE_RENDERER = 2, FT_MODULE_HINTER = 4, FT_MODULE_STYLER = 8, FT_MODULE_DRIVER_SCALABLE = 0x100, FT_MODULE_DRIVER_NO_OUTLINES= 0x200, FT_MODULE_DRIVER_HAS_HINTER = 0x400 } enum FT_TrueTypeEngineType { FT_TRUETYPE_ENGINE_TYPE_NONE = 0, FT_TRUETYPE_ENGINE_TYPE_UNPATENTED, FT_TRUETYPE_ENGINE_TYPE_PATENTED } // ftmoderr.h (FT_FREETYPE_H, FT_ERRORS_H, FT_MODULE_ERRORS_H) enum { FT_Mod_Err_Base = 0, FT_Mod_Err_Autofit = 0, FT_Mod_Err_BDF = 0, FT_Mod_Err_Cache = 0, FT_Mod_Err_CFF = 0, FT_Mod_Err_CID = 0, FT_Mod_Err_Gzip = 0, FT_Mod_Err_LZW = 0, FT_Mod_Err_OTvalid = 0, FT_Mod_Err_PCF = 0, FT_Mod_Err_PFR = 0, FT_Mod_Err_PSaux = 0, FT_Mod_Err_PShinter = 0, FT_Mod_Err_PSnames = 0, FT_Mod_Err_Raster = 0, FT_Mod_Err_SFNT = 0, FT_Mod_Err_Smooth = 0, FT_Mod_Err_TrueType = 0, FT_Mod_Err_Type1 = 0, FT_Mod_Err_Type42 = 0, FT_Mod_Err_Winfonts = 0, FT_Mod_Err_Max } // ftoutln (FT_OUTLINE_H, FT_STROKER_H) enum FT_Orientation { FT_ORIENTATION_TRUETYPE = 0, FT_ORIENTATION_POSTSCRIPT = 1, FT_ORIENTATION_FILL_RIGHT = FT_ORIENTATION_TRUETYPE, FT_ORIENTATION_FILL_LEFT = FT_ORIENTATION_POSTSCRIPT } // t1tables.h (FT_TYPE1_TABLES_H) enum T1_Blend_Flags { T1_BLEND_UNDERLINE_POSITION = 0, T1_BLEND_UNDERLINE_THICKNESS, T1_BLEND_ITALIC_ANGLE, T1_BLEND_BLUE_VALUES, T1_BLEND_OTHER_BLUES, T1_BLEND_STANDARD_WIDTH, T1_BLEND_STANDARD_HEIGHT, T1_BLEND_STEM_SNAP_WIDTHS, T1_BLEND_STEM_SNAP_HEIGHTS, T1_BLEND_BLUE_SCALE, T1_BLEND_BLUE_SHIFT, T1_BLEND_FAMILY_BLUES, T1_BLEND_FAMILY_OTHER_BLUES, T1_BLEND_FORCE_BOLD, T1_BLEND_MAX } // ttnameid.h (FT_TRUETYPE_IDS_H) // NOTE: _lots_ of missing #defines which _could_ be made into enums // tttables.h (FT_TRUETYPE_TABLES_H) enum FT_Sfnt_Tag { ft_sfnt_head = 0, ft_sfnt_maxp = 1, ft_sfnt_os2 = 2, ft_sfnt_hhea = 3, ft_sfnt_vhea = 4, ft_sfnt_post = 5, ft_sfnt_pclt = 6, sfnt_max } // ftbdf.h (FT_BDF_H) enum BDF_PropertyType { BDF_PROPERTY_TYPE_NONE = 0, BDF_PROPERTY_TYPE_ATOM = 1, BDF_PROPERTY_TYPE_INTEGER = 2, BDF_PROPERTY_TYPE_CARDINAL = 3 } // ftglyph.h (FT_GLYPH_H, FT_CACHE_H, FT_STROKER_H) enum FT_Glyph_BBox_Mode { FT_GLYPH_BBOX_UNSCALED = 0, FT_GLYPH_BBOX_SUBPIXELS = 0, FT_GLYPH_BBOX_GRIDFIT = 1, FT_GLYPH_BBOX_TRUNCATE = 2, FT_GLYPH_BBOX_PIXELS = 3 } // ftotval.h (FT_OPENTYPE_VALIDATE_H) enum { FT_VALIDATE_BASE = 0x0100, FT_VALIDATE_GDEF = 0x0200, FT_VALIDATE_GPOS = 0x0400, FT_VALIDATE_GSUB = 0x0800, FT_VALIDATE_JSTF = 0x1000, FT_VALIDATE_OT = FT_VALIDATE_BASE | FT_VALIDATE_GDEF | FT_VALIDATE_GPOS | FT_VALIDATE_GSUB | FT_VALIDATE_JSTF } // ftgxval.h (FT_GX_VALIDATE_H) enum { // pulled just a few #defines (some aren't for external use anyway) FT_VALIDATE_GX_LENGTH = 10, FT_VALIDATE_GX_START = 0x4000, FT_VALIDATE_feat = FT_VALIDATE_GX_START << 0, FT_VALIDATE_mort = FT_VALIDATE_GX_START << 1, FT_VALIDATE_morx = FT_VALIDATE_GX_START << 2, FT_VALIDATE_bsln = FT_VALIDATE_GX_START << 3, FT_VALIDATE_just = FT_VALIDATE_GX_START << 4, FT_VALIDATE_kern = FT_VALIDATE_GX_START << 5, FT_VALIDATE_opbd = FT_VALIDATE_GX_START << 6, FT_VALIDATE_trak = FT_VALIDATE_GX_START << 7, FT_VALIDATE_prop = FT_VALIDATE_GX_START << 8, FT_VALIDATE_lcar = FT_VALIDATE_GX_START << 9, FT_VALIDATE_GX = FT_VALIDATE_feat | FT_VALIDATE_mort | FT_VALIDATE_morx | FT_VALIDATE_bsln | FT_VALIDATE_just | FT_VALIDATE_kern | FT_VALIDATE_opbd | FT_VALIDATE_trak | FT_VALIDATE_prop | FT_VALIDATE_lcar, FT_VALIDATE_MS = FT_VALIDATE_GX_START << 0, FT_VALIDATE_APPLE = FT_VALIDATE_GX_START << 1, FT_VALIDATE_CKERN = FT_VALIDATE_MS | FT_VALIDATE_APPLE } // ftstroke.h (FT_STROKER_H) enum FT_Stroker_LineJoin { FT_STROKER_LINEJOIN_ROUND = 0, FT_STROKER_LINEJOIN_BEVEL, FT_STROKER_LINEJOIN_MITER } enum FT_Stroker_LineCap { FT_STROKER_LINECAP_BUTT = 0, FT_STROKER_LINECAP_ROUND, FT_STROKER_LINECAP_SQUARE } enum FT_StrokerBorder { FT_STROKER_BORDER_LEFT = 0, FT_STROKER_BORDER_RIGHT } // fttrigon.h (FT_TRIGONOMETRY_H) enum { FT_ANGLE_PI = 180 << 16, FT_ANGLE_2PI = FT_ANGLE_PI * 2, FT_ANGLE_PI2 = FT_ANGLE_PI / 2, FT_ANGLE_PI4 = FT_ANGLE_PI / 4 } // ftlcdfil.h (FT_LCD_FILTER_H) enum FT_LcdFilter { FT_LCD_FILTER_NONE = 0, FT_LCD_FILTER_DEFAULT = 1, FT_LCD_FILTER_LIGHT = 2, FT_LCD_FILTER_LEGACY = 16, FT_LCD_FILTER_MAX } // ftgasp.h (FT_GASP_H) enum { FT_GASP_NO_TABLE = -1, FT_GASP_DO_GRIDFIT = 0x01, FT_GASP_DO_GRAY = 0x02, FT_GASP_SYMMETRIC_SMOOTHING = 0x08, FT_GASP_SYMMETRIC_GRIDFIT = 0x10 } /+ other version(Windows) { enum { _JBLEN = 16 } } else { enum { _JBLEN = 10 } } enum { FT_Err_Ok = 0x00, FT_Err_Cannot_Open_Resource = 0x01 + 0 , FT_Err_Unknown_File_Format = 0x02 + 0 , FT_Err_Invalid_File_Format = 0x03 + 0 , FT_Err_Invalid_Version = 0x04 + 0 , FT_Err_Lower_Module_Version = 0x05 + 0 , FT_Err_Invalid_Argument = 0x06 + 0 , FT_Err_Unimplemented_Feature = 0x07 + 0 , FT_Err_Invalid_Table = 0x08 + 0 , FT_Err_Invalid_Offset = 0x09 + 0 , FT_Err_Invalid_Glyph_Index = 0x10 + 0 , FT_Err_Invalid_Character_Code = 0x11 + 0 , FT_Err_Invalid_Glyph_Format = 0x12 + 0 , FT_Err_Cannot_Render_Glyph = 0x13 + 0 , FT_Err_Invalid_Outline = 0x14 + 0 , FT_Err_Invalid_Composite = 0x15 + 0 , FT_Err_Too_Many_Hints = 0x16 + 0 , FT_Err_Invalid_Pixel_Size = 0x17 + 0 , FT_Err_Invalid_Handle = 0x20 + 0 , FT_Err_Invalid_Library_Handle = 0x21 + 0 , FT_Err_Invalid_Driver_Handle = 0x22 + 0 , FT_Err_Invalid_Face_Handle = 0x23 + 0 , FT_Err_Invalid_Size_Handle = 0x24 + 0 , FT_Err_Invalid_Slot_Handle = 0x25 + 0 , FT_Err_Invalid_CharMap_Handle = 0x26 + 0 , FT_Err_Invalid_Cache_Handle = 0x27 + 0 , FT_Err_Invalid_Stream_Handle = 0x28 + 0 , FT_Err_Too_Many_Drivers = 0x30 + 0 , FT_Err_Too_Many_Extensions = 0x31 + 0 , FT_Err_Out_Of_Memory = 0x40 + 0 , FT_Err_Unlisted_Object = 0x41 + 0 , FT_Err_Cannot_Open_Stream = 0x51 + 0 , FT_Err_Invalid_Stream_Seek = 0x52 + 0 , FT_Err_Invalid_Stream_Skip = 0x53 + 0 , FT_Err_Invalid_Stream_Read = 0x54 + 0 , FT_Err_Invalid_Stream_Operation = 0x55 + 0 , FT_Err_Invalid_Frame_Operation = 0x56 + 0 , FT_Err_Nested_Frame_Access = 0x57 + 0 , FT_Err_Invalid_Frame_Read = 0x58 + 0 , FT_Err_Raster_Uninitialized = 0x60 + 0 , FT_Err_Raster_Corrupted = 0x61 + 0 , FT_Err_Raster_Overflow = 0x62 + 0 , FT_Err_Raster_Negative_Height = 0x63 + 0 , FT_Err_Too_Many_Caches = 0x70 + 0 , FT_Err_Invalid_Opcode = 0x80 + 0 , FT_Err_Too_Few_Arguments = 0x81 + 0 , FT_Err_Stack_Overflow = 0x82 + 0 , FT_Err_Code_Overflow = 0x83 + 0 , FT_Err_Bad_Argument = 0x84 + 0 , FT_Err_Divide_By_Zero = 0x85 + 0 , FT_Err_Invalid_Reference = 0x86 + 0 , FT_Err_Debug_OpCode = 0x87 + 0 , FT_Err_ENDF_In_Exec_Stream = 0x88 + 0 , FT_Err_Nested_DEFS = 0x89 + 0 , FT_Err_Invalid_CodeRange = 0x8A + 0 , FT_Err_Execution_Too_Long = 0x8B + 0 , FT_Err_Too_Many_Function_Defs = 0x8C + 0 , FT_Err_Too_Many_Instruction_Defs = 0x8D + 0 , FT_Err_Table_Missing = 0x8E + 0 , FT_Err_Horiz_Header_Missing = 0x8F + 0 , FT_Err_Locations_Missing = 0x90 + 0 , FT_Err_Name_Table_Missing = 0x91 + 0 , FT_Err_CMap_Table_Missing = 0x92 + 0 , FT_Err_Hmtx_Table_Missing = 0x93 + 0 , FT_Err_Post_Table_Missing = 0x94 + 0 , FT_Err_Invalid_Horiz_Metrics = 0x95 + 0 , FT_Err_Invalid_CharMap_Format = 0x96 + 0 , FT_Err_Invalid_PPem = 0x97 + 0 , FT_Err_Invalid_Vert_Metrics = 0x98 + 0 , FT_Err_Could_Not_Find_Context = 0x99 + 0 , FT_Err_Invalid_Post_Table_Format = 0x9A + 0 , FT_Err_Invalid_Post_Table = 0x9B + 0 , FT_Err_Syntax_Error = 0xA0 + 0 , FT_Err_Stack_Underflow = 0xA1 + 0 , FT_Err_Ignore = 0xA2 + 0 , FT_Err_Missing_Startfont_Field = 0xB0 + 0 , FT_Err_Missing_Font_Field = 0xB1 + 0 , FT_Err_Missing_Size_Field = 0xB2 + 0 , FT_Err_Missing_Chars_Field = 0xB3 + 0 , FT_Err_Missing_Startchar_Field = 0xB4 + 0 , FT_Err_Missing_Encoding_Field = 0xB5 + 0 , FT_Err_Missing_Bbx_Field = 0xB6 + 0 , FT_Err_Max } enum FT_Frame_Op { ft_frame_end = 0, ft_frame_start = ((1 << 2 ) | ( 0 << 1 ) | 0 ) , ft_frame_byte = ( ( 2 << 2 ) | ( 0 << 1 ) | 0 ) , ft_frame_schar = ( ( 2 << 2 ) | ( 0 << 1 ) | 1 ) , ft_frame_ushort_be = ( ( 3 << 2 ) | ( 0 << 1 ) | 0 ) , ft_frame_short_be = ( ( 3 << 2 ) | ( 0 << 1 ) | 1 ) , ft_frame_ushort_le = ( ( 3 << 2 ) | ( 1 << 1 ) | 0 ) , ft_frame_short_le = ( ( 3 << 2 ) | ( 1 << 1 ) | 1 ) , ft_frame_ulong_be = ( ( 4 << 2 ) | ( 0 << 1 ) | 0 ) , ft_frame_long_be = ( ( 4 << 2 ) | ( 0 << 1 ) | 1 ) , ft_frame_ulong_le = ( ( 4 << 2 ) | ( 1 << 1 ) | 0 ) , ft_frame_long_le = ( ( 4 << 2 ) | ( 1 << 1 ) | 1 ) , ft_frame_uoff3_be = ( ( 5 << 2 ) | ( 0 << 1 ) | 0 ) , ft_frame_off3_be = ( ( 5 << 2 ) | ( 0 << 1 ) | 1 ) , ft_frame_uoff3_le = ( ( 5 << 2 ) | ( 1 << 1 ) | 0 ) , ft_frame_off3_le = ( ( 5 << 2 ) | ( 1 << 1 ) | 1 ) , ft_frame_bytes = ( ( 6 << 2 ) | ( 0 << 1 ) | 0 ) , ft_frame_skip = ( ( 6 << 2 ) | ( 0 << 1 ) | 1 ) } enum FT_ValidationLevel { FT_VALIDATE_DEFAULT = 0, FT_VALIDATE_TIGHT, FT_VALIDATE_PARANOID } enum T1_EncodingType { T1_ENCODING_TYPE_NONE = 0, T1_ENCODING_TYPE_ARRAY, T1_ENCODING_TYPE_STANDARD, T1_ENCODING_TYPE_ISOLATIN1, T1_ENCODING_TYPE_EXPERT } enum T1_TokenType { T1_TOKEN_TYPE_NONE = 0, T1_TOKEN_TYPE_ANY, T1_TOKEN_TYPE_STRING, T1_TOKEN_TYPE_ARRAY, T1_TOKEN_TYPE_MAX } enum T1_FieldType { T1_FIELD_TYPE_NONE = 0, T1_FIELD_TYPE_BOOL, T1_FIELD_TYPE_INTEGER, T1_FIELD_TYPE_FIXED, T1_FIELD_TYPE_FIXED_1000, T1_FIELD_TYPE_STRING, T1_FIELD_TYPE_KEY, T1_FIELD_TYPE_BBOX, T1_FIELD_TYPE_INTEGER_ARRAY, T1_FIELD_TYPE_FIXED_ARRAY, T1_FIELD_TYPE_CALLBACK, T1_FIELD_TYPE_MAX } enum T1_FieldLocation { T1_FIELD_LOCATION_CID_INFO, T1_FIELD_LOCATION_FONT_DICT, T1_FIELD_LOCATION_FONT_INFO, T1_FIELD_LOCATION_PRIVATE, T1_FIELD_LOCATION_BBOX, T1_FIELD_LOCATION_MAX } enum T1_ParseState { T1_Parse_Start, T1_Parse_Have_Width, T1_Parse_Have_Moveto, T1_Parse_Have_Path } +/ //END Enums //BEGIN Structs /******************************************************************** * Freetype structures ********************************************************************/ // Opaque types (not defined anywhere) struct FT_RasterRec; struct FT_LibraryRec; struct FT_ModuleRec {} struct FT_DriverRec; struct FT_RendererRec {} struct FT_Face_InternalRec; struct FT_Size_InternalRec; struct FT_SubGlyphRec; struct FT_Slot_InternalRec; struct FTC_FaceIDRec; struct FTC_ManagerRec; struct FTC_NodeRec; struct FTC_CMapCacheRec; struct FTC_ImageCacheRec; struct FTC_SBitCacheRec; struct FT_StrokerRec; struct FT_IncrementalRec; // ftsystem.h (FT_FREETYPE_H, FT_TYPES_H, FT_SYSTEM_H) union FT_StreamDesc { int value; void* pointer; } struct FT_MemoryRec { void* user; FT_Alloc_Func alloc; FT_Free_Func free; FT_Realloc_Func realloc; } struct FT_StreamRec { ubyte* base; uint size; uint pos; FT_StreamDesc descriptor; FT_StreamDesc pathname; FT_Stream_IoFunc read; FT_Stream_CloseFunc close; FT_Memory memory; ubyte* cursor; ubyte* limit; } // ftimage.h (FT_FREETYPE_H, FT_TYPES_H, FT_IMAGE_H) struct FT_Vector { FT_Pos x; FT_Pos y; } struct FT_BBox { FT_Pos xMin, yMin; FT_Pos xMax, yMax; } struct FT_Bitmap { int rows; int width; int pitch; ubyte* buffer; short num_grays; byte pixel_mode; byte palette_mode; void* palette; } struct FT_Outline { short n_contours; short n_points; FT_Vector* points; byte* tags; short* contours; int flags; } struct FT_Outline_Funcs { FT_Outline_MoveToFunc move_to; FT_Outline_LineToFunc line_to; FT_Outline_ConicToFunc conic_to; FT_Outline_CubicToFunc cubic_to; int shift; FT_Pos delta; } struct FT_Span { short x; ushort len; ubyte coverage; } struct FT_Raster_Params { const FT_Bitmap* target; const void* source; int flags; FT_SpanFunc gray_spans; FT_SpanFunc black_spans; FT_Raster_BitTest_Func bit_test; FT_Raster_BitSet_Func bit_set; void* user; FT_BBox clip_box; } struct FT_Raster_Funcs { FT_Glyph_Format glyph_format; FT_Raster_NewFunc raster_new; FT_Raster_ResetFunc raster_reset; FT_Raster_SetModeFunc raster_set_mode; FT_Raster_RenderFunc raster_render; FT_Raster_DoneFunc raster_done; } // fttypes.h (FT_FREETYPE_H, FT_TYPES_H) struct FT_UnitVector { FT_F2Dot14 x; FT_F2Dot14 y; } struct FT_Matrix { FT_Fixed xx, xy; FT_Fixed yx, yy; } struct FT_Data { const FT_Byte* pointer; FT_Int length; } struct FT_Generic { void* data; FT_Generic_Finalizer finalizer; } struct FT_ListNodeRec { FT_ListNode prev; FT_ListNode next; void* data; } struct FT_ListRec { FT_ListNode head; FT_ListNode tail; } // freetype.h (FT_FREETYPE_H) struct FT_Glyph_Metrics { FT_Pos width; FT_Pos height; FT_Pos horiBearingX; FT_Pos horiBearingY; FT_Pos horiAdvance; FT_Pos vertBearingX; FT_Pos vertBearingY; FT_Pos vertAdvance; } struct FT_Bitmap_Size { FT_Short height; FT_Short width; FT_Pos size; FT_Pos x_ppem; FT_Pos y_ppem; } struct FT_CharMapRec { FT_Face face; FT_Encoding encoding; FT_UShort platform_id; FT_UShort encoding_id; } struct FT_FaceRec { FT_Long num_faces; FT_Long face_index; FT_Long face_flags; FT_Long style_flags; FT_Long num_glyphs; FT_String* family_name; FT_String* style_name; FT_Int num_fixed_sizes; FT_Bitmap_Size* available_sizes; FT_Int num_charmaps; FT_CharMap* charmaps; FT_Generic generic; FT_BBox bbox; FT_UShort units_per_EM; FT_Short ascender; FT_Short descender; FT_Short height; FT_Short max_advance_width; FT_Short max_advance_height; FT_Short underline_position; FT_Short underline_thickness; FT_GlyphSlot glyph; FT_Size size; FT_CharMap charmap; FT_Driver driver; FT_Memory memory; FT_Stream stream; FT_ListRec sizes_list; FT_Generic autohint; void* extensions; FT_Face_Internal internal; } struct FT_Size_Metrics { FT_UShort x_ppem; FT_UShort y_ppem; FT_Fixed x_scale; FT_Fixed y_scale; FT_Pos ascender; FT_Pos descender; FT_Pos height; FT_Pos max_advance; } struct FT_SizeRec { FT_Face face; FT_Generic generic; FT_Size_Metrics metrics; FT_Size_Internal internal; } struct FT_GlyphSlotRec { FT_Library library; FT_Face face; FT_GlyphSlot next; FT_UInt reserved; FT_Generic generic; FT_Glyph_Metrics metrics; FT_Fixed linearHoriAdvance; FT_Fixed linearVertAdvance; FT_Vector advance; FT_Glyph_Format format; FT_Bitmap bitmap; FT_Int bitmap_left; FT_Int bitmap_top; FT_Outline outline; FT_UInt num_subglyphs; FT_SubGlyph subglyphs; void* control_data; int control_len; FT_Pos lsb_delta; FT_Pos rsb_delta; void* other; FT_Slot_Internal internal; } struct FT_Parameter { FT_ULong tag; FT_Pointer data; } struct FT_Open_Args { FT_UInt flags; const FT_Byte* memory_base; FT_Long memory_size; FT_String* pathname; FT_Stream stream; FT_Module driver; FT_Int num_params; FT_Parameter* params; } struct FT_Size_RequestRec { FT_Size_Request_Type type; FT_Long width; FT_Long height; FT_UInt horiResolution; FT_UInt vertResolution; } // ftmodapi.h (FT_MODULE_H, FT_RENDER_H) struct FT_Module_Class { FT_ULong module_flags; FT_Long module_size; FT_String* module_name; FT_Fixed module_version; FT_Fixed module_requires; void* module_interface; FT_Module_Constructor module_init; FT_Module_Destructor module_done; FT_Module_Requester get_interface; } // ftrender.h (FT_RENDER_H) struct FT_Glyph_Class // typedef'd in ftglyph.h { FT_Long glyph_size; FT_Glyph_Format glyph_format; FT_Glyph_InitFunc glyph_init; FT_Glyph_DoneFunc glyph_done; FT_Glyph_CopyFunc glyph_copy; FT_Glyph_TransformFunc glyph_transform; FT_Glyph_GetBBoxFunc glyph_bbox; FT_Glyph_PrepareFunc glyph_prepare; } struct FT_Renderer_Class { FT_Module_Class root; FT_Glyph_Format glyph_format; FT_Renderer_RenderFunc render_glyph; FT_Renderer_TransformFunc transform_glyph; FT_Renderer_GetCBoxFunc get_glyph_cbox; FT_Renderer_SetModeFunc set_mode; FT_Raster_Funcs* raster_class; } // t1tables.h (FT_TYPE1_TABLES_H) struct PS_FontInfoRec { FT_String* _version; FT_String* notice; FT_String* full_name; FT_String* family_name; FT_String* weight; FT_Long italic_angle; FT_Bool is_fixed_pitch; FT_Short underline_position; FT_UShort underline_thickness; } struct PS_PrivateRec { FT_Int unique_id; FT_Int lenIV; FT_Byte num_blue_values; FT_Byte num_other_blues; FT_Byte num_family_blues; FT_Byte num_family_other_blues; FT_Short[14] blue_values; FT_Short[10] other_blues; FT_Short[14] family_blues; FT_Short[10] family_other_blues; FT_Fixed blue_scale; FT_Int blue_shift; FT_Int blue_fuzz; FT_UShort[1] standard_width; FT_UShort[1] standard_height; FT_Byte num_snap_widths; FT_Byte num_snap_heights; FT_Bool force_bold; FT_Bool round_stem_up; FT_Short[13] snap_widths; FT_Short[13] snap_heights; FT_Fixed expansion_factor; FT_Long language_group; FT_Long password; FT_Short[2] min_feature; } struct PS_DesignMapRec { FT_Byte num_points; FT_Long* design_points; FT_Fixed* blend_points; } struct PS_BlendRec { FT_UInt num_designs; FT_UInt num_axis; FT_String*[4] axis_names; FT_Fixed*[16] design_pos; PS_DesignMapRec[4] design_map; FT_Fixed* weight_vector; FT_Fixed* default_weight_vector; PS_FontInfo[16+1] font_infos; PS_Private[16+1] privates; FT_ULong blend_bitflags; FT_BBox*[16+1] bboxes; } struct CID_FaceDictRec { PS_PrivateRec private_dict; FT_UInt len_buildchar; FT_Fixed forcebold_threshold; FT_Pos stroke_width; FT_Fixed expansion_factor; FT_Byte paint_type; FT_Byte font_type; FT_Matrix font_matrix; FT_Vector font_offset; FT_UInt num_subrs; FT_ULong subrmap_offset; FT_Int sd_bytes; } struct CID_FaceInfoRec { FT_String* cid_font_name; FT_Fixed cid_version; FT_Int cid_font_type; FT_String* registry; FT_String* ordering; FT_Int supplement; PS_FontInfoRec font_info; FT_BBox font_bbox; FT_ULong uid_base; FT_Int num_xuid; FT_ULong[16] xuid; FT_ULong cidmap_offset; FT_Int fd_bytes; FT_Int gd_bytes; FT_ULong cid_count; FT_Int num_dicts; CID_FaceDict font_dicts; FT_ULong data_offset; } // tttables.h (FT_TRUETYPE_TABLES_H) struct TT_Header { FT_Fixed Table_Version; FT_Fixed Font_Revision; FT_Long CheckSum_Adjust; FT_Long Magic_Number; FT_UShort Flags; FT_UShort Units_Per_EM; FT_Long[2] Created; FT_Long[2] Modified; FT_Short xMin; FT_Short yMin; FT_Short xMax; FT_Short yMax; FT_UShort Mac_Style; FT_UShort Lowest_Rec_PPEM; FT_Short Font_Direction; FT_Short Index_To_Loc_Format; FT_Short Glyph_Data_Format; } struct TT_HoriHeader { FT_Fixed Version; FT_Short Ascender; FT_Short Descender; FT_Short Line_Gap; FT_UShort advance_Width_Max; FT_Short min_Left_Side_Bearing; FT_Short min_Right_Side_Bearing; FT_Short xMax_Extent; FT_Short caret_Slope_Rise; FT_Short caret_Slope_Run; FT_Short caret_Offset; FT_Short[4] Reserved; FT_Short metric_Data_Format; FT_UShort number_Of_HMetrics; void* long_metrics; void* short_metrics; } struct TT_VertHeader { FT_Fixed Version; FT_Short Ascender; FT_Short Descender; FT_Short Line_Gap; FT_UShort advance_Height_Max; FT_Short min_Top_Side_Bearing; FT_Short min_Bottom_Side_Bearing; FT_Short yMax_Extent; FT_Short caret_Slope_Rise; FT_Short caret_Slope_Run; FT_Short caret_Offset; FT_Short[4] Reserved; FT_Short metric_Data_Format; FT_UShort number_Of_VMetrics; void* long_metrics; void* short_metrics; } struct TT_OS2 { FT_UShort _version; FT_Short xAvgCharWidth; FT_UShort usWeightClass; FT_UShort usWidthClass; FT_Short fsType; FT_Short ySubscriptXSize; FT_Short ySubscriptYSize; FT_Short ySubscriptXOffset; FT_Short ySubscriptYOffset; FT_Short ySuperscriptXSize; FT_Short ySuperscriptYSize; FT_Short ySuperscriptXOffset; FT_Short ySuperscriptYOffset; FT_Short yStrikeoutSize; FT_Short yStrikeoutPosition; FT_Short sFamilyClass; FT_Byte[10] panose; FT_ULong ulUnicodeRange1; FT_ULong ulUnicodeRange2; FT_ULong ulUnicodeRange3; FT_ULong ulUnicodeRange4; FT_Char[4] achVendID; FT_UShort fsSelection; FT_UShort usFirstCharIndex; FT_UShort usLastCharIndex; FT_Short sTypoAscender; FT_Short sTypoDescender; FT_Short sTypoLineGap; FT_UShort usWinAscent; FT_UShort usWinDescent; FT_ULong ulCodePageRange1; FT_ULong ulCodePageRange2; FT_Short sxHeight; FT_Short sCapHeight; FT_UShort usDefaultChar; FT_UShort usBreakChar; FT_UShort usMaxContext; } struct TT_Postscript { FT_Fixed FormatType; FT_Fixed italicAngle; FT_Short underlinePosition; FT_Short underlineThickness; FT_ULong isFixedPitch; FT_ULong minMemType42; FT_ULong maxMemType42; FT_ULong minMemType1; FT_ULong maxMemType1; } struct TT_PCLT { FT_Fixed Version; FT_ULong FontNumber; FT_UShort Pitch; FT_UShort xHeight; FT_UShort Style; FT_UShort TypeFamily; FT_UShort CapHeight; FT_UShort SymbolSet; FT_Char[16] TypeFace; FT_Char[8] CharacterComplement; FT_Char[6] FileName; FT_Char StrokeWeight; FT_Char WidthType; FT_Byte SerifStyle; FT_Byte Reserved; } struct TT_MaxProfile { FT_Fixed _version; FT_UShort numGlyphs; FT_UShort maxPoints; FT_UShort maxContours; FT_UShort maxCompositePoints; FT_UShort maxCompositeContours; FT_UShort maxZones; FT_UShort maxTwilightPoints; FT_UShort maxStorage; FT_UShort maxFunctionDefs; FT_UShort maxInstructionDefs; FT_UShort maxStackElements; FT_UShort maxSizeOfInstructions; FT_UShort maxComponentElements; FT_UShort maxComponentDepth; } // ftbdf.h (FT_BDF_H) struct BDF_PropertyRec { BDF_PropertyType type; union u { char* atom; FT_Int32 integer; FT_UInt32 cardinal; } } // ftwinfnt.h (FT_WINFONTS_H) struct FT_WinFNT_HeaderRec { FT_UShort _version; FT_ULong file_size; FT_Byte[60] copyright; FT_UShort file_type; FT_UShort nominal_point_size; FT_UShort vertical_resolution; FT_UShort horizontal_resolution; FT_UShort ascent; FT_UShort internal_leading; FT_UShort external_leading; FT_Byte italic; FT_Byte underline; FT_Byte strike_out; FT_UShort weight; FT_Byte charset; FT_UShort pixel_width; FT_UShort pixel_height; FT_Byte pitch_and_family; FT_UShort avg_width; FT_UShort max_width; FT_Byte first_char; FT_Byte last_char; FT_Byte default_char; FT_Byte break_char; FT_UShort bytes_per_row; FT_ULong device_offset; FT_ULong face_name_offset; FT_ULong bits_pointer; FT_ULong bits_offset; FT_Byte reserved; FT_ULong flags; FT_UShort A_space; FT_UShort B_space; FT_UShort C_space; FT_UShort color_table_offset; FT_ULong[4] reserved1; } // ftglyph.h (FT_GLYPH_H, FT_CACHE_H, FT_STROKER_H) struct FT_GlyphRec { FT_Library library; FT_Glyph_Class* clazz; FT_Glyph_Format format; FT_Vector advance; } struct FT_BitmapGlyphRec { FT_GlyphRec root; FT_Int left; FT_Int top; FT_Bitmap bitmap; } struct FT_OutlineGlyphRec { FT_GlyphRec root; FT_Outline outline; } // ftcache.h (FT_CACHE_H) struct FTC_ScalerRec { FTC_FaceID face_id; FT_UInt width; FT_UInt height; FT_Int pixel; FT_UInt x_res; FT_UInt y_res; } struct FTC_ImageTypeRec { FTC_FaceID face_id; FT_Int width; FT_Int height; FT_Int32 flags; } struct FTC_SBitRec { FT_Byte width; FT_Byte height; FT_Char left; FT_Char top; FT_Byte format; FT_Byte max_grays; FT_Short pitch; FT_Char xadvance; FT_Char yadvance; FT_Byte* buffer; } // ftmm.h (FT_MULTIPLE_MASTERS_H) struct FT_MM_Axis { FT_String* name; FT_Long minimum; FT_Long maximum; } struct FT_Multi_Master { FT_UInt num_axis; FT_UInt num_designs; FT_MM_Axis[4] axis; } struct FT_Var_Axis { FT_String* name; FT_Fixed minimum; FT_Fixed def; FT_Fixed maximum; FT_ULong tag; FT_UInt strid; } struct FT_Var_Named_Style { FT_Fixed* coords; FT_UInt strid; } struct FT_MM_Var { FT_UInt num_axis; FT_UInt num_designs; FT_UInt num_namedstyles; FT_Var_Axis* axis; FT_Var_Named_Style* namedstyle; } // ftsnames.h (FT_SFNT_NAMES_H) struct FT_SfntName { FT_UShort platform_id; FT_UShort encoding_id; FT_UShort language_id; FT_UShort name_id; FT_Byte* string; FT_UInt string_len; } // ftincrem.h (FT_INCREMENTAL_H) struct FT_Incremental_MetricsRec { FT_Long bearing_x; FT_Long bearing_y; FT_Long advance; } struct FT_Incremental_FuncsRec { FT_Incremental_GetGlyphDataFunc get_glyph_data; FT_Incremental_FreeGlyphDataFunc free_glyph_data; FT_Incremental_GetGlyphMetricsFunc get_glyph_metrics; } struct FT_Incremental_InterfaceRec { FT_Incremental_FuncsRec* funcs; FT_Incremental object; } /+ other struct FTC_MruNodeRec { FTC_MruNode next; FTC_MruNode prev; } struct FTC_MruListClassRec { FT_UInt node_size; FTC_MruNode_CompareFunc node_compare; FTC_MruNode_InitFunc node_init; FTC_MruNode_ResetFunc node_reset; FTC_MruNode_DoneFunc node_done; } struct FTC_MruListRec { FT_UInt num_nodes; FT_UInt max_nodes; FTC_MruNode nodes; FT_Pointer data; FTC_MruListClassRec clazz; FT_Memory memory; } struct FTC_NodeRec { FTC_MruNodeRec mru; FTC_Node link; FT_UInt32 hash; FT_UShort cache_index; FT_Short ref_count; } struct FTC_CacheClassRec { FTC_Node_NewFunc node_new; FTC_Node_WeightFunc node_weight; FTC_Node_CompareFunc node_compare; FTC_Node_CompareFunc node_remove_faceid; FTC_Node_FreeFunc node_free; FT_UInt cache_size; FTC_Cache_InitFunc cache_init; FTC_Cache_DoneFunc cache_done; } struct FTC_CacheRec { FT_UFast p; FT_UFast mask; FT_Long slack; FTC_Node* buckets; FTC_CacheClassRec clazz; FTC_Manager manager; FT_Memory memory; FT_UInt index; FTC_CacheClass org_class; } struct FTC_ManagerRec { FT_Library library; FT_Memory memory; FTC_Node nodes_list; FT_ULong max_weight; FT_ULong cur_weight; FT_UInt num_nodes; FTC_Cache[16] caches; FT_UInt num_caches; FTC_MruListRec faces; FTC_MruListRec sizes; FT_Pointer request_data; FTC_Face_Requester request_face; } struct FTC_FamilyRec { FTC_MruNodeRec mrunode; FT_UInt num_nodes; FTC_Cache cache; FTC_MruListClass clazz; } struct FTC_GNodeRec { FTC_NodeRec node; FTC_Family family; FT_UInt gindex; } struct FTC_GQueryRec { FT_UInt gindex; FTC_Family family; } struct FTC_GCacheRec { FTC_CacheRec cache; FTC_MruListRec families; } struct FTC_GCacheClassRec { FTC_CacheClassRec clazz; FTC_MruListClass family_class; } struct FTC_INodeRec { FTC_GNodeRec gnode; FT_Glyph glyph; } struct FTC_IFamilyClassRec { FTC_MruListClassRec clazz; FTC_IFamily_LoadGlyphFunc family_load_glyph; } struct FTC_SNodeRec { FTC_GNodeRec gnode; FT_UInt count; FTC_SBitRec[16] sbits; } struct FTC_SFamilyClassRec { FTC_MruListClassRec clazz; FTC_SFamily_GetCountFunc family_get_count; FTC_SFamily_LoadGlyphFunc family_load_glyph; } struct FT_SubGlyphRec { FT_Int index; FT_UShort flags; FT_Int arg1; FT_Int arg2; FT_Matrix transform; } struct FT_GlyphLoadRec { FT_Outline outline; FT_Vector* extra_points; FT_UInt num_subglyphs; FT_SubGlyph subglyphs; } struct FT_GlyphLoaderRec { FT_Memory memory; FT_UInt max_points; FT_UInt max_contours; FT_UInt max_subglyphs; FT_Bool use_extra; FT_GlyphLoadRec base; FT_GlyphLoadRec current; void* other; } struct FT_Driver_ClassRec { FT_Module_Class root; FT_Long face_object_size; FT_Long size_object_size; FT_Long slot_object_size; FT_Face_InitFunc init_face; FT_Face_DoneFunc done_face; FT_Size_InitFunc init_size; FT_Size_DoneFunc done_size; FT_Slot_InitFunc init_slot; FT_Slot_DoneFunc done_slot; FT_Size_ResetPointsFunc set_char_sizes; FT_Size_ResetPixelsFunc set_pixel_sizes; FT_Slot_LoadFunc load_glyph; FT_Face_GetKerningFunc get_kerning; FT_Face_AttachFunc attach_file; FT_Face_GetAdvancesFunc get_advances; } struct FT_AutoHinter_ServiceRec { FT_AutoHinter_GlobalResetFunc reset_face; FT_AutoHinter_GlobalGetFunc get_global_hints; FT_AutoHinter_GlobalDoneFunc done_global_hints; FT_AutoHinter_GlyphLoadFunc load_glyph; } /* #pragma warning( disable : 4127 ) */ struct FT_ServiceDescRec { char* serv_id; void* serv_data; } struct FT_ServiceCacheRec { FT_Pointer service_POSTSCRIPT_FONT_NAME; FT_Pointer service_MULTI_MASTERS; FT_Pointer service_GLYPH_DICT; FT_Pointer service_PFR_METRICS; FT_Pointer service_WINFNT; } struct FT_CMapRec { FT_CharMapRec charmap; FT_CMap_Class clazz; } struct FT_CMap_ClassRec { FT_ULong size; FT_CMap_InitFunc init; FT_CMap_DoneFunc done; FT_CMap_CharIndexFunc char_index; FT_CMap_CharNextFunc char_next; } struct FT_Face_InternalRec { FT_UShort max_points; FT_Short max_contours; FT_Matrix transform_matrix; FT_Vector transform_delta; FT_Int transform_flags; FT_ServiceCacheRec services; } struct FT_Slot_InternalRec { FT_GlyphLoader loader; FT_UInt flags; FT_Bool glyph_transformed; FT_Matrix glyph_matrix; FT_Vector glyph_delta; void* glyph_hints; } struct FT_ModuleRec { FT_Module_Class* clazz; FT_Library library; FT_Memory memory; FT_Generic generic; } struct FT_RendererRec { FT_ModuleRec root; FT_Renderer_Class* clazz; FT_Glyph_Format glyph_format; FT_Glyph_Class glyph_class; FT_Raster raster; FT_Raster_RenderFunc raster_render; FT_Renderer_RenderFunc render; } struct FT_DriverRec { FT_ModuleRec root; FT_Driver_Class clazz; FT_ListRec faces_list; void* extensions; FT_GlyphLoader glyph_loader; } struct FT_LibraryRec { FT_Memory memory; FT_Generic generic; FT_Int version_major; FT_Int version_minor; FT_Int version_patch; FT_UInt num_modules; FT_Module[32] modules; FT_ListRec renderers; FT_Renderer cur_renderer; FT_Module auto_hinter; FT_Byte* raster_pool; FT_ULong raster_pool_size; FT_DebugHook_Func[4] debug_hooks; } struct FT_Frame_Field { FT_Byte value; FT_Byte size; FT_UShort offset; } struct TTC_HeaderRec { FT_ULong tag; FT_Fixed _version; FT_Long count; FT_ULong* offsets; } struct SFNT_HeaderRec { FT_ULong format_tag; FT_UShort num_tables; FT_UShort search_range; FT_UShort entry_selector; FT_UShort range_shift; FT_ULong offset; } struct TT_TableRec { FT_ULong Tag; FT_ULong CheckSum; FT_ULong Offset; FT_ULong Length; } struct TT_LongMetricsRec { FT_UShort advance; FT_Short bearing; } struct TT_NameEntryRec { FT_UShort platformID; FT_UShort encodingID; FT_UShort languageID; FT_UShort nameID; FT_UShort stringLength; FT_ULong stringOffset; FT_Byte* string; } struct TT_NameTableRec { FT_UShort format; FT_UInt numNameRecords; FT_UInt storageOffset; TT_NameEntryRec* names; FT_Stream stream; } struct TT_GaspRangeRec { FT_UShort maxPPEM; FT_UShort gaspFlag; } struct TT_GaspRec { FT_UShort _version; FT_UShort numRanges; TT_GaspRange gaspRanges; } struct TT_HdmxEntryRec { FT_Byte ppem; FT_Byte max_width; FT_Byte* widths; } struct TT_HdmxRec { FT_UShort _version; FT_Short num_records; TT_HdmxEntry records; } struct TT_Kern0_PairRec { FT_UShort left; FT_UShort right; FT_FWord value; } struct TT_SBit_MetricsRec { FT_Byte height; FT_Byte width; FT_Char horiBearingX; FT_Char horiBearingY; FT_Byte horiAdvance; FT_Char vertBearingX; FT_Char vertBearingY; FT_Byte vertAdvance; } struct TT_SBit_SmallMetricsRec { FT_Byte height; FT_Byte width; FT_Char bearingX; FT_Char bearingY; FT_Byte advance; } struct TT_SBit_LineMetricsRec { FT_Char ascender; FT_Char descender; FT_Byte max_width; FT_Char caret_slope_numerator; FT_Char caret_slope_denominator; FT_Char caret_offset; FT_Char min_origin_SB; FT_Char min_advance_SB; FT_Char max_before_BL; FT_Char min_after_BL; FT_Char[2] pads; } struct TT_SBit_RangeRec { FT_UShort first_glyph; FT_UShort last_glyph; FT_UShort index_format; FT_UShort image_format; FT_ULong image_offset; FT_ULong image_size; TT_SBit_MetricsRec metrics; FT_ULong num_glyphs; FT_ULong* glyph_offsets; FT_UShort* glyph_codes; FT_ULong table_offset; } struct TT_SBit_StrikeRec { FT_Int num_ranges; TT_SBit_Range sbit_ranges; FT_ULong ranges_offset; FT_ULong color_ref; TT_SBit_LineMetricsRec hori; TT_SBit_LineMetricsRec vert; FT_UShort start_glyph; FT_UShort end_glyph; FT_Byte x_ppem; FT_Byte y_ppem; FT_Byte bit_depth; FT_Char flags; } struct TT_SBit_ComponentRec { FT_UShort glyph_code; FT_Char x_offset; FT_Char y_offset; } struct TT_SBit_ScaleRec { TT_SBit_LineMetricsRec hori; TT_SBit_LineMetricsRec vert; FT_Byte x_ppem; FT_Byte y_ppem; FT_Byte x_ppem_substitute; FT_Byte y_ppem_substitute; } struct TT_Post_20Rec { FT_UShort num_glyphs; FT_UShort num_names; FT_UShort* glyph_indices; FT_Char** glyph_names; } struct TT_Post_25Rec { FT_UShort num_glyphs; FT_Char* offsets; } struct TT_Post_NamesRec { FT_Bool loaded; union names { TT_Post_20Rec format_20; TT_Post_25Rec format_25; } } struct TT_FaceRec { FT_FaceRec root; TTC_HeaderRec ttc_header; FT_ULong format_tag; FT_UShort num_tables; TT_Table dir_tables; TT_Header header; TT_HoriHeader horizontal; TT_MaxProfile max_profile; FT_ULong max_components; FT_Bool vertical_info; TT_VertHeader vertical; FT_UShort num_names; TT_NameTableRec name_table; TT_OS2 os2; TT_Postscript postscript; FT_Byte* cmap_table; FT_ULong cmap_size; TT_Loader_GotoTableFunc goto_table; TT_Loader_StartGlyphFunc access_glyph_frame; TT_Loader_EndGlyphFunc forget_glyph_frame; TT_Loader_ReadGlyphFunc read_glyph_header; TT_Loader_ReadGlyphFunc read_simple_glyph; TT_Loader_ReadGlyphFunc read_composite_glyph; void* sfnt; void* psnames; TT_HdmxRec hdmx; TT_GaspRec gasp; TT_PCLT pclt; FT_ULong num_sbit_strikes; TT_SBit_Strike sbit_strikes; FT_ULong num_sbit_scales; TT_SBit_Scale sbit_scales; TT_Post_NamesRec postscript_names; FT_UShort num_locations; FT_Long* glyph_locations; FT_ULong glyf_len; FT_ULong font_program_size; FT_Byte* font_program; FT_ULong cvt_program_size; FT_Byte* cvt_program; FT_ULong cvt_size; FT_Short* cvt; FT_Int num_kern_pairs; FT_Int kern_table_index; TT_Kern0_Pair kern_pairs; TT_Interpreter interpreter; FT_Bool unpatented_hinting; FT_Bool doblend; GX_Blend blend; FT_Generic extra; char* postscript_name; } struct TT_GlyphZoneRec { FT_Memory memory; FT_UShort max_points; FT_UShort max_contours; FT_UShort n_points; FT_Short n_contours; FT_Vector* org; FT_Vector* cur; FT_Byte* tags; FT_UShort* contours; } struct TT_LoaderRec { FT_Face face; FT_Size size; FT_GlyphSlot glyph; FT_GlyphLoader gloader; FT_ULong load_flags; FT_UInt glyph_index; FT_Stream stream; FT_Int byte_len; FT_Short n_contours; FT_BBox bbox; FT_Int left_bearing; FT_Int advance; FT_Int top_bearing; FT_Int vadvance; FT_Int linear; FT_Bool linear_def; FT_Bool preserve_pps; FT_Vector pp1; FT_Vector pp2; FT_Vector pp3; FT_Vector pp4; FT_ULong glyf_offset; TT_GlyphZoneRec base; TT_GlyphZoneRec zone; TT_ExecContext exec; FT_Byte* instructions; FT_ULong ins_pos; void* other; } struct SFNT_Interface { TT_Loader_GotoTableFunc goto_table; TT_Init_Face_Func init_face; TT_Load_Face_Func load_face; TT_Done_Face_Func done_face; FT_Module_Requester get_interface; TT_Load_Any_Func load_any; TT_Load_SFNT_HeaderRec_Func load_sfnt_header; TT_Load_Directory_Func load_directory; TT_Load_Table_Func load_header; TT_Load_Metrics_Func load_metrics; TT_Load_Table_Func load_charmaps; TT_Load_Table_Func load_max_profile; TT_Load_Table_Func load_os2; TT_Load_Table_Func load_psnames; TT_Load_Table_Func load_names; TT_Free_Table_Func free_names; TT_Load_Table_Func load_hdmx; TT_Free_Table_Func free_hdmx; TT_Load_Table_Func load_kerning; TT_Load_Table_Func load_gasp; TT_Load_Table_Func load_pclt; TT_Load_Table_Func load_bitmap_header; TT_Set_SBit_Strike_Func set_sbit_strike; TT_Load_Table_Func load_sbits; TT_Find_SBit_Image_Func find_sbit_image; TT_Load_SBit_Metrics_Func load_sbit_metrics; TT_Load_SBit_Image_Func load_sbit_image; TT_Free_Table_Func free_sbits; TT_Face_GetKerningFunc get_kerning; TT_Get_PS_Name_Func get_psname; TT_Free_Table_Func free_psnames; } struct FT_ValidatorRec { FT_Byte* base; FT_Byte* limit; FT_ValidationLevel level; FT_Error error; int[_JBLEN] jump_buffer; } struct PSH_Globals_FuncsRec { PSH_Globals_NewFunc create; PSH_Globals_SetScaleFunc set_scale; PSH_Globals_DestroyFunc destroy; } struct T1_Hints_FuncsRec { T1_Hints hints; T1_Hints_OpenFunc open; T1_Hints_CloseFunc close; T1_Hints_SetStemFunc stem; T1_Hints_SetStem3Func stem3; T1_Hints_ResetFunc reset; T1_Hints_ApplyFunc apply; } struct T2_Hints_FuncsRec { T2_Hints hints; T2_Hints_OpenFunc open; T2_Hints_CloseFunc close; T2_Hints_StemsFunc stems; T2_Hints_MaskFunc hintmask; T2_Hints_CounterFunc counter; T2_Hints_ApplyFunc apply; } struct PSHinter_Interface { PSH_Globals_Funcs function( FT_Module mod ) get_globals_funcs; T1_Hints_Funcs function( FT_Module mod ) get_t1_funcs; T2_Hints_Funcs function( FT_Module mod ) get_t2_funcs; } struct PS_UniMap { FT_UInt unicode; FT_UInt glyph_index; } struct PS_Unicodes { FT_UInt num_maps; PS_UniMap* maps; } struct FT_Service_PsCMapsRec { PS_Unicode_ValueFunc unicode_value; PS_Unicodes_InitFunc unicodes_init; PS_Unicodes_CharIndexFunc unicodes_char_index; PS_Unicodes_CharNextFunc unicodes_char_next; PS_Macintosh_Name_Func macintosh_name; PS_Adobe_Std_Strings_Func adobe_std_strings; ushort* adobe_std_encoding; ushort* adobe_expert_encoding; } struct T1_EncodingRec { FT_Int num_chars; FT_Int code_first; FT_Int code_last; FT_UShort* char_index; FT_String** char_name; } struct T1_FontRec { PS_FontInfoRec font_info; PS_PrivateRec private_dict; FT_String* font_name; T1_EncodingType encoding_type; T1_EncodingRec encoding; FT_Byte* subrs_block; FT_Byte* charstrings_block; FT_Byte* glyph_names_block; FT_Int num_subrs; FT_Byte** subrs; FT_PtrDist* subrs_len; FT_Int num_glyphs; FT_String** glyph_names; FT_Byte** charstrings; FT_PtrDist* charstrings_len; FT_Byte paint_type; FT_Byte font_type; FT_Matrix font_matrix; FT_Vector font_offset; FT_BBox font_bbox; FT_Long font_id; FT_Fixed stroke_width; } struct CID_SubrsRec { FT_UInt num_subrs; FT_Byte** code; } struct T1_FaceRec { FT_FaceRec root; T1_FontRec type1; void* psnames; void* psaux; void* afm_data; FT_CharMapRec[2] charmaprecs; FT_CharMap[2] charmaps; PS_Unicodes unicode_map; PS_Blend blend; void* pshinter; } struct CID_FaceRec { FT_FaceRec root; void* psnames; void* psaux; CID_FaceInfoRec cid; void* afm_data; FT_Byte* binary_data; FT_Stream cid_stream; CID_Subrs subrs; void* pshinter; } struct PS_Table_FuncsRec { FT_Error function( PS_Table table, FT_Int count, FT_Memory memory ) init; void function( PS_Table table ) done; FT_Error function( PS_Table table, FT_Int idx, void* object, FT_PtrDist length ) add; void function( PS_Table table ) release; } struct PS_TableRec { FT_Byte* block; FT_Offset cursor; FT_Offset capacity; FT_Long init; FT_Int max_elems; FT_Int num_elems; FT_Byte** elements; FT_PtrDist* lengths; FT_Memory memory; PS_Table_FuncsRec funcs; } struct T1_TokenRec { FT_Byte* start; FT_Byte* limit; T1_TokenType type; } struct T1_FieldRec { char* ident; T1_FieldLocation location; T1_FieldType type; T1_Field_ParseFunc reader; FT_UInt offset; FT_Byte size; FT_UInt array_max; FT_UInt count_offset; } struct PS_Parser_FuncsRec { void function( PS_Parser parser, FT_Byte* base, FT_Byte* limit, FT_Memory memory ) init; void function( PS_Parser parser ) done; void function( PS_Parser parser ) skip_spaces; void function( PS_Parser parser ) skip_PS_token; FT_Long function( PS_Parser parser ) to_int; FT_Fixed function( PS_Parser parser, FT_Int power_ten ) to_fixed; FT_Error function( PS_Parser parser, FT_Byte* bytes, FT_Long max_bytes, FT_Long* pnum_bytes, FT_Bool delimiters ) to_bytes; FT_Int function( PS_Parser parser, FT_Int max_coords, FT_Short* coords ) to_coord_array; FT_Int function( PS_Parser parser, FT_Int max_values, FT_Fixed* values, FT_Int power_ten ) to_fixed_array; void function( PS_Parser parser, T1_Token token ) to_token; void function( PS_Parser parser, T1_Token tokens, FT_UInt max_tokens, FT_Int* pnum_tokens ) to_token_array; FT_Error function( PS_Parser parser, T1_Field field, void** objects, FT_UInt max_objects, FT_ULong* pflags ) load_field; FT_Error function( PS_Parser parser, T1_Field field, void** objects, FT_UInt max_objects, FT_ULong* pflags ) load_field_table; } struct PS_ParserRec { FT_Byte* cursor; FT_Byte* base; FT_Byte* limit; FT_Error error; FT_Memory memory; PS_Parser_FuncsRec funcs; } struct T1_Builder_FuncsRec { void function( T1_Builder builder, FT_Face face, FT_Size size, FT_GlyphSlot slot, FT_Bool hinting ) init; void function( T1_Builder builder ) done; T1_Builder_Check_Points_Func check_points; T1_Builder_Add_Point_Func add_point; T1_Builder_Add_Point1_Func add_point1; T1_Builder_Add_Contour_Func add_contour; T1_Builder_Start_Point_Func start_point; T1_Builder_Close_Contour_Func close_contour; } struct T1_BuilderRec { FT_Memory memory; FT_Face face; FT_GlyphSlot glyph; FT_GlyphLoader loader; FT_Outline* base; FT_Outline* current; FT_Vector last; FT_Fixed scale_x; FT_Fixed scale_y; FT_Pos pos_x; FT_Pos pos_y; FT_Vector left_bearing; FT_Vector advance; FT_BBox bbox; T1_ParseState parse_state; FT_Bool load_points; FT_Bool no_recurse; FT_Bool shift; FT_Bool metrics_only; void* hints_funcs; void* hints_globals; T1_Builder_FuncsRec funcs; } struct T1_Decoder_ZoneRec { FT_Byte* cursor; FT_Byte* base; FT_Byte* limit; } struct T1_Decoder_FuncsRec { FT_Error function( T1_Decoder, FT_Face, FT_Size, FT_GlyphSlot, FT_Byte**, PS_Blend, FT_Bool, FT_Render_Mode, T1_Decoder_Callback ) init; void function( T1_Decoder decoder ) done; FT_Error function( T1_Decoder decoder, FT_Byte* base, FT_UInt len ) parse_charstrings; } struct T1_DecoderRec { T1_BuilderRec builder; FT_Long[256] stack; FT_Long* top; T1_Decoder_ZoneRec[16+1] zones; T1_Decoder_Zone zone; FT_Service_PsCMaps psnames; FT_UInt num_glyphs; FT_Byte** glyph_names; FT_Int lenIV; FT_UInt num_subrs; FT_Byte** subrs; FT_PtrDist* subrs_len; FT_Matrix font_matrix; FT_Vector font_offset; FT_Int flex_state; FT_Int num_flex_vectors; FT_Vector[7] flex_vectors; PS_Blend blend; FT_Render_Mode hint_mode; T1_Decoder_Callback parse_callback; T1_Decoder_FuncsRec funcs; } struct T1_CMap_ClassesRec { FT_CMap_Class standard; FT_CMap_Class expert; FT_CMap_Class custom; FT_CMap_Class unicode; } struct PSAux_ServiceRec { PS_Table_FuncsRec* ps_table_funcs; PS_Parser_FuncsRec* ps_parser_funcs; T1_Builder_FuncsRec* t1_builder_funcs; T1_Decoder_FuncsRec* t1_decoder_funcs; void function( FT_Byte* buffer, FT_Offset length, FT_UShort seed ) t1_decrypt; T1_CMap_Classes t1_cmap_classes; } +/ //END Structs //BEGIN Callbacks /******************************************************************** * Freetype Function Callback Types ********************************************************************/ // ftsystem.h (FT_FREETYPE_H, FT_TYPES_H, FT_SYSTEM_H) alias void* function( FT_Memory memory, int size ) FT_Alloc_Func; alias void function( FT_Memory memory, void* block ) FT_Free_Func; alias void* function( FT_Memory memory, int cur_size, int new_size, void* block ) FT_Realloc_Func; alias uint function( FT_Stream stream, uint offset, ubyte* buffer, uint count ) FT_Stream_IoFunc; alias void function( FT_Stream stream ) FT_Stream_CloseFunc; // ftimage.h (FT_FREETYPE_H, FT_TYPES_H, FT_IMAGE_H) alias int function( FT_Vector* to, void* user ) FT_Outline_MoveToFunc; alias int function( FT_Vector* to, void* user ) FT_Outline_LineToFunc; alias int function( FT_Vector* control, FT_Vector* to, void* user ) FT_Outline_ConicToFunc; alias int function( FT_Vector* control1, FT_Vector* control2, FT_Vector* to, void* user ) FT_Outline_CubicToFunc; alias void function( int y, int count, FT_Span* spans, void* user ) FT_SpanFunc; alias int function( int y, int x, void* user ) FT_Raster_BitTest_Func; alias void function( int y, int x, void* user ) FT_Raster_BitSet_Func; alias int function( void* memory, FT_Raster* raster ) FT_Raster_NewFunc; alias void function( FT_Raster raster ) FT_Raster_DoneFunc; alias void function( FT_Raster raster, ubyte* pool_base, uint pool_size ) FT_Raster_ResetFunc; alias int function( FT_Raster raster,uint mode, void* args ) FT_Raster_SetModeFunc; alias int function( FT_Raster raster, FT_Raster_Params* params ) FT_Raster_RenderFunc; // fttypes.h (FT_FREETYPE_H, FT_TYPES_H) alias void function(void* object) FT_Generic_Finalizer; // ftlist.h (FT_LIST_H) alias FT_Error function( FT_ListNode node, void* user ) FT_List_Iterator; alias void function( FT_Memory memory, void* data, void* user ) FT_List_Destructor; // ftmodapi.h (FT_MODULE_H, FT_RENDER_H) alias FT_Error function( FT_Module mod ) FT_Module_Constructor; alias void function( FT_Module mod ) FT_Module_Destructor; alias FT_Module_Interface function( FT_Module mod, char* name ) FT_Module_Requester; alias void function( void* arg ) FT_DebugHook_Func; // ftrender.h (FT_RENDER_H) alias FT_Error function( FT_Glyph glyph, FT_GlyphSlot slot ) FT_Glyph_InitFunc; alias void function( FT_Glyph glyph ) FT_Glyph_DoneFunc; alias void function( FT_Glyph glyph, FT_Matrix* matrix, FT_Vector* delta ) FT_Glyph_TransformFunc; alias void function( FT_Glyph glyph, FT_BBox* abbox ) FT_Glyph_GetBBoxFunc; alias FT_Error function( FT_Glyph source, FT_Glyph target ) FT_Glyph_CopyFunc; alias FT_Error function( FT_Glyph glyph, FT_GlyphSlot slot ) FT_Glyph_PrepareFunc; alias FT_Error function( FT_Renderer renderer, FT_GlyphSlot slot, FT_UInt mode, FT_Vector* origin ) FT_Renderer_RenderFunc; alias FT_Error function( FT_Renderer renderer, FT_GlyphSlot slot, FT_Matrix* matrix, FT_Vector* delta ) FT_Renderer_TransformFunc; alias void function( FT_Renderer renderer, FT_GlyphSlot slot, FT_BBox* cbox ) FT_Renderer_GetCBoxFunc; alias FT_Error function( FT_Renderer renderer, FT_ULong mode_tag, FT_Pointer mode_ptr ) FT_Renderer_SetModeFunc; // ftcache.h (FT_CACHE_H) alias FT_Error function( FTC_FaceID face_id, FT_Library library, FT_Pointer request_data, FT_Face* aface ) FTC_Face_Requester; // ftincrem.h (FT_INCREMENTAL_H) alias FT_Error function( FT_Incremental incremental, FT_UInt glyph_index, FT_Data* adata ) FT_Incremental_GetGlyphDataFunc; alias void function( FT_Incremental incremental, FT_Data* data ) FT_Incremental_FreeGlyphDataFunc; alias FT_Error function( FT_Incremental incremental, FT_UInt glyph_index, FT_Bool vertical, FT_Incremental_MetricsRec *ametrics ) FT_Incremental_GetGlyphMetricsFunc; /+ other alias FT_Bool function( FTC_MruNode node, FT_Pointer key ) FTC_MruNode_CompareFunc; alias FT_Error function( FTC_MruNode node, FT_Pointer key, FT_Pointer data ) FTC_MruNode_InitFunc; alias FT_Error function( FTC_MruNode node, FT_Pointer key, FT_Pointer data ) FTC_MruNode_ResetFunc; alias void function( FTC_MruNode node, FT_Pointer data ) FTC_MruNode_DoneFunc; alias FT_Error function( FTC_Node *pnode, FT_Pointer query, FTC_Cache cache ) FTC_Node_NewFunc; alias FT_ULong function( FTC_Node node, FTC_Cache cache ) FTC_Node_WeightFunc; alias FT_Bool function( FTC_Node node, FT_Pointer key, FTC_Cache cache ) FTC_Node_CompareFunc; alias void function( FTC_Node node, FTC_Cache cache ) FTC_Node_FreeFunc; alias FT_Error function( FTC_Cache cache ) FTC_Cache_InitFunc; alias void function( FTC_Cache cache ) FTC_Cache_DoneFunc; alias FT_Error function( FTC_Family family, FT_UInt gindex, FTC_Cache cache, FT_Glyph *aglyph ) FTC_IFamily_LoadGlyphFunc; alias FT_UInt function( FTC_Family family, FTC_Manager manager ) FTC_SFamily_GetCountFunc; alias FT_Error function( FTC_Family family, FT_UInt gindex, FTC_Manager manager, FT_Face *aface ) FTC_SFamily_LoadGlyphFunc; alias FT_Error function( FT_Stream stream, FT_Face face, FT_Int typeface_index, FT_Int num_params, FT_Parameter* parameters ) FT_Face_InitFunc; alias void function( FT_Face face ) FT_Face_DoneFunc; alias FT_Error function( FT_Size size ) FT_Size_InitFunc; alias void function( FT_Size size ) FT_Size_DoneFunc; alias FT_Error function( FT_GlyphSlot slot )FT_Slot_InitFunc; alias void function( FT_GlyphSlot slot ) FT_Slot_DoneFunc; alias FT_Error function( FT_Size size, FT_F26Dot6 char_width, FT_F26Dot6 char_height, FT_UInt horz_resolution, FT_UInt vert_resolution ) FT_Size_ResetPointsFunc; alias FT_Error function( FT_Size size, FT_UInt pixel_width, FT_UInt pixel_height ) FT_Size_ResetPixelsFunc; alias FT_Error function( FT_GlyphSlot slot, FT_Size size, FT_UInt glyph_index, FT_Int32 load_flags ) FT_Slot_LoadFunc; alias FT_UInt function( FT_CharMap charmap, FT_Long charcode ) FT_CharMap_CharIndexFunc; alias FT_Long function( FT_CharMap charmap, FT_Long charcode ) FT_CharMap_CharNextFunc; alias FT_Error function( FT_Face face, FT_UInt left_glyph, FT_UInt right_glyph, FT_Vector* kerning ) FT_Face_GetKerningFunc; alias FT_Error function( FT_Face face, FT_Stream stream ) FT_Face_AttachFunc; alias FT_Error function( FT_Face face, FT_UInt first, FT_UInt count, FT_Bool vertical, FT_UShort* advances ) FT_Face_GetAdvancesFunc; alias void function( FT_AutoHinter hinter, FT_Face face, void** global_hints, int* global_len ) FT_AutoHinter_GlobalGetFunc; alias void function( FT_AutoHinter hinter, void* global ) FT_AutoHinter_GlobalDoneFunc; alias void function( FT_AutoHinter hinter, FT_Face face ) FT_AutoHinter_GlobalResetFunc; alias FT_Error function( FT_AutoHinter hinter, FT_GlyphSlot slot, FT_Size size, FT_UInt glyph_index, FT_Int32 load_flags ) FT_AutoHinter_GlyphLoadFunc; alias FT_Error function( FT_CMap cmap, FT_Pointer init_data ) FT_CMap_InitFunc; alias void function( FT_CMap cmap ) FT_CMap_DoneFunc; alias FT_UInt function( FT_CMap cmap, FT_UInt32 char_code ) FT_CMap_CharIndexFunc; alias FT_UInt function( FT_CMap cmap, FT_UInt32 *achar_code ) FT_CMap_CharNextFunc; alias char* function( FT_Face face ) FT_Face_GetPostscriptNameFunc; alias FT_Error function( FT_Face face, FT_UInt glyph_index, FT_Pointer buffer, FT_UInt buffer_max ) FT_Face_GetGlyphNameFunc; alias FT_UInt function( FT_Face face, FT_String* glyph_name ) FT_Face_GetGlyphNameIndexFunc; alias FT_Error function( void* exec_context ) TT_Interpreter; alias FT_Error function( TT_Face face, FT_ULong tag, FT_Stream stream, FT_ULong* length ) TT_Loader_GotoTableFunc; alias FT_Error function( TT_Loader loader, FT_UInt glyph_index, FT_ULong offset, FT_UInt byte_count ) TT_Loader_StartGlyphFunc; alias FT_Error function( TT_Loader loader ) TT_Loader_ReadGlyphFunc; alias void function( TT_Loader loader ) TT_Loader_EndGlyphFunc; alias FT_Error function( FT_Stream stream, TT_Face face, FT_Int face_index, FT_Int num_params, FT_Parameter* params ) TT_Init_Face_Func; alias FT_Error function( FT_Stream stream, TT_Face face, FT_Int face_index, FT_Int num_params, FT_Parameter* params ) TT_Load_Face_Func; alias void function( TT_Face face ) TT_Done_Face_Func; alias FT_Error function( TT_Face face, FT_Stream stream, FT_Long face_index, SFNT_Header sfnt ) TT_Load_SFNT_HeaderRec_Func; alias FT_Error function( TT_Face face, FT_Stream stream, SFNT_Header sfnt ) TT_Load_Directory_Func; alias FT_Error function( TT_Face face, FT_ULong tag, FT_Long offset, FT_Byte *buffer, FT_ULong* length ) TT_Load_Any_Func; alias FT_Error function( TT_Face face, FT_UInt glyph_index, FT_ULong strike_index, TT_SBit_Range *arange, TT_SBit_Strike *astrike, FT_ULong *aglyph_offset ) TT_Find_SBit_Image_Func; alias FT_Error function( FT_Stream stream, TT_SBit_Range range, TT_SBit_Metrics metrics ) TT_Load_SBit_Metrics_Func; alias FT_Error function( TT_Face face, FT_ULong strike_index, FT_UInt glyph_index, FT_UInt load_flags, FT_Stream stream, FT_Bitmap *amap, TT_SBit_MetricsRec *ametrics ) TT_Load_SBit_Image_Func; alias FT_Error function( TT_Face face, FT_UInt x_ppem, FT_UInt y_ppem, FT_ULong *astrike_index ) TT_Set_SBit_Strike_Func; alias FT_Error function( TT_Face face, FT_UInt idx, FT_String** PSname ) TT_Get_PS_Name_Func; alias FT_Error function( TT_Face face, FT_Stream stream, FT_Bool vertical ) TT_Load_Metrics_Func; alias FT_Error function( TT_Face face, FT_Stream stream ) TT_Load_Table_Func; alias void function( TT_Face face ) TT_Free_Table_Func; alias FT_Int function( TT_Face face, FT_UInt left_glyph, FT_UInt right_glyph ) TT_Face_GetKerningFunc; alias FT_Error function( FT_Memory memory, T1_Private* private_dict, PSH_Globals* aglobals ) PSH_Globals_NewFunc; alias FT_Error function( PSH_Globals globals, FT_Fixed x_scale, FT_Fixed y_scale, FT_Fixed x_delta, FT_Fixed y_delta ) PSH_Globals_SetScaleFunc; alias void function( PSH_Globals globals ) PSH_Globals_DestroyFunc; alias void function( T1_Hints hints ) T1_Hints_OpenFunc; alias void function( T1_Hints hints, FT_UInt dimension, FT_Long* coords ) T1_Hints_SetStemFunc; alias void function( T1_Hints hints, FT_UInt dimension, FT_Long* coords ) T1_Hints_SetStem3Func; alias void function( T1_Hints hints, FT_UInt end_point ) T1_Hints_ResetFunc; alias FT_Error function( T1_Hints hints, FT_UInt end_point ) T1_Hints_CloseFunc; alias FT_Error function( T1_Hints hints, FT_Outline* outline, PSH_Globals globals, FT_Render_Mode hint_mode ) T1_Hints_ApplyFunc; alias void function( T2_Hints hints ) T2_Hints_OpenFunc; alias void function( T2_Hints hints, FT_UInt dimension, FT_UInt count, FT_Fixed* coordinates ) T2_Hints_StemsFunc; alias void function( T2_Hints hints, FT_UInt end_point, FT_UInt bit_count, FT_Byte* bytes ) T2_Hints_MaskFunc; alias void function( T2_Hints hints, FT_UInt bit_count, FT_Byte* bytes ) T2_Hints_CounterFunc; alias FT_Error function( T2_Hints hints, FT_UInt end_point ) T2_Hints_CloseFunc; alias FT_Error function( T2_Hints hints, FT_Outline* outline, PSH_Globals globals, FT_Render_Mode hint_mode ) T2_Hints_ApplyFunc; alias FT_UInt32 function( char* glyph_name ) PS_Unicode_ValueFunc; alias FT_UInt function( FT_UInt num_glyphs, char** glyph_names, FT_ULong unicode ) PS_Unicode_Index_Func; alias char* function( FT_UInt name_index ) PS_Macintosh_Name_Func; alias char* function( FT_UInt string_index ) PS_Adobe_Std_Strings_Func; alias FT_Error function( FT_Memory memory, FT_UInt num_glyphs, char** glyph_names, PS_Unicodes* unicodes ) PS_Unicodes_InitFunc; alias FT_UInt function( PS_Unicodes* unicodes, FT_UInt unicode ) PS_Unicodes_CharIndexFunc; alias FT_ULong function( PS_Unicodes* unicodes, FT_ULong unicode ) PS_Unicodes_CharNextFunc; alias void function( FT_Face face, FT_Pointer parser ) T1_Field_ParseFunc; alias FT_Error function( T1_Builder builder, FT_Int count ) T1_Builder_Check_Points_Func; alias void function( T1_Builder builder, FT_Pos x, FT_Pos y, FT_Byte flag ) T1_Builder_Add_Point_Func; alias FT_Error function( T1_Builder builder, FT_Pos x, FT_Pos y ) T1_Builder_Add_Point1_Func; alias FT_Error function( T1_Builder builder ) T1_Builder_Add_Contour_Func; alias FT_Error function( T1_Builder builder, FT_Pos x, FT_Pos y ) T1_Builder_Start_Point_Func; alias void function( T1_Builder builder ) T1_Builder_Close_Contour_Func; alias FT_Error function( T1_Decoder decoder, FT_UInt glyph_index ) T1_Decoder_Callback; +/ //END Callbacks //BEGIN Macros //============================================================================== // macros //============================================================================== // freetype.h (FT_FREETYPE_H) int FT_LOAD_TARGET_( int x ) { return ( ( x & 15 ) << 16 ); } int FT_LOAD_TARGET_MODE( int x ) { return ( ( x >> 16 ) & 15 ); } int FT_HAS_HORIZONTAL(FT_FaceRec* face) { return face.face_flags & FT_FACE_FLAG_HORIZONTAL; } int FT_HAS_VERTICAL(FT_FaceRec* face) { return face.face_flags & FT_FACE_FLAG_VERTICAL; } int FT_HAS_KERNING(FT_FaceRec* face) { return face.face_flags & FT_FACE_FLAG_KERNING; } int FT_IS_SCALABLE(FT_FaceRec* face) { return face.face_flags & FT_FACE_FLAG_SCALABLE; } int FT_IS_SFNT(FT_FaceRec* face) { return face.face_flags & FT_FACE_FLAG_SFNT; } int FT_IS_FIXED_WIDTH(FT_FaceRec* face) { return face.face_flags & FT_FACE_FLAG_FIXED_WIDTH; } int FT_HAS_FIXED_SIZES(FT_FaceRec* face) { return face.face_flags & FT_FACE_FLAG_FIXED_SIZES; } int FT_HAS_FAST_GLYPHS(FT_FaceRec* face) { return false; } int FT_HAS_GLYPH_NAMES(FT_FaceRec* face) { return face.face_flags & FT_FACE_FLAG_GLYPH_NAMES; } int FT_HAS_MULTIPLE_MASTERS(FT_FaceRec* face) { return face.face_flags & FT_FACE_FLAG_MULTIPLE_MASTERS; } // Other macros. Second version is D-specific, but works fine. template FT_MAKE_TAG(char x1, char x2, char x3, char x4) { const uint FT_MAKE_TAG = ((cast(uint)x1) << 24) + ((cast(uint)x2) << 16) + ((cast(uint)x3) << 8) + x4; } template FT_MAKE_TAG(char[4] x) { const uint FT_MAKE_TAG = ((cast(uint)x[0]) << 24) + ((cast(uint)x[1]) << 16) + ((cast(uint)x[2]) << 8) + x[3]; } /*********************************************************************** * Extra macros carried over from Freetype. Something needs to be done? ***********************************************************************/ /+ fterrdef.h (FT_ERROR_DEFINITIONS_H) // (list not updated to version 2.3.5) FT_NOERRORDEF_( Ok, 0x00, "no error" ) FT_ERRORDEF_( Cannot_Open_Resource, 0x01, "cannot open resource" ) FT_ERRORDEF_( Unknown_File_Format, 0x02, "unknown file format" ) FT_ERRORDEF_( Invalid_File_Format, 0x03, "broken file" ) FT_ERRORDEF_( Invalid_Version, 0x04, "invalid FreeType version" ) FT_ERRORDEF_( Lower_Module_Version, 0x05, "module version is too low" ) FT_ERRORDEF_( Invalid_Argument, 0x06, "invalid argument" ) FT_ERRORDEF_( Unimplemented_Feature, 0x07, "unimplemented feature" ) FT_ERRORDEF_( Invalid_Table, 0x08, "broken table" ) FT_ERRORDEF_( Invalid_Offset, 0x09, "broken offset within table" ) FT_ERRORDEF_( Invalid_Glyph_Index, 0x10, "invalid glyph index" ) FT_ERRORDEF_( Invalid_Character_Code, 0x11, "invalid character code" ) FT_ERRORDEF_( Invalid_Glyph_Format, 0x12, "unsupported glyph image format" ) FT_ERRORDEF_( Cannot_Render_Glyph, 0x13, "cannot render this glyph format" ) FT_ERRORDEF_( Invalid_Outline, 0x14, "invalid outline" ) FT_ERRORDEF_( Invalid_Composite, 0x15, "invalid composite glyph" ) FT_ERRORDEF_( Too_Many_Hints, 0x16, "too many hints" ) FT_ERRORDEF_( Invalid_Pixel_Size, 0x17, "invalid pixel size" ) FT_ERRORDEF_( Invalid_Handle, 0x20, "invalid object handle" ) FT_ERRORDEF_( Invalid_Library_Handle, 0x21, "invalid library handle" ) FT_ERRORDEF_( Invalid_Driver_Handle, 0x22, "invalid module handle" ) FT_ERRORDEF_( Invalid_Face_Handle, 0x23, "invalid face handle" ) FT_ERRORDEF_( Invalid_Size_Handle, 0x24, "invalid size handle" ) FT_ERRORDEF_( Invalid_Slot_Handle, 0x25, "invalid glyph slot handle" ) FT_ERRORDEF_( Invalid_CharMap_Handle, 0x26, "invalid charmap handle" ) FT_ERRORDEF_( Invalid_Cache_Handle, 0x27, "invalid cache manager handle" ) FT_ERRORDEF_( Invalid_Stream_Handle, 0x28, "invalid stream handle" ) FT_ERRORDEF_( Too_Many_Drivers, 0x30, "too many modules" ) FT_ERRORDEF_( Too_Many_Extensions, 0x31, "too many extensions" ) FT_ERRORDEF_( Out_Of_Memory, 0x40, "out of memory" ) FT_ERRORDEF_( Unlisted_Object, 0x41, "unlisted object" ) FT_ERRORDEF_( Cannot_Open_Stream, 0x51, "cannot open stream" ) FT_ERRORDEF_( Invalid_Stream_Seek, 0x52, "invalid stream seek" ) FT_ERRORDEF_( Invalid_Stream_Skip, 0x53, "invalid stream skip" ) FT_ERRORDEF_( Invalid_Stream_Read, 0x54, "invalid stream read" ) FT_ERRORDEF_( Invalid_Stream_Operation, 0x55, "invalid stream operation" ) FT_ERRORDEF_( Invalid_Frame_Operation, 0x56, "invalid frame operation" ) FT_ERRORDEF_( Nested_Frame_Access, 0x57, "nested frame access" ) FT_ERRORDEF_( Invalid_Frame_Read, 0x58, "invalid frame read" ) FT_ERRORDEF_( Raster_Uninitialized, 0x60, "raster uninitialized" ) FT_ERRORDEF_( Raster_Corrupted, 0x61, "raster corrupted" ) FT_ERRORDEF_( Raster_Overflow, 0x62, "raster overflow" ) FT_ERRORDEF_( Raster_Negative_Height, 0x63, "negative height while rastering" ) FT_ERRORDEF_( Too_Many_Caches, 0x70, "too many registered caches" ) FT_ERRORDEF_( Invalid_Opcode, 0x80, "invalid opcode" ) FT_ERRORDEF_( Too_Few_Arguments, 0x81, "too few arguments" ) FT_ERRORDEF_( Stack_Overflow, 0x82, "stack overflow" ) FT_ERRORDEF_( Code_Overflow, 0x83, "code overflow" ) FT_ERRORDEF_( Bad_Argument, 0x84, "bad argument" ) FT_ERRORDEF_( Divide_By_Zero, 0x85, "division by zero" ) FT_ERRORDEF_( Invalid_Reference, 0x86, "invalid reference" ) FT_ERRORDEF_( Debug_OpCode, 0x87, "found debug opcode" ) FT_ERRORDEF_( ENDF_In_Exec_Stream, 0x88, "found ENDF opcode in execution stream" ) FT_ERRORDEF_( Nested_DEFS, 0x89, "nested DEFS" ) FT_ERRORDEF_( Invalid_CodeRange, 0x8A, "invalid code range" ) FT_ERRORDEF_( Execution_Too_Long, 0x8B, "execution context too long" ) FT_ERRORDEF_( Too_Many_Function_Defs, 0x8C, "too many function definitions" ) FT_ERRORDEF_( Too_Many_Instruction_Defs, 0x8D, "too many instruction definitions" ) FT_ERRORDEF_( Table_Missing, 0x8E, "SFNT font table missing" ) FT_ERRORDEF_( Horiz_Header_Missing, 0x8F, "horizontal header (hhea) table missing" ) FT_ERRORDEF_( Locations_Missing, 0x90, "locations (loca) table missing" ) FT_ERRORDEF_( Name_Table_Missing, 0x91, "name table missing" ) FT_ERRORDEF_( CMap_Table_Missing, 0x92, "character map (cmap) table missing" ) FT_ERRORDEF_( Hmtx_Table_Missing, 0x93, "horizontal metrics (hmtx) table missing" ) FT_ERRORDEF_( Post_Table_Missing, 0x94, "PostScript (post) table missing" ) FT_ERRORDEF_( Invalid_Horiz_Metrics, 0x95, "invalid horizontal metrics" ) FT_ERRORDEF_( Invalid_CharMap_Format, 0x96, "invalid character map (cmap) format" ) FT_ERRORDEF_( Invalid_PPem, 0x97, "invalid ppem value" ) FT_ERRORDEF_( Invalid_Vert_Metrics, 0x98, "invalid vertical metrics" ) FT_ERRORDEF_( Could_Not_Find_Context, 0x99, "could not find context" ) FT_ERRORDEF_( Invalid_Post_Table_Format, 0x9A, "invalid PostScript (post) table format" ) FT_ERRORDEF_( Invalid_Post_Table, 0x9B, "invalid PostScript (post) table" ) FT_ERRORDEF_( Syntax_Error, 0xA0, "opcode syntax error" ) FT_ERRORDEF_( Stack_Underflow, 0xA1, "argument stack underflow" ) FT_ERRORDEF_( Ignore, 0xA2, "ignore" ) FT_ERRORDEF_( Missing_Startfont_Field, 0xB0, "`STARTFONT' field missing" ) FT_ERRORDEF_( Missing_Font_Field, 0xB1, "`FONT' field missing" ) FT_ERRORDEF_( Missing_Size_Field, 0xB2, "`SIZE' field missing" ) FT_ERRORDEF_( Missing_Chars_Field, 0xB3, "`CHARS' field missing" ) FT_ERRORDEF_( Missing_Startchar_Field, 0xB4, "`STARTCHAR' field missing" ) FT_ERRORDEF_( Missing_Encoding_Field, 0xB5, "`ENCODING' field missing" ) FT_ERRORDEF_( Missing_Bbx_Field, 0xB6, "`BBX' field missing" ) +/ //END Macros
D
/Users/kirstenrichard/Desktop/substrate-moloch-dao/target/release/deps/nodrop-8f2a0460c08e3b9f.rmeta: /Users/kirstenrichard/.cargo/registry/src/github.com-1ecc6299db9ec823/nodrop-0.1.14/src/lib.rs /Users/kirstenrichard/Desktop/substrate-moloch-dao/target/release/deps/libnodrop-8f2a0460c08e3b9f.rlib: /Users/kirstenrichard/.cargo/registry/src/github.com-1ecc6299db9ec823/nodrop-0.1.14/src/lib.rs /Users/kirstenrichard/Desktop/substrate-moloch-dao/target/release/deps/nodrop-8f2a0460c08e3b9f.d: /Users/kirstenrichard/.cargo/registry/src/github.com-1ecc6299db9ec823/nodrop-0.1.14/src/lib.rs /Users/kirstenrichard/.cargo/registry/src/github.com-1ecc6299db9ec823/nodrop-0.1.14/src/lib.rs:
D
/Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/build/ScriptKitCommandline.build/Debug/scriptkit.build/Objects-normal/x86_64/PersonScriptable.o : /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/JSON.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/AST.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/Language.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/PersonScriptable.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/Config.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/Terminal.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/LanguageFormatterProtocol.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/main.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/Location.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/SwiftLanguageFormatter.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/JavascriptLanguageFormatter.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/MustacheFormatter.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/String+Utils.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/Target.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/MustacheSwift.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/MustacheJavascript.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/templateJavascript.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/Input.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/Swift.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 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include/mach-o/dyld.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/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/build/ScriptKitCommandline.build/Debug/scriptkit.build/Objects-normal/x86_64/PersonScriptable~partial.swiftmodule : /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/JSON.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/AST.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/Language.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/PersonScriptable.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/Config.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/Terminal.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/LanguageFormatterProtocol.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/main.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/Location.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/SwiftLanguageFormatter.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/JavascriptLanguageFormatter.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/MustacheFormatter.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/String+Utils.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/Target.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/MustacheSwift.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/MustacheJavascript.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/templateJavascript.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/Input.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/Swift.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 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include/mach-o/dyld.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/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/build/ScriptKitCommandline.build/Debug/scriptkit.build/Objects-normal/x86_64/PersonScriptable~partial.swiftdoc : /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/JSON.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/AST.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/Language.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/PersonScriptable.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/Config.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/Terminal.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/LanguageFormatterProtocol.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/main.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/Location.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/SwiftLanguageFormatter.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/JavascriptLanguageFormatter.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/MustacheFormatter.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/String+Utils.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/Target.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/MustacheSwift.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/MustacheJavascript.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/templateJavascript.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/Input.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/Swift.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 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include/mach-o/dyld.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/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/build/ScriptKitCommandline.build/Debug/scriptkit.build/Objects-normal/x86_64/PersonScriptable~partial.swiftsourceinfo : /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/JSON.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/AST.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/Language.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/PersonScriptable.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/Config.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/Terminal.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/LanguageFormatterProtocol.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/main.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/Location.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/SwiftLanguageFormatter.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/JavascriptLanguageFormatter.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/MustacheFormatter.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/String+Utils.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/Target.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/MustacheSwift.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/MustacheJavascript.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/templateJavascript.swift /Users/adameisfeld/Desktop/ScriptKit/ScriptKitCommandline/ScriptKitCommandline/Input.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/Swift.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 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include/mach-o/dyld.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
followers of an exclusive system of religious beliefs and practices an interest followed with exaggerated zeal followers of an unorthodox, extremist, or false religion or sect who often live outside of conventional society under the direction of a charismatic leader a religion or sect that is generally considered to be unorthodox, extremist, or false a system of religious beliefs and rituals
D
module blockie.generate.diamondsquare; import blockie.generate.all; import core.bitop : popcnt; /** * Size needs to be (2^^n)-1 eg. 129 or 513 * * * */ final class DiamondSquare { private: uint size; uint featureSize; float scale; float[] heights; Mt19937 gen; public: this(uint size, float scale=1, uint featureSize=0) { if(popcnt(size-1)!=1) throw new Error("Invalid size"); this.size = size; this.scale = scale; this.featureSize = featureSize==0 ? size-1 : featureSize; this.heights.length = size*size; heights[] = 0; gen.seed(0); } float[] generate() { setSeedValues(); int samplesize = featureSize; float subscale = scale; while(samplesize > 1) { diamondSquare(samplesize, scale); samplesize /= 2; subscale /= 2; } return heights; } override string toString() { auto buf = appender!(string); for(auto y=0; y<size; y++) { for(auto x=0; x<size; x++) { float f = heights[x+y*size]; buf.put("%s ".format(f)); } buf.put("\n"); } return buf.data; } private: void set(int x, int y, float f) { if(x<0) x+=size; if(y<0) y+=size; if(x>=size) x -= size; if(y>=size) y -= size; heights[x+y*size] = f; } float get(int x, int y) { if(x<0) x+=size; if(y<0) y+=size; if(x>=size) x -= size; if(y>=size) y -= size; return heights[x+y*size]; } void setSeedValues() { for(int y = 0; y < size; y += featureSize) for (int x = 0; x < size; x += featureSize) { set(x, y, uniform(-1f, 1f,gen)*scale); } } void square(int x, int y, int subsize, float value) { int hs = subsize / 2; // a b // // x // // c d float a = get(x - hs, y - hs); float b = get(x + hs, y - hs); float c = get(x - hs, y + hs); float d = get(x + hs, y + hs); set(x, y, ((a + b + c + d) / 4) + value); } void diamond(int x, int y, int subsize, float value) { int hs = subsize / 2; // c // //a x b // // d float a = get(x - hs, y); float b = get(x + hs, y); float c = get(x, y - hs); float d = get(x, y + hs); set(x, y, ((a + b + c + d) / 4.0) + value); } void diamondSquare(int stepsize, float subscale) { int halfstep = stepsize / 2; for(int y = halfstep; y < size+halfstep; y += stepsize) { for(int x = halfstep; x < size+halfstep; x += stepsize) { square(x, y, stepsize, uniform(-1f,1f,gen) * subscale); } } for(int y = 0; y < size; y += stepsize) { for(int x = 0; x < size; x += stepsize) { diamond(x + halfstep, y, stepsize, uniform(-1f,1f,gen) * subscale); diamond(x, y + halfstep, stepsize, uniform(-1f,1f,gen) * subscale); } } } }
D
/Users/smailov/NFT/newtry/create-near-app/smailov/contract/target/release/build/wee_alloc-bfbb50b9833bcb0b/build_script_build-bfbb50b9833bcb0b: /Users/smailov/.cargo/registry/src/github.com-1ecc6299db9ec823/wee_alloc-0.4.5/build.rs /Users/smailov/NFT/newtry/create-near-app/smailov/contract/target/release/build/wee_alloc-bfbb50b9833bcb0b/build_script_build-bfbb50b9833bcb0b.d: /Users/smailov/.cargo/registry/src/github.com-1ecc6299db9ec823/wee_alloc-0.4.5/build.rs /Users/smailov/.cargo/registry/src/github.com-1ecc6299db9ec823/wee_alloc-0.4.5/build.rs:
D
/** Module implements on-screen image plotting utilities. DCV offers simple interface to show an image on screen: ---- Image image = imread("image.png"); // Simply, show the image image.imshow(); // Optionally, show the image on the figure with given title: image.imshow("Some Image"); // ... or do some processing, then show it in-line image .sliced .asType!float .conv!symmetric(gaussian!float(1.0f, 3, 3)) .imshow; // ... or instantiate new figure to setup some useful callbacks, than use the // Figure interface to draw on it's canvas, and show it: auto f = figure("Figure title"); // create the figure with given title // set the mouse move callback f.setCursorCallback( (Figure figure, double x, double y) { writeln("Mouse moved to: ", [x, y]); }) // set the mouse button click callback f.setMouseCallback( (Figure figure, int button, int scancode, int mods) { writeln("Mouse clicked: ", [button, scancode, mods]); }); f.draw(image); // draw an image to the figure's canvas. f.show(); // show the figure on screen. // Figure mechanism is integrated with ggplotd library, so GGPlotD context can be directly plotted onto existing figure: immutable title = "Image With Point Plot"; // show the image image.imshow(title); // construct the plot auto gg = GGPlotD().put(geomPoint(Aes!(double[], "x", double[], "y")([100.00, 200.0], [200.0,100.0]))); // draw it onto the figure with given title... gg.plot(title); // Once figure's image buffer is drawn out (say you have an image, and few plots drawn on it), // it can be extracted from the figure, and used in rest of the code: Image plotImage = figure(title).image; plotImage.imwrite("my_plot.png"); // And at the end, you can run the event loop for each previously set up figure, to wait // for key input, or given time to pass. waitKey!"seconds"(10); ---- $(DL Module contains: $(DD $(LINK2 #imshow,imshow) $(LINK2 #plot,plot) $(LINK2 #waitKey,waitKey) $(LINK2 #imdestroy,imdestroy) $(LINK2 #Figure,Figure) ) ) Copyright: Copyright Relja Ljubobratovic 2016. Authors: Relja Ljubobratovic License: $(LINK3 http://www.boost.org/LICENSE_1_0.txt, Boost Software License - Version 1.0). */ module dcv.plot.figure; import std.string : toStringz; import std.experimental.ndslice; import std.exception; import std.conv : to; import ggplotd.ggplotd, ggplotd.aes, ggplotd.axes, ggplotd.geom; import dcv.core.image : Image, ImageFormat, BitDepth, asImage; import dcv.core.utils : asType; import dcv.plot.bindings; /** Create a plotting figure. Params: title = Title of the window. If none given (default), window is named by "Figure id". Returns: If figure with given title exists already, that figure is returned, otherwise new figure is created and returned. */ Figure figure(string title = "") { Figure f = null; if (title == "") title = "Figure " ~ _figures.length.to!string; foreach (e; _figures) { if (e.title == title) { f = e; break; } } if (f is null) { f = new Figure(title); if (_figures.length != 0) { auto p = _figures[$ - 1].position; immutable typeof(p[0]) offset = 30; // TODO: figure out smarter window cascading. f.moveTo(p[0] + offset, p[1] + offset); } _figures ~= f; } return f; } /** Show an image to screen. Params: image = Image that is to be shown on the screen. title = Title of the window. If none given (default), window is named by "Figure id". If figure with given title exists, than the image content is updated with the given image. Returns: If figure with given title exists already, that figure is returned, otherwise new figure is created and returned. */ Figure imshow(Image image, string title = "") { auto f = figure(title); f.draw(image); f.show(); return f; } /// ditto Figure imshow(size_t N, T)(Slice!(N, T*) slice, string title = "") { auto f = figure(title); f.draw(slice, ImageFormat.IF_UNASSIGNED); f.show(); return f; } /// ditto Figure imshow(size_t N, T)(Slice!(N, T*) slice, ImageFormat format, string title = "") { auto f = figure(title); f.draw(slice, format); f.show(); return f; } /** Show given image, and then plot given GGPlotD context on top of it. */ Figure plot(Image image, GGPlotD gg, string title = "") { auto f = figure(title); f.draw(image); f.draw(gg); f.show(); return f; } /// ditto Figure plot(size_t N, T)(Slice!(N, T*) slice, GGPlotD gg, string title = "") { auto f = figure(title); f.draw(slice, ImageFormat.IF_UNASSIGNED); f.draw(gg); f.show(); return f; } /// ditto Figure plot(size_t N, T)(Slice!(N, T*) slice, ImageFormat format, GGPlotD gg, string title = "") { auto f = figure(title); f.draw(slice, format); f.draw(gg); f.show(); return f; } /** Plot GGPlotD context onto figure with given title. Given plot is drawn on top of figure's current image buffer. Size of the figure, and it's image buffer is unchanged. If no figure exists with given title, new one is allocated with default setup (500x500, with black background), and the plot is drawn on it. Params: gg = GGPlotD context, to be plotted on figure. title = Title of the window. If none given (default), window is named by "Figure id". Returns: If figure with given title exists already, that figure is returned, otherwise new figure is created and returned. */ Figure plot(GGPlotD gg, string title = "") { auto f = figure(title); f.draw(gg); f.show(); return f; } /** Run the event loop for each present figure, and wait for key and/or given time. Params: unit = Unit in which time count is given. Same as core.time.Duration unit parameters. count = Number of unit ticks to wait for event loop to finish. If left at zero (default), runs indefinitelly. Returns: Ascii value as int of keyboard press, or 0 if timer runs out. */ int waitKey(string unit = "msecs")(ulong count = 0) { import std.datetime : StopWatch; StopWatch stopwatch; stopwatch.start; _lastKey = -1; auto hiddenLoopCheck = 0; while (true) { if (count && count < mixin("stopwatch.peek." ~ unit)) break; glfwPollEvents(); if (_lastKey != -1) return _lastKey; bool allHidden = true; foreach (f; _figures) { auto glfwWindow = f._glfwWindow; if (f.visible == false) { continue; } if (glfwWindowShouldClose(glfwWindow)) { f.hide(); continue; } allHidden = false; f.render(); } if (allHidden) { /* TODO: think this through - its good behavior to end the event loop when no window is opened, but if image is shown right before the waitKey call, glfw doesn't actually show the window, so Figure.visible returns false. To bypass this, count event loop calls where all windows are hidden, and if counter reaches enough hits (say 100), break the loop. This is temporary solution. */ if (++hiddenLoopCheck > 100) break; } } return 0; } /** Destroy figure. Params: title = Title of the window to be destroyed. If left as empty string, destroys all windows. */ void imdestroy(string title = "") { if (title == "") { foreach (f; _figures) { f.hide(); destroy(f); } _figures = []; } else { import std.algorithm.mutation : remove; foreach (i, f; _figures) { if (f.title == title) { f.hide(); destroy(f); _figures.remove(i); break; } } } } /// Key press callback function. alias KeyPressCallback = void delegate(int key, int scancode, int action, int mods); /// Character callback function. alias CharCallback = void delegate(uint key); /** Assign key press callback function. */ void setKeyPressCallback(KeyPressCallback clbck) { _keyPressCallback = clbck; } /** Assign character input callback function. */ void setCharCallback(CharCallback clbck) { _charCallback = clbck; } /** Plotting figure type. */ class Figure { /// Mouse button callback function. alias MouseCallback = void delegate(Figure figure, int button, int action, int mods); /// Cursor movement callback function. alias CursorCallback = void delegate(Figure figure, double xpos, double ypos); /// Figure closing callback function. alias CloseCallback = void delegate(Figure figure); private { GLFWwindow* _glfwWindow = null; int _width = 0; int _height = 0; ubyte[] _data = void; string _title = ""; MouseCallback _mouseCallback = null; CursorCallback _cursorCallback = null; CloseCallback _closeCallback = null; } @disable this(); private void setupCallbacks() { glfwSetInputMode(_glfwWindow, GLFW_STICKY_KEYS, 1); glfwSetMouseButtonCallback(_glfwWindow, &mouseCallbackWrapper); glfwSetCursorPosCallback(_glfwWindow, &cursorCallbackWrapper); glfwSetWindowCloseCallback(_glfwWindow, &closeCallbackWrapper); glfwSetCharCallback(_glfwWindow, &charCallbackWrapper); glfwSetKeyCallback(_glfwWindow, &keyCallbackWrapper); setCloseCallback(&defaultCloseCallback); } /// Construct figure window with given title. this(string title, int width = 512, int height = 512) in { assert(width > 0); assert(height > 0); } body { _title = title; _width = width; _height = height; _data = new ubyte[_width * _height * 3]; setupWindow(); fitWindow(); setupCallbacks(); } /// Construct figure window with given title, and fill it with given image. this(string title, Image image) in { assert(image !is null); assert(!image.empty); } body { this(title, cast(int)image.width, cast(int)image.height); draw(image); } /// Construct figure window with given title, and fill it with given image. this(size_t N, T)(string title, Slice!(N, T*) slice, ImageFormat format = ImageFormat.IF_UNASSIGNED) if (N == 2 || N == 3) { this(title, cast(int)slice.length!1, cast(int)slice.length!0); draw(slice, format); } ~this() { if (_glfwWindow !is null) { glfwDestroyWindow(_glfwWindow); } } /// Assign mouse callback function. Figure setMouseCallback(MouseCallback clbck) { _mouseCallback = clbck; return this; } Figure setCursorCallback(CursorCallback clbck) { _cursorCallback = clbck; return this; } Figure setCloseCallback(CloseCallback clbck) { _closeCallback = clbck; return this; } @property width() inout { return _width; } @property height() inout { return _height; } @property title() inout { return _title; } @property title(inout string newTitle) { if (_glfwWindow) { glfwSetWindowTitle(_glfwWindow, toStringz(newTitle)); } } @property visible() inout { if (_glfwWindow is null) return false; return glfwGetWindowAttrib(cast(GLFWwindow*)_glfwWindow, GLFW_VISIBLE) == 1; } @property position() const { int x; int y; glfwGetWindowPos(cast(GLFWwindow*)_glfwWindow, &x, &y); return [x, y]; } @property size() const { int w, h; glfwGetWindowSize(cast(GLFWwindow*)_glfwWindow, &w, &h); return [w, h]; } /// Get a copy of image currently drawn on figure's canvas. @property image() const in { assert(width && height); } body { Image im = new Image(width, height, ImageFormat.IF_RGB, BitDepth.BD_8); im.data[] = _data[]; return im; } /// Show the figure window. void show() { if (_glfwWindow) glfwShowWindow(_glfwWindow); } /// Show the figure window. void hide() { if (_glfwWindow) glfwHideWindow(_glfwWindow); } /// Clear canvas content of this figure. void clear() { _data[] = cast(ubyte)0; } /// Move figure window to given position on screen. void moveTo(int x, int y) { glfwSetWindowPos(_glfwWindow, x, y); } /// ditto void moveTo(int[] pos) { assert(pos.length == 2); move(pos[0], pos[1]); } /// Offset figure window position by given values. void move(int x, int y) { auto p = this.position; glfwSetWindowPos(_glfwWindow, p[0] + x, p[1] + y); } /// ditto void move(int[] offset) { move(offset[0], offset[1]); } /// Draw image onto figure canvas. void draw(Image image) { Image showImage = adoptImage(image); if (_width != showImage.width || _height != showImage.height) { _width = cast(int)showImage.width; _height = cast(int)showImage.height; _data = showImage.data.dup; } else { assert(_data.length == showImage.data.length); _data[] = showImage.data[]; } fitWindow(); } /// Draw slice of image onto figure canvas. void draw(size_t N, T)(Slice!(N, T*) slice, ImageFormat format = ImageFormat.IF_UNASSIGNED) { Slice!(N, ubyte*) showSlice; static if (is(T == ubyte)) showSlice = slice; else showSlice = slice.asType!ubyte; if (format == ImageFormat.IF_UNASSIGNED) draw(showSlice.asImage()); else draw(showSlice.asImage(format)); } /** Draw the GGPlotD context on this figure's canvas. Important Notes: - ggplotd's coordinate system starts from down-left corner. To match the image coordinate system (which starts from up-left corner), y axis is flipped in the given plot. - GGPlotD's margins are zeroed out in this function, and axes hidden. - GGPlotD's axes ranges are configured in this function to match figure size (width and height). */ void draw(GGPlotD plot) { drawGGPlotD(plot, _data, _width, _height); fitWindow(); } private void fitWindow() { glfwSetWindowSize(_glfwWindow, _width, _height); } private void render() { glfwMakeContextCurrent(_glfwWindow); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glDisable(GL_DEPTH_TEST); glViewport(0, 0, width, height); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glOrtho(0, width, 0, height, 0.1, 1); glPixelZoom(1, -1); glRasterPos3f(0, height - 1, -0.3); glPixelStorei(GL_UNPACK_ALIGNMENT, 1); glDrawPixels(_width, _height, GL_RGB, GL_UNSIGNED_BYTE, _data.ptr); glFlush(); glEnable(GL_DEPTH_TEST); glfwSwapBuffers(_glfwWindow); } private void setupWindow() { glfwWindowHint(GLFW_RESIZABLE, GL_FALSE); _glfwWindow = glfwCreateWindow(_width, _height, toStringz(_title), null, null); if (!_glfwWindow) { throw new Exception("Cannot create window of size " ~ [_width, height].to!string); } glfwMakeContextCurrent(_glfwWindow); } private void defaultCloseCallback(Figure figure) { glfwHideWindow(figure._glfwWindow); } } // Constants //////////////////////////// immutable KEY_UNKNOWN = -1; immutable KEY_SPACE = 32; immutable KEY_APOSTROPHE = 39; /* ' */ immutable KEY_COMMA = 44; /* , */ immutable KEY_MINUS = 45; /* - */ immutable KEY_PERIOD = 46; /* . */ immutable KEY_SLASH = 47; /* / */ immutable KEY_SEMICOLON = 59; /* ; */ immutable KEY_EQUAL = 61; /* = */ immutable KEY_LEFT_BRACKET = 91; /* [ */ immutable KEY_BACKSLASH = 92; /* \ */ immutable KEY_RIGHT_BRACKET = 93; /* ] */ immutable KEY_GRAVE_ACCENT = 96; /* ` */ immutable KEY_ESCAPE = 256; immutable KEY_ENTER = 257; immutable KEY_TAB = 258; immutable KEY_BACKSPACE = 259; immutable KEY_INSERT = 260; immutable KEY_DELETE = 261; immutable KEY_RIGHT = 262; immutable KEY_LEFT = 263; immutable KEY_DOWN = 264; immutable KEY_UP = 265; immutable KEY_PAGE_UP = 266; immutable KEY_PAGE_DOWN = 267; immutable KEY_HOME = 268; immutable KEY_END = 269; immutable KEY_CAPS_LOCK = 280; immutable KEY_SCROLL_LOCK = 281; immutable KEY_NUM_LOCK = 282; immutable KEY_PRINT_SCREEN = 283; immutable KEY_PAUSE = 284; immutable KEY_F1 = 290; immutable KEY_F2 = 291; immutable KEY_F3 = 292; immutable KEY_F4 = 293; immutable KEY_F5 = 294; immutable KEY_F6 = 295; immutable KEY_F7 = 296; immutable KEY_F8 = 297; immutable KEY_F9 = 298; immutable KEY_F10 = 299; immutable KEY_F11 = 300; immutable KEY_F12 = 301; immutable KEY_F13 = 302; immutable KEY_F14 = 303; immutable KEY_F15 = 304; immutable KEY_F16 = 305; immutable KEY_F17 = 306; immutable KEY_F18 = 307; immutable KEY_F19 = 308; immutable KEY_F20 = 309; immutable KEY_F21 = 310; immutable KEY_F22 = 311; immutable KEY_F23 = 312; immutable KEY_F24 = 313; immutable KEY_F25 = 314; immutable KEY_KP_0 = 320; immutable KEY_KP_1 = 321; immutable KEY_KP_2 = 322; immutable KEY_KP_3 = 323; immutable KEY_KP_4 = 324; immutable KEY_KP_5 = 325; immutable KEY_KP_6 = 326; immutable KEY_KP_7 = 327; immutable KEY_KP_8 = 328; immutable KEY_KP_9 = 329; immutable KEY_KP_DECIMAL = 330; immutable KEY_KP_DIVIDE = 331; immutable KEY_KP_MULTIPLY = 332; immutable KEY_KP_SUBTRACT = 333; immutable KEY_KP_ADD = 334; immutable KEY_KP_ENTER = 335; immutable KEY_KP_EQUAL = 336; immutable KEY_LEFT_SHIFT = 340; immutable KEY_LEFT_CONTROL = 341; immutable KEY_LEFT_ALT = 342; immutable KEY_LEFT_SUPER = 343; immutable KEY_RIGHT_SHIFT = 344; immutable KEY_RIGHT_CONTROL = 345; immutable KEY_RIGHT_ALT = 346; immutable KEY_RIGHT_SUPER = 347; immutable KEY_MENU = 348; immutable KEY_LAST = KEY_MENU; immutable MOD_SHIFT = 0x0001; immutable MOD_CONTROL = 0x0002; immutable MOD_ALT = 0x0004; immutable MOD_SUPER = 0x0008; immutable MOUSE_BUTTON_1 = 0; immutable MOUSE_BUTTON_2 = 1; immutable MOUSE_BUTTON_3 = 2; immutable MOUSE_BUTTON_4 = 3; private: // initialize glfw and global callbacks static this() { import std.stdio; if (!glfwInit()) { throw new Exception("Invalid glfwInit call"); } setCharCallback((uint key) { _lastKey = key; }); setKeyPressCallback((int key, int scancode, int action, int mods) { /* char callback takes priority with character keyboard inputs, so only override the _lastKey value if its -1, which means there was no char callback previously. */ if (_lastKey == -1) _lastKey = key; }); } private: Figure[] _figures; // book-keeping of each running figure. int _lastKey = -1; // last hit key KeyPressCallback _keyPressCallback; // global key press callback CharCallback _charCallback; // global char callback void keyCallbackWrapper(int mods, int action, int scancode, int key, GLFWwindow* window) { if (_keyPressCallback) _keyPressCallback(key, scancode, action, mods); } void charCallbackWrapper(uint key, GLFWwindow* window) { if (_charCallback) _charCallback(key); } void cursorCallbackWrapper(double y, double x, GLFWwindow* window) { foreach (f; _figures) { if (f._glfwWindow == window) { if (f._cursorCallback) f._cursorCallback(f, x, y); break; } } } void mouseCallbackWrapper(int mods, int action, int button, GLFWwindow* window) { foreach (f; _figures) { if (f._glfwWindow == window) { if (f._mouseCallback) f._mouseCallback(f, button, action, mods); break; } } } void closeCallbackWrapper(GLFWwindow* window) { foreach (f; _figures) { if (f._glfwWindow == window) { if (f._closeCallback) f._closeCallback(f); break; } } } Image adoptImage(Image image) { import dcv.imgproc.color : yuv2rgb, gray2rgb; Image showImage = (image.depth != BitDepth.BD_8) ? image.asType!ubyte : image; switch (showImage.format) { case ImageFormat.IF_RGB_ALPHA: showImage = showImage.sliced[0 .. $, 0 .. $, 0 .. 2].asImage(ImageFormat.IF_RGB); break; case ImageFormat.IF_BGR: foreach (e; showImage.sliced.pack!1.byElement) { auto t = e[0]; e[0] = e[2]; e[2] = t; } break; case ImageFormat.IF_BGR_ALPHA: foreach (e; showImage.sliced.pack!1.byElement) { auto t = e[0]; e[0] = e[2]; e[2] = t; } showImage = showImage.sliced[0 .. $, 0 .. $, 0 .. 2].asImage(ImageFormat.IF_RGB); break; case ImageFormat.IF_YUV: showImage = showImage.sliced.yuv2rgb!ubyte.asImage(ImageFormat.IF_RGB); break; case ImageFormat.IF_MONO: showImage = showImage.sliced.reshape(image.height, image.width) .gray2rgb!ubyte.asImage(ImageFormat.IF_RGB); break; default: break; } return showImage; } void drawGGPlotD(GGPlotD gg, ubyte[] data, int width, int height) { import std.parallelism : parallel; import std.range : iota; import cairo = cairo; gg.put(xaxisRange(0, width)).put(yaxisRange(0, height)); // fit range to image size. gg.put(xaxisOffset(-10)).put(yaxisOffset(-10)); // change offset to hide axes. gg.put(Margins(0, 0, 0, 0)); // Change margins, to match image coordinates. cairo.Surface surface = new cairo.ImageSurface(cairo.Format.CAIRO_FORMAT_RGB24, width, height); gg.drawToSurface(surface, width, height); auto imSurface = cast(cairo.ImageSurface)surface; auto surfData = imSurface.getData(); foreach (r; iota(height)) foreach (c; 0 .. width) { auto pixpos = (height - r) * width * 4 + c * 4; auto dpixpos = r * width * 3 + c * 3; auto alpha = surfData[pixpos + 3]; if (alpha) { auto af = cast(float)alpha / 255.0f; data[dpixpos + 0] = cast(ubyte)(data[dpixpos + 0] * (1.0f - af) + surfData[pixpos + 2] * af); data[dpixpos + 1] = cast(ubyte)(data[dpixpos + 1] * (1.0f - af) + surfData[pixpos + 1] * af); data[dpixpos + 2] = cast(ubyte)(data[dpixpos + 2] * (1.0f - af) + surfData[pixpos + 0] * af); } } }
D
/Users/Swarup/Apps/XCode/ios/Giffer/build/Giffer.build/Debug-iphonesimulator/Giffer.build/Objects-normal/x86_64/GifImageView.o : /Users/Swarup/Apps/XCode/ios/Giffer/Giffer/AppScheme.swift /Users/Swarup/Apps/XCode/ios/Giffer/Giffer/AppDelegate.swift /Users/Swarup/Apps/XCode/ios/Giffer/Giffer/extensions/String+Size.swift /Users/Swarup/Apps/XCode/ios/Giffer/Giffer/extensions/UIImage+Gif.swift /Users/Swarup/Apps/XCode/ios/Giffer/Giffer/FixedIntervalSlider.swift /Users/Swarup/Apps/XCode/ios/Giffer/Giffer/ViewController.swift /Users/Swarup/Apps/XCode/ios/Giffer/Giffer/GifPlayer.swift /Users/Swarup/Apps/XCode/ios/Giffer/Giffer/GifAnimator.swift /Users/Swarup/Apps/XCode/ios/Giffer/Giffer/Utils.swift /Users/Swarup/Apps/XCode/ios/Giffer/Giffer/extensions/UIImage+Tint.swift /Users/Swarup/Apps/XCode/ios/Giffer/Giffer/GifImageView.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/Swarup/Apps/XCode/ios/Giffer/build/Giffer.build/Debug-iphonesimulator/Giffer.build/Objects-normal/x86_64/GifImageView~partial.swiftmodule : /Users/Swarup/Apps/XCode/ios/Giffer/Giffer/AppScheme.swift /Users/Swarup/Apps/XCode/ios/Giffer/Giffer/AppDelegate.swift /Users/Swarup/Apps/XCode/ios/Giffer/Giffer/extensions/String+Size.swift /Users/Swarup/Apps/XCode/ios/Giffer/Giffer/extensions/UIImage+Gif.swift /Users/Swarup/Apps/XCode/ios/Giffer/Giffer/FixedIntervalSlider.swift /Users/Swarup/Apps/XCode/ios/Giffer/Giffer/ViewController.swift /Users/Swarup/Apps/XCode/ios/Giffer/Giffer/GifPlayer.swift /Users/Swarup/Apps/XCode/ios/Giffer/Giffer/GifAnimator.swift /Users/Swarup/Apps/XCode/ios/Giffer/Giffer/Utils.swift /Users/Swarup/Apps/XCode/ios/Giffer/Giffer/extensions/UIImage+Tint.swift /Users/Swarup/Apps/XCode/ios/Giffer/Giffer/GifImageView.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/Swarup/Apps/XCode/ios/Giffer/build/Giffer.build/Debug-iphonesimulator/Giffer.build/Objects-normal/x86_64/GifImageView~partial.swiftdoc : /Users/Swarup/Apps/XCode/ios/Giffer/Giffer/AppScheme.swift /Users/Swarup/Apps/XCode/ios/Giffer/Giffer/AppDelegate.swift /Users/Swarup/Apps/XCode/ios/Giffer/Giffer/extensions/String+Size.swift /Users/Swarup/Apps/XCode/ios/Giffer/Giffer/extensions/UIImage+Gif.swift /Users/Swarup/Apps/XCode/ios/Giffer/Giffer/FixedIntervalSlider.swift /Users/Swarup/Apps/XCode/ios/Giffer/Giffer/ViewController.swift /Users/Swarup/Apps/XCode/ios/Giffer/Giffer/GifPlayer.swift /Users/Swarup/Apps/XCode/ios/Giffer/Giffer/GifAnimator.swift /Users/Swarup/Apps/XCode/ios/Giffer/Giffer/Utils.swift /Users/Swarup/Apps/XCode/ios/Giffer/Giffer/extensions/UIImage+Tint.swift /Users/Swarup/Apps/XCode/ios/Giffer/Giffer/GifImageView.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
D
instance DIA_Addon_WispDetector_EXIT(C_Info) { npc = Wisp_Detector; nr = 999; condition = DIA_Addon_WispDetector_EXIT_Condition; information = DIA_Addon_WispDetector_EXIT_Info; permanent = TRUE; description = Dialog_Ende; }; func int DIA_Addon_WispDetector_EXIT_Condition() { return TRUE; }; func void DIA_Addon_WispDetector_EXIT_Info() { B_IrrlichtBeep(); AI_StopProcessInfos(self); }; instance DIA_Addon_WispDetector_DetectItems(C_Info) { npc = Wisp_Detector; nr = 1; condition = DIA_Addon_WispDetector_DetectItems_Condition; information = DIA_Addon_WispDetector_DetectItems_Info; permanent = TRUE; description = "Начинай поиски..."; }; func int DIA_Addon_WispDetector_DetectItems_Condition() { return TRUE; }; func void DIA_Addon_WispDetector_DetectItems_Info() { AI_Output(other,self,"DIA_Addon_WispDetector_DetectItems_15_00"); //Начинай поиски... Info_ClearChoices(DIA_Addon_WispDetector_DetectItems); if(PLAYER_TALENT_WISPDETECTOR[WISPSKILL_RUNE] == TRUE) { Info_AddChoice(DIA_Addon_WispDetector_DetectItems,"Поиск магических свитков",DIA_Addon_WispDetector_DetectItems_RUNE); }; if(PLAYER_TALENT_WISPDETECTOR[WISPSKILL_NONE] == TRUE) { Info_AddChoice(DIA_Addon_WispDetector_DetectItems,"Поиск золота и различной утвари",DIA_Addon_WispDetector_DetectItems_NONE); }; if(PLAYER_TALENT_WISPDETECTOR[WISPSKILL_FF] == TRUE) { Info_AddChoice(DIA_Addon_WispDetector_DetectItems,"Поиск оружия дальнего боя, стрел и болтов",DIA_Addon_WispDetector_DetectItems_FF); }; if(PLAYER_TALENT_WISPDETECTOR[WISPSKILL_NF] == TRUE) { Info_AddChoice(DIA_Addon_WispDetector_DetectItems,"Поиск оружия ближнего боя",DIA_Addon_WispDetector_DetectItems_NF); }; if(PLAYER_TALENT_WISPDETECTOR[WISPSKILL_FOOD] == TRUE) { Info_AddChoice(DIA_Addon_WispDetector_DetectItems,"Поиск еды и растений",DIA_Addon_WispDetector_DetectItems_FOOD); }; if(PLAYER_TALENT_WISPDETECTOR[WISPSKILL_MAGIC] == TRUE) { Info_AddChoice(DIA_Addon_WispDetector_DetectItems,"Поиск магических колец и амулетов",DIA_Addon_WispDetector_DetectItems_MAGIC); }; if(PLAYER_TALENT_WISPDETECTOR[WISPSKILL_POTIONS] == TRUE) { Info_AddChoice(DIA_Addon_WispDetector_DetectItems,"Поиск магических зелий",DIA_Addon_WispDetector_DetectItems_POTIONS); }; Info_AddChoice(DIA_Addon_WispDetector_DetectItems,"Поиск любых предметов",DIA_Addon_WispDetector_DetectItems_ALL); }; func void DIA_Addon_WispDetector_DetectItems_ALL() { AI_Output(other,self,"DIA_Addon_WispDetector_DetectItems_ALL_15_00"); //Ищи все, что ты можешь найти. WispSearching = WispSearch_ALL; B_IrrlichtBeep(); AI_StopProcessInfos(self); }; func void DIA_Addon_WispDetector_DetectItems_POTIONS() { AI_Output(other,self,"DIA_Addon_WispDetector_DetectItems_POTIONS_15_00"); //Ищи любые зелья. WispSearching = WispSearch_POTIONS; B_IrrlichtBeep(); AI_StopProcessInfos(self); }; func void DIA_Addon_WispDetector_DetectItems_MAGIC() { AI_Output(other,self,"DIA_Addon_WispDetector_DetectItems_MAGIC_15_00"); //Ищи кольца и амулеты. WispSearching = WispSearch_MAGIC; B_IrrlichtBeep(); AI_StopProcessInfos(self); }; func void DIA_Addon_WispDetector_DetectItems_FOOD() { AI_Output(other,self,"DIA_Addon_WispDetector_DetectItems_FOOD_15_00"); //Ищи еду и растения. WispSearching = WispSearch_FOOD; B_IrrlichtBeep(); AI_StopProcessInfos(self); }; func void DIA_Addon_WispDetector_DetectItems_NF() { AI_Output(other,self,"DIA_Addon_WispDetector_DetectItems_NF_15_00"); //Ищи оружие ближнего боя. WispSearching = WispSearch_NF; B_IrrlichtBeep(); AI_StopProcessInfos(self); }; func void DIA_Addon_WispDetector_DetectItems_FF() { AI_Output(other,self,"DIA_Addon_WispDetector_DetectItems_FF_15_00"); //Ищи оружие дальнего боя и боеприпасы. WispSearching = WispSearch_FF; B_IrrlichtBeep(); AI_StopProcessInfos(self); }; func void DIA_Addon_WispDetector_DetectItems_NONE() { AI_Output(other,self,"DIA_Addon_WispDetector_DetectItems_NONE_15_00"); //Ищи золото, ключи и прочую утварь. WispSearching = WispSearch_NONE; B_IrrlichtBeep(); AI_StopProcessInfos(self); }; func void DIA_Addon_WispDetector_DetectItems_RUNE() { AI_Output(other,self,"DIA_Addon_WispDetector_DetectItems_RUNE_15_00"); //Ищи руны и свитки. WispSearching = WispSearch_RUNE; B_IrrlichtBeep(); AI_StopProcessInfos(self); };
D
a hired hand on a farm
D
instance DIA_Addon_Elvrich_EXIT(C_Info) { npc = VLK_4302_Addon_Elvrich; nr = 999; condition = DIA_Addon_Elvrich_EXIT_Condition; information = DIA_Addon_Elvrich_EXIT_Info; permanent = TRUE; description = Dialog_Ende; }; func int DIA_Addon_Elvrich_EXIT_Condition() { return TRUE; }; func void DIA_Addon_Elvrich_EXIT_Info() { AI_StopProcessInfos(self); }; instance DIA_Addon_Elvrich_PICKPOCKET(C_Info) { npc = VLK_4302_Addon_Elvrich; nr = 900; condition = DIA_Addon_Elvrich_PICKPOCKET_Condition; information = DIA_Addon_Elvrich_PICKPOCKET_Info; permanent = TRUE; description = Pickpocket_60; }; func int DIA_Addon_Elvrich_PICKPOCKET_Condition() { return C_Beklauen(62,110); }; func void DIA_Addon_Elvrich_PICKPOCKET_Info() { Info_ClearChoices(DIA_Addon_Elvrich_PICKPOCKET); Info_AddChoice(DIA_Addon_Elvrich_PICKPOCKET,Dialog_Back,DIA_Addon_Elvrich_PICKPOCKET_BACK); Info_AddChoice(DIA_Addon_Elvrich_PICKPOCKET,DIALOG_PICKPOCKET,DIA_Addon_Elvrich_PICKPOCKET_DoIt); }; func void DIA_Addon_Elvrich_PICKPOCKET_DoIt() { B_Beklauen(); Info_ClearChoices(DIA_Addon_Elvrich_PICKPOCKET); }; func void DIA_Addon_Elvrich_PICKPOCKET_BACK() { Info_ClearChoices(DIA_Addon_Elvrich_PICKPOCKET); }; instance DIA_Addon_Elvrich_BanditsThere(C_Info) { npc = VLK_4302_Addon_Elvrich; nr = 5; condition = DIA_Addon_Elvrich_BanditsThere_Condition; information = DIA_Addon_Elvrich_BanditsThere_Info; important = TRUE; permanent = TRUE; }; var int DIA_Addon_Elvrich_BanditsThere_NoPerm; func int DIA_Addon_Elvrich_BanditsThere_Condition() { if(Npc_IsInState(self,ZS_Talk) && (DIA_Addon_Elvrich_BanditsThere_NoPerm == FALSE)) { return TRUE; }; }; func void DIA_Addon_Elvrich_BanditsThere_Info() { if(Npc_IsDead(BDT_10307_Addon_RangerBandit_M) && Npc_IsDead(BDT_10308_Addon_RangerBandit_L) && Npc_IsDead(BDT_10309_Addon_RangerBandit_L) && Npc_IsDead(BDT_10310_Addon_RangerBandit_M)) { AI_Output(self,other,"DIA_Addon_Elvrich_BanditsThere_04_00"); //Слава богам! С бандитами покончено. Ты спас мне жизнь. DIA_Addon_Elvrich_BanditsThere_NoPerm = TRUE; self.aivar[AIV_NoFightParker] = FALSE; } else { B_Say(self,other,"$NOTNOW"); AI_StopProcessInfos(self); }; }; instance DIA_Addon_Elvrich_Wer(C_Info) { npc = VLK_4302_Addon_Elvrich; nr = 5; condition = DIA_Addon_Elvrich_Wer_Condition; information = DIA_Addon_Elvrich_Wer_Info; description = "Кто ты?"; }; func int DIA_Addon_Elvrich_Wer_Condition() { return TRUE; }; func void DIA_Addon_Elvrich_Wer_Info() { AI_Output(other,self,"DIA_Addon_Elvrich_Wer_15_00"); //Кто ты такой? AI_Output(self,other,"DIA_Addon_Elvrich_Wer_04_01"); //Меня зовут Элврих. Я из города. if(MIS_Thorben_BringElvrichBack == LOG_Running) { AI_Output(other,self,"DIA_Addon_Elvrich_Wer_15_02"); //Мастер Торбен говорил, что ты пропал. }; AI_Output(self,other,"DIA_Addon_Elvrich_Wer_04_03"); //Эти подонки притащили меня сюда и держали в плену. }; instance DIA_Addon_Elvrich_MissingPeople(C_Info) { npc = VLK_4302_Addon_Elvrich; nr = 5; condition = DIA_Addon_Elvrich_MissingPeople_Condition; information = DIA_Addon_Elvrich_MissingPeople_Info; description = "В городе пропадали и другие люди."; }; func int DIA_Addon_Elvrich_MissingPeople_Condition() { if(Npc_KnowsInfo(other,DIA_Addon_Elvrich_Wer) && (SC_HearedAboutMissingPeople == TRUE) && (SCKnowsMissingPeopleAreInAddonWorld == FALSE)) { return TRUE; }; }; func void DIA_Addon_Elvrich_MissingPeople_Info() { AI_Output(other,self,"DIA_Addon_Elvrich_MissingPeople_15_00"); //В городе пропадали и другие люди. AI_Output(self,other,"DIA_Addon_Elvrich_MissingPeople_04_01"); //Не знаю ничего о других людях. Могу рассказать только, что случилось со МНОЙ. }; instance DIA_Addon_Elvrich_WhatExactly(C_Info) { npc = VLK_4302_Addon_Elvrich; nr = 5; condition = DIA_Addon_Elvrich_WhatExactly_Condition; information = DIA_Addon_Elvrich_WhatExactly_Info; description = "И что же с тобой случилось?"; }; func int DIA_Addon_Elvrich_WhatExactly_Condition() { if(Npc_KnowsInfo(other,DIA_Addon_Elvrich_Wer)) { return TRUE; }; }; func void DIA_Addon_Elvrich_WhatExactly_Info() { AI_Output(other,self,"DIA_Addon_Elvrich_WhatExactly_15_00"); //И что же с тобой случилось? AI_Output(self,other,"DIA_Addon_Elvrich_WhatExactly_04_01"); //Я шел на свидание. Я должен был встретиться со своей девушкой. AI_Output(self,other,"DIA_Addon_Elvrich_WhatExactly_04_02"); //Ее зовут Люсия. Мы собирались направиться к горам, подальше от города и всех, кто там живет. AI_Output(self,other,"DIA_Addon_Elvrich_WhatExactly_04_03"); //Я дошел до места, где ждала меня Люсия, и вдруг появились бандиты и схватили нас обоих. AI_Output(self,other,"DIA_Addon_Elvrich_WhatExactly_04_04"); //Конечно, я сопротивлялся, но их было слишком много. Ты, кстати, их не встречал? Info_ClearChoices(DIA_Addon_Elvrich_WhatExactly); Info_AddChoice(DIA_Addon_Elvrich_WhatExactly,"Что хотели от тебя бандиты?",DIA_Addon_Elvrich_WhatExactly_Want); Info_AddChoice(DIA_Addon_Elvrich_WhatExactly,"Рассказывай.",DIA_Addon_Elvrich_WhatExactly_lucia); }; func void DIA_Addon_Elvrich_WhatExactly_Want() { AI_Output(other,self,"DIA_Addon_Elvrich_WhatExactly_Want_15_00"); //Что хотели от тебя бандиты? AI_Output(self,other,"DIA_Addon_Elvrich_WhatExactly_Want_04_01"); //Несколько раз мне удавалось подслушать их беседы. Из них я понял, что нас собирались продать в рабство. Info_AddChoice(DIA_Addon_Elvrich_WhatExactly,"Куда вас собирались увезти?",DIA_Addon_Elvrich_WhatExactly_Pirates); }; func void DIA_Addon_Elvrich_WhatExactly_Pirates() { AI_Output(other,self,"DIA_Addon_Elvrich_WhatExactly_Pirates_15_00"); //Куда вас собирались увезти? AI_Output(self,other,"DIA_Addon_Elvrich_WhatExactly_Pirates_04_01"); //Это место находится где-то здесь, на острове. Но похоже, что без корабля туда не добраться. AI_Output(self,other,"DIA_Addon_Elvrich_WhatExactly_Pirates_04_02"); //Меня привели на побережье. На нем расположился небольшой пиратский лагерь. AI_Output(self,other,"DIA_Addon_Elvrich_WhatExactly_Pirates_04_03"); //Один из бандитов подошел к пиратам и начал переговоры. У них разгорелся яростный спор. AI_Output(self,other,"DIA_Addon_Elvrich_WhatExactly_Pirates_04_04"); //Я думаю, что бандит хотел, чтобы пираты куда-то нас перевезли. AI_Output(self,other,"DIA_Addon_Elvrich_WhatExactly_Pirates_04_05"); //Но пираты отказались, и бандитам пришлось уйти. С тех пор мы здесь и сидим. AI_Output(self,other,"DIA_Addon_Elvrich_WhatExactly_Pirates_04_06"); //По-моему, бандиты просто не знали, что им делать дальше. А потом пришел ты. Elvrich_SCKnowsPirats = TRUE; Log_CreateTopic(TOPIC_Addon_WhoStolePeople,LOG_MISSION); Log_SetTopicStatus(TOPIC_Addon_WhoStolePeople,LOG_Running); B_LogEntry(TOPIC_Addon_WhoStolePeople,"Элврих, ученик плотника из Хориниса Торбена, был похищен бандитами. Похоже, что пираты и бандиты в сговоре."); Info_AddChoice(DIA_Addon_Elvrich_WhatExactly,"Пираты в Хоринисе?",DIA_Addon_Elvrich_WhatExactly_Here); Info_AddChoice(DIA_Addon_Elvrich_WhatExactly,"Где находится лагерь пиратов?",DIA_Addon_Elvrich_WhatExactly_pirat); }; func void DIA_Addon_Elvrich_WhatExactly_Here() { AI_Output(other,self,"DIA_Addon_Elvrich_WhatExactly_Here_15_00"); //Пираты в Хоринисе? AI_Output(self,other,"DIA_Addon_Elvrich_WhatExactly_Here_04_01"); //Известно мне о них немного. Честно говоря, я тогда первый раз увидел пиратов. AI_Output(self,other,"DIA_Addon_Elvrich_WhatExactly_Here_04_02"); //Они стараются оставаться в тени. Практически каждый из них - находящийся в розыске преступник. AI_Output(self,other,"DIA_Addon_Elvrich_WhatExactly_Here_04_03"); //У пиратов есть суеверие - они боятся виселиц, так что в городе их не встретишь. }; func void DIA_Addon_Elvrich_WhatExactly_lucia() { AI_Output(other,self,"DIA_Addon_Elvrich_WhatExactly_lucia_15_00"); //Расскажи мне о Люсии. AI_Output(self,other,"DIA_Addon_Elvrich_WhatExactly_lucia_04_01"); //Это девушка из портового района. Очень красивая. Она работала на этого мерзавца Бромора. }; func void DIA_Addon_Elvrich_WhatExactly_pirat() { AI_Output(other,self,"DIA_Addon_Elvrich_WhatExactly_pirat_15_00"); //Где находится лагерь пиратов? AI_Output(self,other,"DIA_Addon_Elvrich_WhatExactly_pirat_04_01"); //Недалеко от гавани Хориниса. AI_Output(self,other,"DIA_Addon_Elvrich_WhatExactly_pirat_04_02"); //Если ты встанешь на набережной лицом к морю, то он будет справа. AI_Output(self,other,"DIA_Addon_Elvrich_WhatExactly_pirat_04_03"); //Первый небольшой залив, который встретится тебе на пути, и будет нужным тебе местом. Log_CreateTopic(TOPIC_Addon_WhoStolePeople,LOG_MISSION); Log_SetTopicStatus(TOPIC_Addon_WhoStolePeople,LOG_Running); B_LogEntry(TOPIC_Addon_WhoStolePeople,"Чтобы найти место встречи с пиратами, нужно пойти в порт Хориниса и встать на набережной лицом к морю. Затем нужно спрыгнуть в море и поплыть вдоль берега направо."); Info_AddChoice(DIA_Addon_Elvrich_WhatExactly,Dialog_Back,DIA_Addon_Elvrich_WhatExactly_Back); }; func void DIA_Addon_Elvrich_WhatExactly_Back() { Info_ClearChoices(DIA_Addon_Elvrich_WhatExactly); }; instance DIA_Addon_Elvrich_Bromor(C_Info) { npc = VLK_4302_Addon_Elvrich; nr = 5; condition = DIA_Addon_Elvrich_Bromor_Condition; information = DIA_Addon_Elvrich_Bromor_Info; description = "Бромор сказал, что Люсия украла у него золотое блюдо..."; }; func int DIA_Addon_Elvrich_Bromor_Condition() { if(Npc_KnowsInfo(other,DIA_Addon_Elvrich_WhatExactly) && (MIS_Bromor_LuciaStoleGold == LOG_Running)) { return TRUE; }; }; func void DIA_Addon_Elvrich_Bromor_Info() { AI_Output(other,self,"DIA_Addon_Elvrich_Bromor_15_00"); //Бромор сказал, что Люсия украла у него золотое блюдо... AI_Output(self,other,"DIA_Addon_Elvrich_Bromor_04_01"); //Ну, если Люсия что-то и украла у Бромора, у нее отобрали это бандиты. Log_CreateTopic(TOPIC_Addon_BromorsGold,LOG_MISSION); Log_SetTopicStatus(TOPIC_Addon_BromorsGold,LOG_Running); B_LogEntry(TOPIC_Addon_BromorsGold,"Золотая чаша Бромора, по всей видимости, находится у бандитов, живущих в лесном лагере к северу от фермы Секоба."); }; instance DIA_Addon_Elvrich_WhereIsLucia(C_Info) { npc = VLK_4302_Addon_Elvrich; nr = 5; condition = DIA_Addon_Elvrich_WhereIsLucia_Condition; information = DIA_Addon_Elvrich_WhereIsLucia_Info; description = "Где сейчас Люсия?"; }; func int DIA_Addon_Elvrich_WhereIsLucia_Condition() { if(Npc_KnowsInfo(other,DIA_Addon_Elvrich_WhatExactly) && (MIS_LuciasLetter != LOG_SUCCESS)) { return TRUE; }; }; func void DIA_Addon_Elvrich_WhereIsLucia_Info() { AI_Output(other,self,"DIA_Addon_Elvrich_WhereIsLucia_15_00"); //Где сейчас Люсия? AI_Output(self,other,"DIA_Addon_Elvrich_WhereIsLucia_04_01"); //Мы разделились на большом перекрестке перед фермой Онара. AI_Output(self,other,"DIA_Addon_Elvrich_WhereIsLucia_04_02"); //Люсию бандиты утащили в лес за фермой Секоба. AI_Output(self,other,"DIA_Addon_Elvrich_WhereIsLucia_04_03"); //Да защитит ее Иннос. Log_CreateTopic(TOPIC_Addon_Lucia,LOG_MISSION); Log_SetTopicStatus(TOPIC_Addon_Lucia,LOG_Running); B_LogEntry(TOPIC_Addon_Lucia,"Люсию увели бандиты. Они направились в лес, который находится к северу от фермы Секоба."); SC_KnowsLuciaCaughtByBandits = TRUE; }; instance DIA_Addon_Elvrich_FernandosWaffen(C_Info) { npc = VLK_4302_Addon_Elvrich; nr = 5; condition = DIA_Addon_Elvrich_FernandosWaffen_Condition; information = DIA_Addon_Elvrich_FernandosWaffen_Info; description = "Бандиты, которые держали тебя в плену, получали груз оружия?"; }; func int DIA_Addon_Elvrich_FernandosWaffen_Condition() { if(Npc_KnowsInfo(other,DIA_Addon_Elvrich_WhatExactly) && (MIS_Vatras_FindTheBanditTrader == LOG_Running)) { return TRUE; }; }; func void DIA_Addon_Elvrich_FernandosWaffen_Info() { AI_Output(other,self,"DIA_Addon_Elvrich_FernandosWaffen_15_00"); //Бандиты, которые держали тебя в плену, получали груз оружия? AI_Output(self,other,"DIA_Addon_Elvrich_FernandosWaffen_04_01"); //О да. Оружия было столько, что они еле его унесли. AI_Output(self,other,"DIA_Addon_Elvrich_FernandosWaffen_04_02"); //Все это оружие они утащили в направлении фермы Секоба. B_GivePlayerXP(XP_Ambient); Log_CreateTopic(TOPIC_Addon_Bandittrader,LOG_MISSION); Log_SetTopicStatus(TOPIC_Addon_Bandittrader,LOG_Running); B_LogEntry(TOPIC_Addon_Bandittrader,"След ведет меня в лес, который находится к северу от фермы Секоба. Там разместились бандиты, получившие недавно большую партию оружия."); }; instance DIA_Addon_Elvrich_LuciaLetter(C_Info) { npc = VLK_4302_Addon_Elvrich; nr = 4; condition = DIA_Addon_Elvrich_LuciaLetter_Condition; information = DIA_Addon_Elvrich_LuciaLetter_Info; description = "Я нашел письмо от Люсии."; }; func int DIA_Addon_Elvrich_LuciaLetter_Condition() { if(Npc_KnowsInfo(other,DIA_Addon_Elvrich_WhatExactly) && Npc_HasItems(other,ItWr_LuciasLoveLetter_Addon)) { return TRUE; }; }; func void DIA_Addon_Elvrich_LuciaLetter_Info() { AI_Output(other,self,"DIA_Addon_Elvrich_LuciaLetter_15_00"); //Я нашел письмо от Люсии. AI_Output(self,other,"DIA_Addon_Elvrich_LuciaLetter_04_01"); //(возбужденно) Что? Дай его сюда! B_UseFakeScroll(); AI_Output(self,other,"DIA_Addon_Elvrich_LuciaLetter_04_02"); //(в отчаянии) Нет! Я не верю! Я просто не могу поверить. AI_Output(self,other,"DIA_Addon_Elvrich_LuciaLetter_04_03"); //(в отчаянии) Она не может меня вот так вот бросить. AI_Output(self,other,"DIA_Addon_Elvrich_LuciaLetter_04_04"); //Забери это письмо! Я не хочу его видеть. Я верю, что когда-нибудь она ко мне вернется. Log_CreateTopic(TOPIC_Addon_Lucia,LOG_MISSION); Log_SetTopicStatus(TOPIC_Addon_Lucia,LOG_Running); B_LogEntry(TOPIC_Addon_Lucia,"Элврих не хочет верить, что Люсия ушла с бандитами добровольно. Несмотря на письмо, которое она ему написала, он все еще надеется на ее возвращение."); B_GivePlayerXP(XP_Addon_LuciasLetter); MIS_LuciasLetter = LOG_SUCCESS; }; instance DIA_Addon_Elvrich_WasNun(C_Info) { npc = VLK_4302_Addon_Elvrich; nr = 5; condition = DIA_Addon_Elvrich_WasNun_Condition; information = DIA_Addon_Elvrich_WasNun_Info; permanent = FALSE; description = "Ты должен вернуться в город!"; }; func int DIA_Addon_Elvrich_WasNun_Condition() { if(Npc_KnowsInfo(other,DIA_Addon_Elvrich_WhereIsLucia)) { return TRUE; }; }; func void DIA_Addon_Elvrich_WasNun_Info() { AI_Output(other,self,"DIA_Addon_Elvrich_WasNun_15_00"); //Ты должен вернуться в город! AI_Output(self,other,"DIA_Addon_Elvrich_WasNun_04_01"); //Именно это я и собираюсь сделать! Я возвращаюсь к мастеру Торбену. AI_Output(self,other,"DIA_Addon_Elvrich_WasNun_04_02"); //Ты пойдешь искать бандитов? AI_Output(other,self,"DIA_Addon_Elvrich_WasNun_15_03"); //Думаю, что да... AI_Output(self,other,"DIA_Addon_Elvrich_WasNun_04_04"); //Если найдешь Люсию, отведи ее в город, хорошо? AI_Output(other,self,"DIA_Addon_Elvrich_WasNun_15_05"); //Я посмотрю, что смогу сделать. Log_CreateTopic(TOPIC_Addon_MissingPeople,LOG_MISSION); Log_SetTopicStatus(TOPIC_Addon_MissingPeople,LOG_Running); B_LogEntry(TOPIC_Addon_MissingPeople,"Элврих вернулся к мастеру Торбену."); Elvrich_GoesBack2Thorben = TRUE; Npc_ExchangeRoutine(self,"BACKINTHECITY"); EquipItem(self,ItMw_1h_Bau_Mace); }; instance DIA_Addon_Elvrich_PERM(C_Info) { npc = VLK_4302_Addon_Elvrich; nr = 5; condition = DIA_Addon_Elvrich_PERM_Condition; information = DIA_Addon_Elvrich_PERM_Info; permanent = TRUE; important = TRUE; }; func int DIA_Addon_Elvrich_PERM_Condition() { if((Elvrich_GoesBack2Thorben == TRUE) && Npc_IsInState(self,ZS_Talk) && (MIS_LuciasLetter != LOG_Running)) { return TRUE; }; }; func void DIA_Addon_Elvrich_PERM_Info() { AI_Output(self,other,"DIA_Addon_Elvrich_PERM_04_00"); //Спасибо, что спас меня! };
D
instance Pal_207_Girion_DI(Npc_Default) { name[0] = "Гирион"; guild = GIL_PAL; id = 2070; voice = 8; flags = 0; npcType = NPCTYPE_FRIEND; B_SetAttributesToChapter(self,4); fight_tactic = FAI_HUMAN_MASTER; EquipItem(self,ItMw_1h_Pal_Sword); B_CreateAmbientInv(self); B_SetNpcVisual(self,MALE,"Hum_Head_Pony",Face_N_Lefty,BodyTex_N,ItAr_PAL_M); Mdl_SetModelFatness(self,1); Mdl_ApplyOverlayMds(self,"Humans_Militia.mds"); B_GiveNpcTalents(self); B_SetFightSkills(self,55); daily_routine = Rtn_Start_2070; }; func void Rtn_Start_2070() { TA_Sit_Bench(8,0,23,0,"SHIP_DECK_18"); TA_Sit_Bench(23,0,8,0,"SHIP_DECK_18"); };
D
import std.math, std.traits; CommonType!(T1, T2, T3)[] naiveQR(T1, T2, T3) (in T1 a, in T2 b, in T3 c) pure nothrow if (isFloatingPoint!T1) { alias typeof(typeof(return)[0]) ReturnT; if (a == 0) return [cast(ReturnT)c / b]; // it's a linear function immutable ReturnT det = b ^^ 2 - 4 * a * c; if (det < 0) return []; // no real number root immutable SD = sqrt(det); return [(-b + SD) / 2 * a, (-b - SD) / 2 * a]; } CommonType!(T1, T2, T3)[] cautiQR(T1, T2, T3) (in T1 a, in T2 b, in T3 c) pure nothrow if (isFloatingPoint!T1) { alias typeof(typeof(return)[0]) ReturnT; if (a == 0) return [cast(ReturnT)c / b]; // it's a linear function immutable ReturnT det = b ^^ 2 - 4 * a * c; if (det < 0) return []; // no real number root immutable SD = sqrt(det); if (b * a < 0) { immutable x = (-b + SD) / 2 * a; return [x, c / (a * x)]; } else { immutable x = (-b - SD) / 2 * a; return [c / (a * x), x]; } } void main() { import std.stdio; writeln("With 32 bit float type:"); writefln(" Naive: [%(%g, %)]", naiveQR(1.0f, -10e5f, 1.0f)); writefln("Cautious: [%(%g, %)]", cautiQR(1.0f, -10e5f, 1.0f)); writeln("\nWith 64 bit double type:"); writefln(" Naive: [%(%g, %)]", naiveQR(1.0, -10e5, 1.0)); writefln("Cautious: [%(%g, %)]", cautiQR(1.0, -10e5, 1.0)); writeln("\nWith 80 bit real type:"); writefln(" Naive: [%(%g, %)]", naiveQR(1.0L, -10e5L, 1.0L)); writefln("Cautious: [%(%g, %)]", cautiQR(1.0L, -10e5L, 1.0L)); }
D
a claim of rights
D
.build_1i1o2_lin33_48k_usbctl_farenddsp/_l_dsp/src/dsp_tables.c.d .build_1i1o2_lin33_48k_usbctl_farenddsp/_l_dsp/src/dsp_tables.c.o .build_1i1o2_lin33_48k_usbctl_farenddsp/_l_dsp/src/dsp_tables.c.pca.xml: C:/Users/user/workspace/lib_dsp/src/dsp_tables.c
D
import core.sys.windows.windows; import std.algorithm : remove; import value : Value; import tools : Writeln; import tools : Writefln; import tools : GET_X_LPARAM; import tools : GET_Y_LPARAM; import event : Event; import event : EventType; import eventtarget : EventListener; import promise : Promise; import node : Node; import node : NodeType; import std.string : split; import std.array : join; alias uint COLORREF; struct COLOR { COLORREF valueNative; } COLOR RGB( ubyte r, ubyte g, ubyte b ) { COLORREF valueNative = ( ( b << 16 ) | ( g << 8 ) | r ); // BGR return COLOR( valueNative ); } struct Style { Value left = 0; Value top = 0; Value right = 0; Value bottom = 0; Value margin = ""; Value marginLeft = 0; Value marginTop = 0; Value marginRight = 0; Value marginBottom = 0; Value padding = ""; Value paddingLeft = 0; Value paddingTop = 0; Value paddingRight = 0; Value paddingBottom = 0; Value borderWidth = ""; Value borderLeftWidth = 0; Value borderTopWidth = 0; Value borderRightWidth = 0; Value borderBottomWidth = 0; Value width = "auto"; Value height = "auto"; Value display = "inline"; Value position = "static"; Value lineHeight = "inherit"; Value wrapLine = 0; Value overflow = "visible"; Value overflowX = "visible"; Value overflowY = "visible"; } struct Computed { union { struct { int left = 0; int top = 0; int right = 0; int bottom = 0; }; RECT rect; } union { struct { int marginLeft = 0; int marginTop = 0; int marginRight = 0; int marginBottom = 0; }; RECT margin; } union { struct { int paddingLeft = 0; int paddingTop = 0; int paddingRight = 0; int paddingBottom = 0; }; RECT padding; } union { struct { int borderLeftWidth = 0; int borderTopWidth = 0; int borderRightWidth = 0; int borderBottomWidth = 0; }; RECT borderWidth; } WidthMode widthMode = WidthMode.AUTO; int width = 0; HeightMode heightMode = HeightMode.AUTO; int height = 0; DisplayOutside displayOutside = DisplayOutside.INLINE; DisplayInside displayInside = DisplayInside.FLOW; int displayListitem = 0; DisplayInternal displayInternal = DisplayInternal.TABLE_ROW_GROUP; DisplayBox displayBox = DisplayBox.CONTENTS; DisplayLegacy displayLegacy = DisplayLegacy.INLINE_BLOCK; bool displayIsBlockLevel; Position position = Position.STATIC; BoxSizing boxSizing = BoxSizing.CONTENT_BOX; int lineHeight = 12; int wrapLine = 0; Overflow overflowX = Overflow.VISIBLE; Overflow overflowY = Overflow.VISIBLE; Content content; } struct Content { string before; string text; string after; } enum Position { STATIC, RELATIVE, ABSOLUTE, STICKY, FIXED } enum WidthMode { AUTO, LENGTH, PERCENTAGE, MIN_CONTENT, MAX_CONTENT, FIT_CONTENT } enum HeightMode { AUTO, LENGTH, PERCENTAGE, MIN_CONTENT, MAX_CONTENT, FIT_CONTENT } enum BoxSizing { CONTENT_BOX, BORDER_BOX, } enum ElementState { a, b, c, d } enum DisplayOutside { INLINE, BLOCK, RUN_IN } enum DisplayInside { FLOW, FLOW_ROOT, TABLE, FLEX, GRID, RUBY } enum DisplayBox { CONTENTS, NONE } enum DisplayInternal { TABLE_ROW_GROUP, TABLE_HEADER_GROUP, TABLE_FOOTER_GROUP, TABLE_ROW, TABLE_CELL, TABLE_COLUMN_GROUP, TABLE_COLUMN, TABLE_CAPTION, RUBY_BASE, RUBY_TEXT, RUBY_BASE_CONTAINER, RUBY_TEXT_CONTAINER } enum DisplayLegacy { INLINE_BLOCK, INLINE_LIST_ITEM, INLINE_TABLE, INLINE_FLEX, INLINE_GRID } enum Overflow { VISIBLE, HIDDEN, SCROLL, AUTO } struct HTMLCollection { Element*[] items; //Node* firstChild; //Node* lastChild; pragma( inline ) auto length() { return items.length; } Element* item( uint index ) { return items[ index ]; } } struct Element { Node node = { nodeType: NodeType.ELEMENT }; ElementState elementState; Style style; // attributes Computed computed; string[] classList; Element* offsetParent; // computed only union { struct { int offsetLeft; // computed only int offsetTop; // computed only int offsetRight; // computed only int offsetBottom; // computed only }; RECT offset; } int offsetWidth; // computed only int offsetHeight; // computed only // pragma( inline ) bool hidden() { return ( comuted.display == Display.NONE ) ? true : false; } // void className( string newClassName ) { classList = newClassName.split( " " ); } string className() { return classList.join( " " ); } uint childElementCount() { if ( firstElementChild is null ) { return 0; } else { uint counter; for ( auto c = firstElementChild; c !is null; c = c.nextElementSibling ) counter++; return counter; } }; HTMLCollection* children() { auto collection = new HTMLCollection(); // return collection; } uint clientHeight; uint clientLeft; uint clientTop; uint clientWidth; // content.width + padding.width ( no borders, no margins ) pragma( inline ) Element* firstElementChild() nothrow { return cast( Element* ) node.firstChild; } string id; pragma( inline ) Element* lastElementChild() nothrow { return cast( Element* ) node.lastChild; } pragma( inline ) Element* nextElementSibling() nothrow { return cast( Element* ) node.nextSibling; } pragma( inline ) Element* previousElementSibling() nothrow { return cast( Element* ) node.previousSibling; } int scrollHeight; int scrollLeft; int scrollTop; int scrollWidth; string tagName; Element* addChild( Element* c ) nothrow { return cast( Element* ) node.appendChild( cast( Node* ) c ); } void addEventListener( EventType type, EventListener* listener ) { // } Element* closest( string selector ) { Element* scan = &this; do { if ( scan.matches( selector ) ) { return scan; } scan = scan.parentElement; } while ( scan !is null ); return null; } bool dispatchEvent( Event* event ) nothrow { bool cancelled = false; switch ( event.msg.message ) { case WM_LBUTTONDOWN: { POINT pt; pt.x = GET_X_LPARAM( event.msg.lParam ); pt.y = GET_Y_LPARAM( event.msg.lParam ); if ( HitTest( pt ) ) { MouseClick(); } break; } default: } // To Childs if ( firstElementChild !is null ) { for( auto c = firstElementChild; c !is null; c = c.nextElementSibling ) { c.dispatchEvent( event ); } } return cancelled; } Element* find() { return null; } Element*[] findAll() { return []; } auto getAttribute( string attributeName )() { return __traits( getMember, style, attributeName ); } void getBoundingClientRect( RECT* rect ) { // возвращает размер элемента и его позицию относительно viewport // ( часть страницы, показанная на экране, и которую мы видим ). // *rect = boundingClientRect; } HTMLCollection* getElementsByClassName( string names ) { auto collection = new HTMLCollection(); // return collection; } HTMLCollection* getElementsByTagName()( string tagName ) { auto collection = new HTMLCollection(); // return collection; } pragma( inline ) bool hasAttribute( string attName )() { return __traits( getMember, style, attName ).modiied; } void insertAdjacentHTML( string position, string text ) { // } bool matches( string selector ) { // return false; } Element* parentElement() nothrow { return cast( Element* ) node.parentNode; } Node* querySelector( string[] selectors ) { return null; } Node*[] querySelectorAll( string[] selectors ) { return []; } Node* remove() { return node.parentNode.removeChild( cast( Node* ) &this ); } void removeAttribute( string attrName )() { __traits( getMember, style, attrName ).modiied = false; } Element* removeChild( Element* c ) nothrow { return cast( Element* ) node.removeChild( cast( Node* ) c ); } void removeEventListener( EventType type, EventListener* listener ) { // } Promise requestFullscreen() { auto promise = new Promise(); return promise; } void scrollIntoView() { // } void setAttribute( T )( string name, T value ) { __traits( getMember, style, name ) = value; } void foreachChild( void function( Element* node ) callback ) { if ( firstElementChild !is null ) { for( auto c = firstElementChild; c !is null; c = c.nextElementSibling ) { callback( c ); } } } // bool HitTest( POINT pt ) nothrow { return cast( bool ) PtInRect( &computed.rect, pt ); } void MouseClick() nothrow { Writefln( "MouseClick()" ); } }
D
/Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/NIOHTTP1.build/HTTPPipelineSetup.swift.o : /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/NIOHTTP1/HTTPPipelineSetup.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/NIOHTTP1/HTTPDecoder.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/NIOHTTP1/HTTPEncoder.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/NIOHTTP1/HTTPUpgradeHandler.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/NIOHTTP1/HTTPServerPipelineHandler.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/NIOHTTP1/HTTPServerProtocolErrorHandler.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/NIOHTTP1/HTTPResponseCompressor.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/NIOHTTP1/HTTPTypes.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/NIOHTTP1/ByteCollectionUtils.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/NIO.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 /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.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/SwiftOnoneSupport.swiftmodule /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/CNIOZlib/include/CNIOZlib.h /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/cpp_magic.h /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/CNIOLinux/include/ifaddrs-android.h /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/CNIODarwin/include/CNIODarwin.h /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/CNIOHTTPParser/include/CNIOHTTPParser.h /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/CNIOHTTPParser/include/c_nio_http_parser.h /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.h /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/CNIOSHA1.build/module.modulemap /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/CNIOOpenSSL.build/module.modulemap /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/CCryptoOpenSSL.build/module.modulemap /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/CNIOZlib.build/module.modulemap /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/CNIODarwin.build/module.modulemap /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/CNIOHTTPParser.build/module.modulemap /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/CNIOAtomics.build/module.modulemap /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/CNIOLinux.build/module.modulemap /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio-zlib-support/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/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/Darwin.apinotes /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/NIOHTTP1.build/HTTPPipelineSetup~partial.swiftmodule : /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/NIOHTTP1/HTTPPipelineSetup.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/NIOHTTP1/HTTPDecoder.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/NIOHTTP1/HTTPEncoder.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/NIOHTTP1/HTTPUpgradeHandler.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/NIOHTTP1/HTTPServerPipelineHandler.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/NIOHTTP1/HTTPServerProtocolErrorHandler.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/NIOHTTP1/HTTPResponseCompressor.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/NIOHTTP1/HTTPTypes.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/NIOHTTP1/ByteCollectionUtils.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/NIO.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 /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.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/SwiftOnoneSupport.swiftmodule /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/CNIOZlib/include/CNIOZlib.h /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/cpp_magic.h /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/CNIOLinux/include/ifaddrs-android.h /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/CNIODarwin/include/CNIODarwin.h /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/CNIOHTTPParser/include/CNIOHTTPParser.h /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/CNIOHTTPParser/include/c_nio_http_parser.h /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.h /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/CNIOSHA1.build/module.modulemap /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/CNIOOpenSSL.build/module.modulemap /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/CCryptoOpenSSL.build/module.modulemap /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/CNIOZlib.build/module.modulemap /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/CNIODarwin.build/module.modulemap /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/CNIOHTTPParser.build/module.modulemap /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/CNIOAtomics.build/module.modulemap /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/CNIOLinux.build/module.modulemap /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio-zlib-support/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/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/Darwin.apinotes /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/NIOHTTP1.build/HTTPPipelineSetup~partial.swiftdoc : /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/NIOHTTP1/HTTPPipelineSetup.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/NIOHTTP1/HTTPDecoder.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/NIOHTTP1/HTTPEncoder.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/NIOHTTP1/HTTPUpgradeHandler.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/NIOHTTP1/HTTPServerPipelineHandler.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/NIOHTTP1/HTTPServerProtocolErrorHandler.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/NIOHTTP1/HTTPResponseCompressor.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/NIOHTTP1/HTTPTypes.swift /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/NIOHTTP1/ByteCollectionUtils.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/NIO.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 /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/NIOConcurrencyHelpers.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/SwiftOnoneSupport.swiftmodule /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/CNIOZlib/include/CNIOZlib.h /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/cpp_magic.h /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/CNIOLinux/include/ifaddrs-android.h /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/CNIODarwin/include/CNIODarwin.h /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/CNIOHTTPParser/include/CNIOHTTPParser.h /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/CNIOHTTPParser/include/c_nio_http_parser.h /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.h /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/CNIOSHA1.build/module.modulemap /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/CNIOOpenSSL.build/module.modulemap /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/CCryptoOpenSSL.build/module.modulemap /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/CNIOZlib.build/module.modulemap /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/CNIODarwin.build/module.modulemap /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/CNIOHTTPParser.build/module.modulemap /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/CNIOAtomics.build/module.modulemap /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/x86_64-apple-macosx/debug/CNIOLinux.build/module.modulemap /Users/mhassanin/Developer/CupcakeVapor/CupcakeCorner/.build/checkouts/swift-nio-zlib-support/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/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/Darwin.apinotes
D