code
stringlengths
3
10M
language
stringclasses
31 values
//Org: s.newsgroup: Andrej Mitrovic 25 4 2011 //#would've though 1 and not 3 import std.stdio; import std.string; void main() { struct ASIOChannelInfo { int channel; int isInput; int isActive; int channelGroup; int type; string name; } auto info = ASIOChannelInfo(1, 1, 1, 16, 32, "Analog OUT"); auto fields = __traits(allMembers, typeof(info)); auto values = info.tupleof; int maxWidth = 0; foreach ( fieldv; values) { string field = format("%s", fieldv ); if ( field.length > maxWidth ) maxWidth = field.length; } maxWidth += 3; //#would've thought 1 and not 3 foreach (index, value; values) { string field = format("%s", fields[ index ] ); write( field ); foreach( space; 0 .. maxWidth - field.length ) write( index % 2 ? (space % 2 ? ' ' : '-') : ' ' ); writeln( value ); } }
D
/Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/build/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Charts.build/Objects-normal/x86_64/ChartDataEntry.o : /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/ChartData.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/CombinedChartData.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/PieChartData.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/BubbleChartData.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/BarLineScatterCandleBubbleChartData.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/CandleChartData.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/LineChartData.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/BarChartData.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/RadarChartData.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/ScatterChartData.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Jobs/ViewPortJob.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Jobs/AnimatedViewPortJob.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Jobs/MoveViewJob.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Jobs/AnimatedMoveViewJob.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Jobs/ZoomViewJob.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Jobs/AnimatedZoomViewJob.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Components/Legend.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Components/MarkerImage.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Highlight/Range.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Components/ChartLimitLine.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/ChartDataRendererBase.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/AxisRendererBase.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Components/AxisBase.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Components/ComponentBase.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Charts/ChartViewBase.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Charts/BarLineChartViewBase.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Charts/PieRadarChartViewBase.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/ChartDataEntryBase.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Animation/ChartAnimationEasing.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Utils/Fill.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Utils/Platform.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Components/Description.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Interfaces/ChartDataProvider.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Interfaces/CombinedChartDataProvider.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Interfaces/BubbleChartDataProvider.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Interfaces/BarLineScatterCandleBubbleChartDataProvider.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Interfaces/CandleChartDataProvider.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Interfaces/LineChartDataProvider.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Interfaces/BarChartDataProvider.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Interfaces/ScatterChartDataProvider.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Components/IMarker.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Utils/ViewPortHandler.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Utils/Transformer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/Renderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/LegendRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/BarLineScatterCandleBubbleRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/Scatter/IShapeRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/Scatter/XShapeRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/Scatter/CircleShapeRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/Scatter/TriangleShapeRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/Scatter/SquareShapeRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/Scatter/ChevronDownShapeRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/Scatter/ChevronUpShapeRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/Scatter/CrossShapeRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/LineScatterCandleRadarRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/LineRadarRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/XAxisRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/YAxisRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/CombinedChartRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/PieChartRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/BubbleChartRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/LineChartRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/CandleStickChartRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/BarChartRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/HorizontalBarChartRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/RadarChartRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/ScatterChartRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Highlight/IHighlighter.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Highlight/CombinedHighlighter.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Highlight/PieHighlighter.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Highlight/BarHighlighter.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Highlight/HorizontalBarHighlighter.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Highlight/RadarHighlighter.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Highlight/PieRadarHighlighter.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Highlight/ChartHighlighter.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Formatters/IValueFormatter.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Formatters/IAxisValueFormatter.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Formatters/DefaultAxisValueFormatter.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Formatters/IndexAxisValueFormatter.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Formatters/DefaultValueFormatter.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Formatters/IFillFormatter.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Formatters/DefaultFillFormatter.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Animation/Animator.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Filters/DataApproximator.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Utils/ChartColorTemplates.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Components/XAxis.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Components/YAxis.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Utils/ChartUtils.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/ChartBaseDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/ChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Interfaces/IChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/PieChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Interfaces/IPieChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/BubbleChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Interfaces/IBubbleChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/BarLineScatterCandleBubbleChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Interfaces/IBarLineScatterCandleBubbleChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/CandleChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Interfaces/ICandleChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/LineChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Interfaces/ILineChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/BarChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Interfaces/IBarChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/RadarChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Interfaces/IRadarChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/LineScatterCandleRadarChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Interfaces/ILineScatterCandleRadarChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/LineRadarChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Interfaces/ILineRadarChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/ScatterChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Interfaces/IScatterChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Highlight/Highlight.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Utils/TransformerHorizontalBarChart.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/XAxisRendererHorizontalBarChart.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/YAxisRendererHorizontalBarChart.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/XAxisRendererRadarChart.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/YAxisRendererRadarChart.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Components/MarkerView.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Charts/CombinedChartView.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Charts/PieChartView.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Charts/BubbleChartView.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Charts/LineChartView.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Charts/CandleStickChartView.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Charts/BarChartView.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Charts/HorizontalBarChartView.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Charts/RadarChartView.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Charts/ScatterChartView.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/ChartDataEntry.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/PieChartDataEntry.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/BubbleChartDataEntry.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/CandleChartDataEntry.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/BarChartDataEntry.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/RadarChartDataEntry.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Components/LegendEntry.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/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Headers/Public/Charts/Charts.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/build/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Charts.build/Objects-normal/x86_64/ChartDataEntry~partial.swiftmodule : /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/ChartData.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/CombinedChartData.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/PieChartData.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/BubbleChartData.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/BarLineScatterCandleBubbleChartData.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/CandleChartData.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/LineChartData.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/BarChartData.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/RadarChartData.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/ScatterChartData.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Jobs/ViewPortJob.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Jobs/AnimatedViewPortJob.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Jobs/MoveViewJob.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Jobs/AnimatedMoveViewJob.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Jobs/ZoomViewJob.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Jobs/AnimatedZoomViewJob.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Components/Legend.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Components/MarkerImage.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Highlight/Range.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Components/ChartLimitLine.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/ChartDataRendererBase.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/AxisRendererBase.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Components/AxisBase.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Components/ComponentBase.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Charts/ChartViewBase.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Charts/BarLineChartViewBase.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Charts/PieRadarChartViewBase.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/ChartDataEntryBase.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Animation/ChartAnimationEasing.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Utils/Fill.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Utils/Platform.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Components/Description.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Interfaces/ChartDataProvider.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Interfaces/CombinedChartDataProvider.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Interfaces/BubbleChartDataProvider.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Interfaces/BarLineScatterCandleBubbleChartDataProvider.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Interfaces/CandleChartDataProvider.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Interfaces/LineChartDataProvider.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Interfaces/BarChartDataProvider.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Interfaces/ScatterChartDataProvider.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Components/IMarker.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Utils/ViewPortHandler.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Utils/Transformer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/Renderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/LegendRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/BarLineScatterCandleBubbleRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/Scatter/IShapeRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/Scatter/XShapeRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/Scatter/CircleShapeRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/Scatter/TriangleShapeRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/Scatter/SquareShapeRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/Scatter/ChevronDownShapeRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/Scatter/ChevronUpShapeRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/Scatter/CrossShapeRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/LineScatterCandleRadarRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/LineRadarRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/XAxisRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/YAxisRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/CombinedChartRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/PieChartRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/BubbleChartRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/LineChartRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/CandleStickChartRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/BarChartRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/HorizontalBarChartRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/RadarChartRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/ScatterChartRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Highlight/IHighlighter.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Highlight/CombinedHighlighter.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Highlight/PieHighlighter.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Highlight/BarHighlighter.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Highlight/HorizontalBarHighlighter.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Highlight/RadarHighlighter.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Highlight/PieRadarHighlighter.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Highlight/ChartHighlighter.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Formatters/IValueFormatter.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Formatters/IAxisValueFormatter.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Formatters/DefaultAxisValueFormatter.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Formatters/IndexAxisValueFormatter.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Formatters/DefaultValueFormatter.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Formatters/IFillFormatter.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Formatters/DefaultFillFormatter.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Animation/Animator.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Filters/DataApproximator.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Utils/ChartColorTemplates.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Components/XAxis.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Components/YAxis.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Utils/ChartUtils.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/ChartBaseDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/ChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Interfaces/IChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/PieChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Interfaces/IPieChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/BubbleChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Interfaces/IBubbleChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/BarLineScatterCandleBubbleChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Interfaces/IBarLineScatterCandleBubbleChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/CandleChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Interfaces/ICandleChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/LineChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Interfaces/ILineChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/BarChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Interfaces/IBarChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/RadarChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Interfaces/IRadarChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/LineScatterCandleRadarChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Interfaces/ILineScatterCandleRadarChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/LineRadarChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Interfaces/ILineRadarChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/ScatterChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Interfaces/IScatterChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Highlight/Highlight.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Utils/TransformerHorizontalBarChart.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/XAxisRendererHorizontalBarChart.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/YAxisRendererHorizontalBarChart.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/XAxisRendererRadarChart.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/YAxisRendererRadarChart.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Components/MarkerView.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Charts/CombinedChartView.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Charts/PieChartView.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Charts/BubbleChartView.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Charts/LineChartView.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Charts/CandleStickChartView.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Charts/BarChartView.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Charts/HorizontalBarChartView.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Charts/RadarChartView.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Charts/ScatterChartView.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/ChartDataEntry.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/PieChartDataEntry.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/BubbleChartDataEntry.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/CandleChartDataEntry.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/BarChartDataEntry.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/RadarChartDataEntry.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Components/LegendEntry.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/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Headers/Public/Charts/Charts.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/build/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Charts.build/Objects-normal/x86_64/ChartDataEntry~partial.swiftdoc : /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/ChartData.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/CombinedChartData.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/PieChartData.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/BubbleChartData.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/BarLineScatterCandleBubbleChartData.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/CandleChartData.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/LineChartData.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/BarChartData.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/RadarChartData.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/ScatterChartData.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Jobs/ViewPortJob.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Jobs/AnimatedViewPortJob.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Jobs/MoveViewJob.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Jobs/AnimatedMoveViewJob.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Jobs/ZoomViewJob.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Jobs/AnimatedZoomViewJob.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Components/Legend.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Components/MarkerImage.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Highlight/Range.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Components/ChartLimitLine.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/ChartDataRendererBase.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/AxisRendererBase.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Components/AxisBase.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Components/ComponentBase.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Charts/ChartViewBase.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Charts/BarLineChartViewBase.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Charts/PieRadarChartViewBase.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/ChartDataEntryBase.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Animation/ChartAnimationEasing.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Utils/Fill.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Utils/Platform.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Components/Description.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Interfaces/ChartDataProvider.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Interfaces/CombinedChartDataProvider.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Interfaces/BubbleChartDataProvider.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Interfaces/BarLineScatterCandleBubbleChartDataProvider.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Interfaces/CandleChartDataProvider.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Interfaces/LineChartDataProvider.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Interfaces/BarChartDataProvider.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Interfaces/ScatterChartDataProvider.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Components/IMarker.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Utils/ViewPortHandler.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Utils/Transformer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/Renderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/LegendRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/BarLineScatterCandleBubbleRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/Scatter/IShapeRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/Scatter/XShapeRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/Scatter/CircleShapeRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/Scatter/TriangleShapeRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/Scatter/SquareShapeRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/Scatter/ChevronDownShapeRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/Scatter/ChevronUpShapeRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/Scatter/CrossShapeRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/LineScatterCandleRadarRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/LineRadarRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/XAxisRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/YAxisRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/CombinedChartRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/PieChartRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/BubbleChartRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/LineChartRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/CandleStickChartRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/BarChartRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/HorizontalBarChartRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/RadarChartRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/ScatterChartRenderer.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Highlight/IHighlighter.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Highlight/CombinedHighlighter.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Highlight/PieHighlighter.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Highlight/BarHighlighter.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Highlight/HorizontalBarHighlighter.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Highlight/RadarHighlighter.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Highlight/PieRadarHighlighter.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Highlight/ChartHighlighter.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Formatters/IValueFormatter.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Formatters/IAxisValueFormatter.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Formatters/DefaultAxisValueFormatter.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Formatters/IndexAxisValueFormatter.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Formatters/DefaultValueFormatter.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Formatters/IFillFormatter.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Formatters/DefaultFillFormatter.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Animation/Animator.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Filters/DataApproximator.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Utils/ChartColorTemplates.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Components/XAxis.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Components/YAxis.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Utils/ChartUtils.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/ChartBaseDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/ChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Interfaces/IChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/PieChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Interfaces/IPieChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/BubbleChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Interfaces/IBubbleChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/BarLineScatterCandleBubbleChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Interfaces/IBarLineScatterCandleBubbleChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/CandleChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Interfaces/ICandleChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/LineChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Interfaces/ILineChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/BarChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Interfaces/IBarChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/RadarChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Interfaces/IRadarChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/LineScatterCandleRadarChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Interfaces/ILineScatterCandleRadarChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/LineRadarChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Interfaces/ILineRadarChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/ScatterChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Interfaces/IScatterChartDataSet.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Highlight/Highlight.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Utils/TransformerHorizontalBarChart.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/XAxisRendererHorizontalBarChart.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/YAxisRendererHorizontalBarChart.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/XAxisRendererRadarChart.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Renderers/YAxisRendererRadarChart.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Components/MarkerView.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Charts/CombinedChartView.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Charts/PieChartView.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Charts/BubbleChartView.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Charts/LineChartView.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Charts/CandleStickChartView.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Charts/BarChartView.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Charts/HorizontalBarChartView.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Charts/RadarChartView.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Charts/ScatterChartView.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/ChartDataEntry.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/PieChartDataEntry.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/BubbleChartDataEntry.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/CandleChartDataEntry.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/BarChartDataEntry.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/RadarChartDataEntry.swift /Users/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Charts/Source/Charts/Components/LegendEntry.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/vineshkumar/Documents/Volvo/UD_Hackathon/bms_mobile/ios/Pods/Headers/Public/Charts/Charts.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes
D
module fisherExact; import std.algorithm: sum; import std.container: Array; import core.stdc.stdio: printf; import core.stdc.stdlib: atoi; import core.stdc.math: log, exp; @nogc: void main(const string[] argv) { // checking num of agruments if(argv.length < 2) { printf("Specify number of iterations!\n"); return; } // our contingency table const long[4] data = [ 1982, 3018, 2056, 2944 ]; double pvalue = 0.0; foreach(i; 0..argv[1].ptr.atoi) { pvalue = data.fisherExact; } printf("pvalue = %f\n", pvalue); } Array!double logFactorial(const long n) { Array!double fs; fs.reserve(n+1); fs.insertBack(0); foreach(i; 1..(n+1)) { fs.insertBack(fs[i-1] + log(i)); } return fs; } pragma(inline, true) double logHypergeometricProbability(const ref long[4] data, const ref Array!double fs) { return ( fs[data[0] + data[1]] + fs[data[2] + data[3]] + fs[data[0] + data[2]] + fs[data[1] + data[3]] - fs[data[0]] - fs[data[1]] - fs[data[2]] - fs[data[3]] - fs[data[0] + data[1] + data[2] + data[3]] ); } pragma(inline, false) double fisherExact(const long[4] data) { // sum all table values const grandTotal = data[0..$].sum; // save factorial values for repeated use in the loop below const factorials = logFactorial(grandTotal); // calculate our rejection threshold const pvalThreshold = logHypergeometricProbability(data, factorials); double pvalFraction = 0; for(long i = 0; i <= grandTotal; i++) { if((data[0] + data[1] - i >= 0) && (data[0] + data[2] - i >= 0) && (data[3] - data[0] + i >=0)) { const long[4] temp = [ i, data[0] + data[1] - i, data[0] + data[2] - i, data[3] - data[0] + i ]; double lhgp = logHypergeometricProbability(temp, factorials); if(lhgp <= pvalThreshold) { pvalFraction += exp(lhgp - pvalThreshold); } } } return (exp(pvalThreshold) * pvalFraction); }
D
//#windows version needed for short cut to quit /+ 1 Psalm 32 1 -> A Maskil of David 2 I went for a walk\nand fell down a hole. (notice the \n in there for newline) Keys 1 and 2 - values 'Psalm ..' and 'I went ..' +/ import base; struct Info { string text; string toString() const { return text; } } Info[string] lines; string title, list, linesKeys; enum programName = "Guess Pop"; enum projects = "projects"; /** The Main */ int main(string[] args) { import std.stdio: writeln; scope(exit) { writeln; writeln("###"); writeln("# #"); writeln("###"); writeln("# "); writeln("# "); writeln; } version(OSX) { writeln("This is a Mac version of " ~ programName); } version(Windows) { writeln("This is a Windows version of " ~ programName); } version(linux) { writeln("This is a Linux version of " ~ programName); } int retVal = setupAndStuff(args); if (retVal != 0) { if (retVal == -10) writeln("You must pass a name (eg. './guesspop Joel')"); else writeln("Error in setupAndStuff!"); } return 0; } auto setupAndStuff(in string[] args) { string userName; if (args.length > 1) { import std.string: join; userName = args[1 .. $].join(" "); } else { return -10; } immutable WELCOME = "Welcome, " ~ userName ~ ", to " ~ programName; g_window = new RenderWindow(VideoMode(800, 600), WELCOME); /+ if (setup != 0) { gh("Aborting..."); g_window.close; return -1; } +/ g_checkPoints = true; if (int retVal = jec.setup != 0) { import std.stdio: writefln; writefln("File: %s, Error function: %s, Line: %s, Return value: %s", __FILE__, __FUNCTION__, __LINE__, retVal); return -2; } immutable g_fontSize = 40; g_font = new Font; g_font.loadFromFile("DejaVuSans.ttf"); if (! g_font) { import std.stdio: writeln; writeln("Font not load"); return -3; } //immutable size = 100, lower = 40; immutable size = g_fontSize, lower = g_fontSize / 2; jx = new InputJex(/* position */ Vector2f(0, g_window.getSize.y - size - lower), /* font size */ size, /* header */ "Word: ", /* Type (oneLine, or history) */ InputType.history); jx.setColour(Color(255, 200, 0)); jx.addToHistory(""d); jx.edge = false; g_mode = Mode.edit; g_terminal = true; jx.addToHistory(WELCOME); jx.showHistory = false; g_window.setFramerateLimit(60); g_letterBase = new LetterManager("lemblue.png", 8, 17, Square(0,0, g_window.getSize.x, g_window.getSize.y)); assert(g_letterBase, "Error loading bmp"); updateFileNLetterBase(WELCOME, " - Recall program" ~ newline); g_letterBase.setLockAll(true); string[] files; doProjects(files, /* show */ false); run(files); return 0; } void run(string[] files) { import std.file: readText; import std.path; import std.string; auto helpText = readText("help.txt"); with(g_letterBase) setTextType(TextType.line); scope(exit) g_window.close(); string userInput; bool enterPressed = false; //#enter pressed int prefix; prefix = g_letterBase.count(); auto firstRun = true; auto done = NO; while(! done) { if (! g_window.isOpen()) done = YES; Event event; while(g_window.pollEvent(event)) { if(event.type == event.EventType.Closed) { done = YES; } } version(OSX) if ((Keyboard.isKeyPressed(Keyboard.Key.LSystem) || Keyboard.isKeyPressed(Keyboard.Key.RSystem)) && Keyboard.isKeyPressed(Keyboard.Key.Q)) done = YES; //#windows version needed for short cut to quit // print for prompt, text depending on whether the section has any verses or not if (enterPressed || firstRun) { firstRun = false; enterPressed = false; if (! done) updateFileNLetterBase("Enter query, (Enter 'help' for help):"); g_letterBase.setLockAll(true); prefix = g_letterBase.count(); } // exit program if set to exit else get user input if (done == NO) { import std.string; g_window.clear; g_letterBase.draw(); with( g_letterBase ) { doInput(/* ref: */ enterPressed); update(); //#not much } g_window.display; if (enterPressed) { userInput = g_letterBase.getText[prefix .. $].stripRight; upDateStatus(userInput); if (userInput in lines) { updateFileNLetterBase(lines[userInput]); userInput = ""; continue; } } } if (userInput.length > 0) { import std.string: toLower; // If command not used, the user input is treated as thing typed from memory // Switch on command const args = userInput.split[1 .. $]; switch (userInput.split[0].toLower) { // Display help case "help": updateFileNLetterBase(helpText); break; case "projects": doProjects(files); break; case "load": if (args.length != 1) { updateFileNLetterBase("Wrong amount of parameters!"); break; } string fileName; try { import std.conv; const index = args[0].to!int; if (index >= 0 && index < files.length) fileName = files[index]; else throw new Exception("Index out of bounds"); } catch(Exception e) { updateFileNLetterBase("Input error!"); break; } loadProject(fileName); import std.path: stripExtension; updateFileNLetterBase(fileName.stripExtension, " - project loaded.."); break; case "cls", "clear": clearScreen; updateFileNLetterBase("Screen cleared.."); break; case "list": updateFileNLetterBase(title, "\n\n", list); break; case "keys": updateFileNLetterBase(title, ", Keys: ", linesKeys); break; // quit program case "exit", "quit", "command+q": done = true; break; default: import std.algorithm: startsWith; import std.string: toLower; if (! (userInput.startsWith(";") || userInput.toLower.startsWith("rem"))) updateFileNLetterBase(userInput.split[0], " - Unhandled command, or key .."); break; } } if (enterPressed) { userInput.length = 0; g_letterBase.setLockAll(true); prefix = g_letterBase.count(); } } } /// clear the screen void clearScreen() { g_letterBase.setText(""); } void doProjects(ref string[] files, in bool show = true) { import std.file: dirEntries, SpanMode; import std.path: buildPath, dirSeparator, stripExtension; import std.range: enumerate; import std.string: split; if (show) updateFileNLetterBase("File list:"); files.length = 0; foreach(i, string name; dirEntries(buildPath(projects), "*.{txt}", SpanMode.shallow).enumerate) { import std.conv: to; name = name.split(dirSeparator)[1]; if (show) updateFileNLetterBase(i, " - ", name.stripExtension); files ~= name; } } void loadProject(in string fileName) { import std.conv: to; import std.stdio: File; import std.string: split, replace; import std.path: buildPath; import std.range: enumerate; enum Flag {down, up} Flag listFlag = Flag.down; list.length = 0; linesKeys.length = 0; lines.clear; foreach(i, line; File(buildPath(projects, fileName)).byLine.enumerate) { if (i == 1) title = line.to!string; if (listFlag == Flag.up) { const key = line.split[0].to!string; lines[key] = Info(line[key.length + 1 .. $].to!string); lines[key].text = lines[key].text.replace(`\n`, "\n"); linesKeys ~= key ~ " "; list ~= line.to!string ~ "\n"; } if (line.to!string == "list:") listFlag = Flag.up; } import std.range: popBack; linesKeys.popBack; // get rid of the extra space }
D
module mongod.mongo_h; private import std.socket; private import mongod.bson_h; public static string mongo_error_str[] = ["Connection success!","Could not create a socket.", "An error occured while calling connect().","An error occured while calling getaddrinfo().", "Warning: connected to a non-master node (read-only).","Given rs name doesn't match this replica set.", "Can't find primary _in replica set. Connection closed.", "An error occurred while reading or writing on socket.","The response is not the expected length.", "The command returned with 'ok' value of 0.","The cursor has no more results.", "The cursor has timed _out or is not recognized.","Tailable cursor still alive but no data.", "BSON not valid for the specified op.","BSON object has not been finished."]; /** * @file mongo.h * @brief Main MongoDB Declarations */ /* Copyright 2009-2011 10gen Inc. * * 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. */ //#ifndef _MONGO_H_ //#define _MONGO_H_ //#include "bson.h" //MONGO_EXTERN_C_START public static byte MONGO_MAJOR = 0; public static byte MONGO_MINOR= 4; public static byte MONGO_PATCH= 0; public static byte MONGO_OK= 0; public static byte MONGO_ERROR= -1; public static int MONGO_DEFAULT_PORT= 27017; enum mongo_error_t { MONGO_CONN_SUCCESS = 0, /**< Connection success! */ MONGO_CONN_NO_SOCKET, /**< Could not create a socket. */ MONGO_CONN_FAIL, /**< An error occured while calling connect(). */ MONGO_CONN_ADDR_FAIL, /**< An error occured while calling getaddrinfo(). */ MONGO_CONN_NOT_MASTER, /**< Warning: connected to a non-master node (read-only). */ MONGO_CONN_BAD_SET_NAME, /**< Given rs name doesn't match this replica set. */ MONGO_CONN_NO_PRIMARY, /**< Can't find primary _in replica set. Connection closed. */ MONGO_IO_ERROR, /**< An error occurred while reading or writing on socket. */ MONGO_READ_SIZE_ERROR, /**< The response is not the expected length. */ MONGO_COMMAND_FAILED, /**< The command returned with 'ok' value of 0. */ MONGO_CURSOR_EXHAUSTED, /**< The cursor has no more results. */ MONGO_CURSOR_INVALID, /**< The cursor has timed _out or is not recognized. */ MONGO_CURSOR_PENDING, /**< Tailable cursor still alive but no data. */ MONGO_BSON_INVALID, /**< BSON not valid for the specified op. */ MONGO_BSON_NOT_FINISHED /**< BSON object has not been finished. */ } ; enum { MONGO_CURSOR_MUST_FREE = 1, /**< mongo_cursor_destroy should free cursor. */ MONGO_CURSOR_QUERY_SENT = ( 1<<1 ) /**< Initial query has been sent. */ }; enum { MONGO_INDEX_UNIQUE = ( 1<<0 ), MONGO_INDEX_DROP_DUPS = ( 1<<2 ), MONGO_INDEX_BACKGROUND = ( 1<<3 ), MONGO_INDEX_SPARSE = ( 1<<4 ) }; enum { MONGO_UPDATE_UPSERT = 0x1, MONGO_UPDATE_MULTI = 0x2, MONGO_UPDATE_BASIC = 0x4 }; enum mongo_cursor_opts { MONGO_TAILABLE = ( 1<<1 ), /**< Create a tailable cursor. */ MONGO_SLAVE_OK = ( 1<<2 ), /**< Allow queries on a non-primary node. */ MONGO_NO_CURSOR_TIMEOUT = ( 1<<4 ), /**< Disable cursor timeouts. */ MONGO_AWAIT_DATA = ( 1<<5 ), /**< Momentarily block for more data. */ MONGO_EXHAUST = ( 1<<6 ), /**< Stream _in multiple 'more' packages. */ MONGO_PARTIAL = ( 1<<7 ) /**< Allow reads even if a shard is down. */ }; enum { MONGO_OP_MSG = 1000, MONGO_OP_UPDATE = 2001, MONGO_OP_INSERT = 2002, MONGO_OP_QUERY = 2004, MONGO_OP_GET_MORE = 2005, MONGO_OP_DELETE = 2006, MONGO_OP_KILL_CURSORS = 2007 }; //#pragma pack(1) struct mongo_header{ int len; int id; int responseTo; int op; }; struct mongo_message{ mongo_header head; char data; } ; struct mongo_reply_fields{ int flag; /* FIX THIS COMMENT non-zero on failure */ int64_t cursorID; int start; int num; } ; struct mongo_reply{ mongo_header head; mongo_reply_fields fields; char objs; } ; //#pragma pack() struct mongo_host_port { string host; int port; mongo_host_port *next; } ; struct mongo_replset{ mongo_host_port *seeds; /**< List of seeds provided by the user. */ mongo_host_port *hosts; /**< List of host/ports given by the replica set */ char *name; /**< Name of the replica set. */ bson_bool_t primary_connected; /**< Primary node connection status. */ } ; struct mongo { mongo_host_port *primary; /**< Primary connection info. */ mongo_replset *replset; /**< replset object if connected to a replica set. */ Socket sock; /**< Socket file descriptor. */ int flags; /**< Flags on this connection object. */ int conn_timeout_ms; /**< Connection timeout _in milliseconds. */ int op_timeout_ms; /**< Read and write timeout _in milliseconds. */ bson_bool_t connected; /**< Connection status. */ mongo_error_t err; /**< Most recent driver error code. */ char *errstr; /**< String version of most recent driver error code. */ int lasterrcode; /**< getlasterror given by the server on calls. */ char *lasterrstr; /**< getlasterror string generated by server. */ } ; struct mongo_cursor{ mongo_reply *reply; /**< reply is owned by cursor */ mongo *conn; /**< connection is *not* owned by cursor */ char *ns; /**< owned by cursor */ int flags; /**< Flags used internally by this drivers. */ int seen; /**< Number returned so far. */ bson current; /**< This cursor's current bson object. */ mongo_error_t err; /**< Errors on this cursor. */ bson *query; /**< Bitfield containing cursor options. */ bson *fields; /**< Bitfield containing cursor options. */ int options; /**< Bitfield containing cursor options. */ int limit; /**< Bitfield containing cursor options. */ int skip; /**< Bitfield containing cursor options. */ } ;
D
/** * Defines lexical tokens. * * Specification: $(LINK2 https://dlang.org/spec/lex.html#tokens, Tokens) * * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/tokens.d, _tokens.d) * Documentation: https://dlang.org/phobos/dmd_tokens.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/tokens.d */ module dmd.tokens; import core.stdc.ctype; import core.stdc.stdio; import core.stdc.string; import dmd.globals; import dmd.identifier; import dmd.root.ctfloat; import dmd.root.outbuffer; import dmd.root.rmem; import dmd.utf; enum TOK : ushort { reserved, // Other leftParenthesis, rightParenthesis, leftBracket, rightBracket, leftCurly, rightCurly, colon, negate, semicolon, dotDotDot, endOfFile, cast_, null_, assert_, true_, false_, array, call, address, type, throw_, new_, delete_, star, symbolOffset, variable, dotVariable, dotIdentifier, dotTemplateInstance, dotType, slice, arrayLength, version_, module_, dollar, template_, dotTemplateDeclaration, declaration, typeof_, pragma_, dSymbol, typeid_, uadd, remove, newAnonymousClass, comment, arrayLiteral, assocArrayLiteral, structLiteral, classReference, thrownException, delegatePointer, delegateFunctionPointer, // Operators lessThan = 54, greaterThan, lessOrEqual, greaterOrEqual, equal, notEqual, identity, notIdentity, index, is_, leftShift = 64, rightShift, leftShiftAssign, rightShiftAssign, unsignedRightShift, unsignedRightShiftAssign, concatenate, concatenateAssign, // ~= concatenateElemAssign, concatenateDcharAssign, add, min, addAssign, minAssign, mul, div, mod, mulAssign, divAssign, modAssign, and, or, xor, andAssign, orAssign, xorAssign, assign, not, tilde, plusPlus, minusMinus, construct, blit, dot, comma, question, andAnd, orOr, prePlusPlus, preMinusMinus, // Numeric literals int32Literal = 104, uns32Literal, int64Literal, uns64Literal, int128Literal, uns128Literal, float32Literal, float64Literal, float80Literal, imaginary32Literal, imaginary64Literal, imaginary80Literal, // Char constants charLiteral = 116, wcharLiteral, dcharLiteral, // Leaf operators identifier = 119, string_, hexadecimalString, this_, super_, halt, tuple, error, // Basic types void_ = 127, int8, uns8, int16, uns16, int32, uns32, int64, uns64, int128, uns128, float32, float64, float80, imaginary32, imaginary64, imaginary80, complex32, complex64, complex80, char_, wchar_, dchar_, bool_, // Aggregates struct_ = 151, class_, interface_, union_, enum_, import_, alias_, override_, delegate_, function_, mixin_, align_, extern_, private_, protected_, public_, export_, static_, final_, const_, abstract_, debug_, deprecated_, in_, out_, inout_, lazy_, auto_, package_, immutable_, // Statements if_ = 181, else_, while_, for_, do_, switch_, case_, default_, break_, continue_, with_, synchronized_, return_, goto_, try_, catch_, finally_, asm_, foreach_, foreach_reverse_, scope_, onScopeExit, onScopeFailure, onScopeSuccess, // Contracts invariant_ = 205, // Testing unittest_, // Added after 1.0 argumentTypes, ref_, macro_, parameters = 210, traits, overloadSet, pure_, nothrow_, gshared, line, file, fileFullPath, moduleString, // __MODULE__ functionString, // __FUNCTION__ prettyFunction, // __PRETTY_FUNCTION__ shared_, at, pow, powAssign, goesTo, vector, pound, interval = 229, voidExpression, cantExpression, showCtfeContext, objcClassReference, vectorArray, arrow, // -> colonColon, // :: wchar_tLiteral, compoundLiteral, // ( type-name ) { initializer-list } // C only keywords inline, register, restrict, signed, sizeof_, typedef_, unsigned, volatile, _Alignas, _Alignof, _Atomic, _Bool, _Complex, _Generic, _Imaginary, _Noreturn, _Static_assert, _Thread_local, // C only extended keywords __cdecl, __declspec, __attribute__, } enum FirstCKeyword = TOK.inline; // Assert that all token enum members have consecutive values and // that none of them overlap static assert(() { foreach (idx, enumName; __traits(allMembers, TOK)) { static if (idx != __traits(getMember, TOK, enumName)) { pragma(msg, "Error: Expected TOK.", enumName, " to be ", idx, " but is ", __traits(getMember, TOK, enumName)); static assert(0); } } return true; }()); /**************************************** */ private immutable TOK[] keywords = [ TOK.this_, TOK.super_, TOK.assert_, TOK.null_, TOK.true_, TOK.false_, TOK.cast_, TOK.new_, TOK.delete_, TOK.throw_, TOK.module_, TOK.pragma_, TOK.typeof_, TOK.typeid_, TOK.template_, TOK.void_, TOK.int8, TOK.uns8, TOK.int16, TOK.uns16, TOK.int32, TOK.uns32, TOK.int64, TOK.uns64, TOK.int128, TOK.uns128, TOK.float32, TOK.float64, TOK.float80, TOK.bool_, TOK.char_, TOK.wchar_, TOK.dchar_, TOK.imaginary32, TOK.imaginary64, TOK.imaginary80, TOK.complex32, TOK.complex64, TOK.complex80, TOK.delegate_, TOK.function_, TOK.is_, TOK.if_, TOK.else_, TOK.while_, TOK.for_, TOK.do_, TOK.switch_, TOK.case_, TOK.default_, TOK.break_, TOK.continue_, TOK.synchronized_, TOK.return_, TOK.goto_, TOK.try_, TOK.catch_, TOK.finally_, TOK.with_, TOK.asm_, TOK.foreach_, TOK.foreach_reverse_, TOK.scope_, TOK.struct_, TOK.class_, TOK.interface_, TOK.union_, TOK.enum_, TOK.import_, TOK.mixin_, TOK.static_, TOK.final_, TOK.const_, TOK.alias_, TOK.override_, TOK.abstract_, TOK.debug_, TOK.deprecated_, TOK.in_, TOK.out_, TOK.inout_, TOK.lazy_, TOK.auto_, TOK.align_, TOK.extern_, TOK.private_, TOK.package_, TOK.protected_, TOK.public_, TOK.export_, TOK.invariant_, TOK.unittest_, TOK.version_, TOK.argumentTypes, TOK.parameters, TOK.ref_, TOK.macro_, TOK.pure_, TOK.nothrow_, TOK.gshared, TOK.traits, TOK.vector, TOK.overloadSet, TOK.file, TOK.fileFullPath, TOK.line, TOK.moduleString, TOK.functionString, TOK.prettyFunction, TOK.shared_, TOK.immutable_, // C only keywords TOK.inline, TOK.register, TOK.restrict, TOK.signed, TOK.sizeof_, TOK.typedef_, TOK.unsigned, TOK.volatile, TOK._Alignas, TOK._Alignof, TOK._Atomic, TOK._Bool, TOK._Complex, TOK._Generic, TOK._Imaginary, TOK._Noreturn, TOK._Static_assert, TOK._Thread_local, // C only extended keywords TOK.__cdecl, TOK.__declspec, TOK.__attribute__, ]; // Initialize the identifier pool shared static this() nothrow { Identifier.initTable(); foreach (kw; keywords) { //printf("keyword[%d] = '%s'\n",kw, tochars[kw].ptr); Identifier.idPool(Token.tochars[kw].ptr, Token.tochars[kw].length, cast(uint)kw); } } /************************************ * This is used to pick the C keywords out of the tokens. * If it's not a C keyword, then it's an identifier. */ static immutable TOK[TOK.max + 1] Ckeywords = () { with (TOK) { TOK[TOK.max + 1] tab = identifier; // default to identifier enum Ckwds = [ auto_, break_, case_, char_, const_, continue_, default_, do_, float64, else_, enum_, extern_, float32, for_, goto_, if_, inline, int32, int64, register, restrict, return_, int16, signed, sizeof_, static_, struct_, switch_, typedef_, union_, unsigned, void_, volatile, while_, asm_, _Alignas, _Alignof, _Atomic, _Bool, _Complex, _Generic, _Imaginary, _Noreturn, _Static_assert, _Thread_local, __cdecl, __declspec, __attribute__ ]; foreach (kw; Ckwds) tab[kw] = cast(TOK) kw; return tab; } } (); /*********************************************************** */ extern (C++) struct Token { Token* next; Loc loc; const(char)* ptr; // pointer to first character of this token within buffer TOK value; const(char)[] blockComment; // doc comment string prior to this token const(char)[] lineComment; // doc comment for previous token union { // Integers sinteger_t intvalue; uinteger_t unsvalue; // Floats real_t floatvalue; struct { const(char)* ustring; // UTF8 string uint len; ubyte postfix; // 'c', 'w', 'd' } Identifier ident; } extern (D) private static immutable string[TOK.max + 1] tochars = [ // Keywords TOK.this_: "this", TOK.super_: "super", TOK.assert_: "assert", TOK.null_: "null", TOK.true_: "true", TOK.false_: "false", TOK.cast_: "cast", TOK.new_: "new", TOK.delete_: "delete", TOK.throw_: "throw", TOK.module_: "module", TOK.pragma_: "pragma", TOK.typeof_: "typeof", TOK.typeid_: "typeid", TOK.template_: "template", TOK.void_: "void", TOK.int8: "byte", TOK.uns8: "ubyte", TOK.int16: "short", TOK.uns16: "ushort", TOK.int32: "int", TOK.uns32: "uint", TOK.int64: "long", TOK.uns64: "ulong", TOK.int128: "cent", TOK.uns128: "ucent", TOK.float32: "float", TOK.float64: "double", TOK.float80: "real", TOK.bool_: "bool", TOK.char_: "char", TOK.wchar_: "wchar", TOK.dchar_: "dchar", TOK.imaginary32: "ifloat", TOK.imaginary64: "idouble", TOK.imaginary80: "ireal", TOK.complex32: "cfloat", TOK.complex64: "cdouble", TOK.complex80: "creal", TOK.delegate_: "delegate", TOK.function_: "function", TOK.is_: "is", TOK.if_: "if", TOK.else_: "else", TOK.while_: "while", TOK.for_: "for", TOK.do_: "do", TOK.switch_: "switch", TOK.case_: "case", TOK.default_: "default", TOK.break_: "break", TOK.continue_: "continue", TOK.synchronized_: "synchronized", TOK.return_: "return", TOK.goto_: "goto", TOK.try_: "try", TOK.catch_: "catch", TOK.finally_: "finally", TOK.with_: "with", TOK.asm_: "asm", TOK.foreach_: "foreach", TOK.foreach_reverse_: "foreach_reverse", TOK.scope_: "scope", TOK.struct_: "struct", TOK.class_: "class", TOK.interface_: "interface", TOK.union_: "union", TOK.enum_: "enum", TOK.import_: "import", TOK.mixin_: "mixin", TOK.static_: "static", TOK.final_: "final", TOK.const_: "const", TOK.alias_: "alias", TOK.override_: "override", TOK.abstract_: "abstract", TOK.debug_: "debug", TOK.deprecated_: "deprecated", TOK.in_: "in", TOK.out_: "out", TOK.inout_: "inout", TOK.lazy_: "lazy", TOK.auto_: "auto", TOK.align_: "align", TOK.extern_: "extern", TOK.private_: "private", TOK.package_: "package", TOK.protected_: "protected", TOK.public_: "public", TOK.export_: "export", TOK.invariant_: "invariant", TOK.unittest_: "unittest", TOK.version_: "version", TOK.argumentTypes: "__argTypes", TOK.parameters: "__parameters", TOK.ref_: "ref", TOK.macro_: "macro", TOK.pure_: "pure", TOK.nothrow_: "nothrow", TOK.gshared: "__gshared", TOK.traits: "__traits", TOK.vector: "__vector", TOK.overloadSet: "__overloadset", TOK.file: "__FILE__", TOK.fileFullPath: "__FILE_FULL_PATH__", TOK.line: "__LINE__", TOK.moduleString: "__MODULE__", TOK.functionString: "__FUNCTION__", TOK.prettyFunction: "__PRETTY_FUNCTION__", TOK.shared_: "shared", TOK.immutable_: "immutable", TOK.endOfFile: "End of File", TOK.leftCurly: "{", TOK.rightCurly: "}", TOK.leftParenthesis: "(", TOK.rightParenthesis: ")", TOK.leftBracket: "[", TOK.rightBracket: "]", TOK.semicolon: ";", TOK.colon: ":", TOK.comma: ",", TOK.dot: ".", TOK.xor: "^", TOK.xorAssign: "^=", TOK.assign: "=", TOK.construct: "=", TOK.blit: "=", TOK.lessThan: "<", TOK.greaterThan: ">", TOK.lessOrEqual: "<=", TOK.greaterOrEqual: ">=", TOK.equal: "==", TOK.notEqual: "!=", TOK.not: "!", TOK.leftShift: "<<", TOK.rightShift: ">>", TOK.unsignedRightShift: ">>>", TOK.add: "+", TOK.min: "-", TOK.mul: "*", TOK.div: "/", TOK.mod: "%", TOK.slice: "..", TOK.dotDotDot: "...", TOK.and: "&", TOK.andAnd: "&&", TOK.or: "|", TOK.orOr: "||", TOK.array: "[]", TOK.index: "[i]", TOK.address: "&", TOK.star: "*", TOK.tilde: "~", TOK.dollar: "$", TOK.plusPlus: "++", TOK.minusMinus: "--", TOK.prePlusPlus: "++", TOK.preMinusMinus: "--", TOK.type: "type", TOK.question: "?", TOK.negate: "-", TOK.uadd: "+", TOK.variable: "var", TOK.addAssign: "+=", TOK.minAssign: "-=", TOK.mulAssign: "*=", TOK.divAssign: "/=", TOK.modAssign: "%=", TOK.leftShiftAssign: "<<=", TOK.rightShiftAssign: ">>=", TOK.unsignedRightShiftAssign: ">>>=", TOK.andAssign: "&=", TOK.orAssign: "|=", TOK.concatenateAssign: "~=", TOK.concatenateElemAssign: "~=", TOK.concatenateDcharAssign: "~=", TOK.concatenate: "~", TOK.call: "call", TOK.identity: "is", TOK.notIdentity: "!is", TOK.identifier: "identifier", TOK.at: "@", TOK.pow: "^^", TOK.powAssign: "^^=", TOK.goesTo: "=>", TOK.pound: "#", TOK.arrow: "->", TOK.colonColon: "::", // For debugging TOK.error: "error", TOK.dotIdentifier: "dotid", TOK.dotTemplateDeclaration: "dottd", TOK.dotTemplateInstance: "dotti", TOK.dotVariable: "dotvar", TOK.dotType: "dottype", TOK.symbolOffset: "symoff", TOK.arrayLength: "arraylength", TOK.arrayLiteral: "arrayliteral", TOK.assocArrayLiteral: "assocarrayliteral", TOK.structLiteral: "structliteral", TOK.string_: "string", TOK.dSymbol: "symbol", TOK.tuple: "tuple", TOK.declaration: "declaration", TOK.onScopeExit: "scope(exit)", TOK.onScopeSuccess: "scope(success)", TOK.onScopeFailure: "scope(failure)", TOK.delegatePointer: "delegateptr", // Finish up TOK.reserved: "reserved", TOK.remove: "remove", TOK.newAnonymousClass: "newanonclass", TOK.comment: "comment", TOK.classReference: "classreference", TOK.thrownException: "thrownexception", TOK.delegateFunctionPointer: "delegatefuncptr", TOK.int32Literal: "int32v", TOK.uns32Literal: "uns32v", TOK.int64Literal: "int64v", TOK.uns64Literal: "uns64v", TOK.int128Literal: "int128v", TOK.uns128Literal: "uns128v", TOK.float32Literal: "float32v", TOK.float64Literal: "float64v", TOK.float80Literal: "float80v", TOK.imaginary32Literal: "imaginary32v", TOK.imaginary64Literal: "imaginary64v", TOK.imaginary80Literal: "imaginary80v", TOK.charLiteral: "charv", TOK.wcharLiteral: "wcharv", TOK.dcharLiteral: "dcharv", TOK.wchar_tLiteral: "wchar_tv", TOK.compoundLiteral: "compoundliteral", TOK.halt: "halt", TOK.hexadecimalString: "xstring", TOK.interval: "interval", TOK.voidExpression: "voidexp", TOK.cantExpression: "cantexp", TOK.showCtfeContext : "showCtfeContext", TOK.objcClassReference: "class", TOK.vectorArray: "vectorarray", // C only keywords TOK.inline : "inline", TOK.register : "register", TOK.restrict : "restrict", TOK.signed : "signed", TOK.sizeof_ : "sizeof", TOK.typedef_ : "typedef", TOK.unsigned : "unsigned", TOK.volatile : "volatile", TOK._Alignas : "_Alignas", TOK._Alignof : "_Alignof", TOK._Atomic : "_Atomic", TOK._Bool : "_Bool", TOK._Complex : "_Complex", TOK._Generic : "_Generic", TOK._Imaginary: "_Imaginary", TOK._Noreturn : "_Noreturn", TOK._Static_assert : "_Static_assert", TOK._Thread_local : "_Thread_local", // C only extended keywords TOK.__cdecl : "__cdecl", TOK.__declspec : "__declspec", TOK.__attribute__ : "__attribute__", ]; static assert(() { foreach (s; tochars) assert(s.length); return true; }()); nothrow: int isKeyword() const { foreach (kw; keywords) { if (kw == value) return 1; } return 0; } /**** * Set to contents of ptr[0..length] * Params: * ptr = pointer to string * length = length of string */ void setString(const(char)* ptr, size_t length) { auto s = cast(char*)mem.xmalloc_noscan(length + 1); memcpy(s, ptr, length); s[length] = 0; ustring = s; len = cast(uint)length; postfix = 0; } /**** * Set to contents of buf * Params: * buf = string (not zero terminated) */ void setString(const ref OutBuffer buf) { setString(cast(const(char)*)buf[].ptr, buf.length); } /**** * Set to empty string */ void setString() { ustring = ""; len = 0; postfix = 0; } extern (C++) const(char)* toChars() const { __gshared char[3 + 3 * floatvalue.sizeof + 1] buffer; const(char)* p = &buffer[0]; switch (value) { case TOK.int32Literal: sprintf(&buffer[0], "%d", cast(d_int32)intvalue); break; case TOK.uns32Literal: case TOK.charLiteral: case TOK.wcharLiteral: case TOK.dcharLiteral: case TOK.wchar_tLiteral: sprintf(&buffer[0], "%uU", cast(d_uns32)unsvalue); break; case TOK.int64Literal: sprintf(&buffer[0], "%lldL", cast(long)intvalue); break; case TOK.uns64Literal: sprintf(&buffer[0], "%lluUL", cast(ulong)unsvalue); break; case TOK.float32Literal: CTFloat.sprint(&buffer[0], 'g', floatvalue); strcat(&buffer[0], "f"); break; case TOK.float64Literal: CTFloat.sprint(&buffer[0], 'g', floatvalue); break; case TOK.float80Literal: CTFloat.sprint(&buffer[0], 'g', floatvalue); strcat(&buffer[0], "L"); break; case TOK.imaginary32Literal: CTFloat.sprint(&buffer[0], 'g', floatvalue); strcat(&buffer[0], "fi"); break; case TOK.imaginary64Literal: CTFloat.sprint(&buffer[0], 'g', floatvalue); strcat(&buffer[0], "i"); break; case TOK.imaginary80Literal: CTFloat.sprint(&buffer[0], 'g', floatvalue); strcat(&buffer[0], "Li"); break; case TOK.string_: { OutBuffer buf; buf.writeByte('"'); for (size_t i = 0; i < len;) { dchar c; utf_decodeChar(ustring[0 .. len], i, c); switch (c) { case 0: break; case '"': case '\\': buf.writeByte('\\'); goto default; default: if (c <= 0x7F) { if (isprint(c)) buf.writeByte(c); else buf.printf("\\x%02x", c); } else if (c <= 0xFFFF) buf.printf("\\u%04x", c); else buf.printf("\\U%08x", c); continue; } break; } buf.writeByte('"'); if (postfix) buf.writeByte(postfix); buf.writeByte(0); p = buf.extractSlice().ptr; } break; case TOK.hexadecimalString: { OutBuffer buf; buf.writeByte('x'); buf.writeByte('"'); foreach (size_t i; 0 .. len) { if (i) buf.writeByte(' '); buf.printf("%02x", ustring[i]); } buf.writeByte('"'); if (postfix) buf.writeByte(postfix); buf.writeByte(0); p = buf.extractSlice().ptr; break; } case TOK.identifier: case TOK.enum_: case TOK.struct_: case TOK.import_: case TOK.wchar_: case TOK.dchar_: case TOK.bool_: case TOK.char_: case TOK.int8: case TOK.uns8: case TOK.int16: case TOK.uns16: case TOK.int32: case TOK.uns32: case TOK.int64: case TOK.uns64: case TOK.int128: case TOK.uns128: case TOK.float32: case TOK.float64: case TOK.float80: case TOK.imaginary32: case TOK.imaginary64: case TOK.imaginary80: case TOK.complex32: case TOK.complex64: case TOK.complex80: case TOK.void_: p = ident.toChars(); break; default: p = toChars(value); break; } return p; } static const(char)* toChars(uint value) { return toString(value).ptr; } extern (D) static string toString(uint value) pure nothrow @nogc @safe { return tochars[value]; } }
D
/Users/mac/Documents/GitHub/PerfectServer/.build/x86_64-apple-macosx/debug/PerfectCRUD.build/Expression/In.swift.o : /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/PerfectCRUD.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Expression/Like.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Table.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Where.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Database.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Update.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Create.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Delete.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Coding/Coding.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Logging.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Expression/Logical.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Expression/In.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Join.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Expression/Expression.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Expression/Comparison.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Coding/CodingNames.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Coding/CodingBindings.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Coding/CodingKeyPaths.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Coding/CodingJoins.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Expression/InInts.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Expression/ComparisonInts.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Expression/EqualityInts.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Coding/CodingRows.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Select.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Insert.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Expression/Equality.swift /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/XPC.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/ObjectiveC.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Combine.framework/Modules/Combine.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/Dispatch.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/Darwin.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/Foundation.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/CoreFoundation.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/CoreGraphics.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/Swift.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/IOKit.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/SwiftOnoneSupport.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/XPC.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/ObjectiveC.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/Combine.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/Dispatch.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/Darwin.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/Foundation.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/CoreFoundation.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/CoreGraphics.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/Swift.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/IOKit.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/SwiftOnoneSupport.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/mach-o/dyld.modulemap /Users/mac/Documents/GitHub/PerfectServer/.build/x86_64-apple-macosx/debug/PerfectCRUD.build/module.modulemap /Users/mac/Documents/GitHub/PerfectServer/.build/x86_64-apple-macosx/debug/PerfectMySQL.build/module.modulemap /Users/mac/Documents/GitHub/PerfectServer/.build/x86_64-apple-macosx/debug/PerfectCURL.build/module.modulemap /Users/mac/Documents/GitHub/PerfectServer/.build/x86_64-apple-macosx/debug/StORM.build/module.modulemap /Users/mac/Documents/GitHub/PerfectServer/.build/x86_64-apple-macosx/debug/MySQLStORM.build/module.modulemap /Users/mac/Documents/GitHub/PerfectServer/.build/x86_64-apple-macosx/debug/PerfectHTTP.build/module.modulemap /Users/mac/Documents/GitHub/PerfectServer/.build/x86_64-apple-macosx/debug/PerfectLib.build/module.modulemap /Users/mac/Documents/GitHub/PerfectServer/.build/x86_64-apple-macosx/debug/PerfectThread.build/module.modulemap /Users/mac/Documents/GitHub/PerfectServer/.build/x86_64-apple-macosx/debug/PerfectCrypto.build/module.modulemap /Users/mac/Documents/GitHub/PerfectServer/.build/x86_64-apple-macosx/debug/PerfectLogger.build/module.modulemap /Users/mac/Documents/GitHub/PerfectServer/.build/x86_64-apple-macosx/debug/PerfectHTTPServer.build/module.modulemap /Users/mac/Documents/GitHub/PerfectServer/.build/x86_64-apple-macosx/debug/PerfectNet.build/module.modulemap /Users/mac/Documents/GitHub/PerfectServer/.build/x86_64-apple-macosx/debug/SwiftMoment.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/mach-o/compact_unwind_encoding.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/xpc/XPC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/mac/Documents/GitHub/PerfectServer/.build/x86_64-apple-macosx/debug/PerfectCRUD.build/Expression/In~partial.swiftmodule : /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/PerfectCRUD.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Expression/Like.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Table.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Where.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Database.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Update.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Create.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Delete.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Coding/Coding.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Logging.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Expression/Logical.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Expression/In.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Join.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Expression/Expression.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Expression/Comparison.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Coding/CodingNames.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Coding/CodingBindings.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Coding/CodingKeyPaths.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Coding/CodingJoins.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Expression/InInts.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Expression/ComparisonInts.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Expression/EqualityInts.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Coding/CodingRows.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Select.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Insert.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Expression/Equality.swift /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/XPC.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/ObjectiveC.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Combine.framework/Modules/Combine.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/Dispatch.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/Darwin.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/Foundation.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/CoreFoundation.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/CoreGraphics.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/Swift.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/IOKit.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/SwiftOnoneSupport.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/XPC.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/ObjectiveC.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/Combine.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/Dispatch.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/Darwin.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/Foundation.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/CoreFoundation.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/CoreGraphics.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/Swift.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/IOKit.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/SwiftOnoneSupport.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/mach-o/dyld.modulemap /Users/mac/Documents/GitHub/PerfectServer/.build/x86_64-apple-macosx/debug/PerfectCRUD.build/module.modulemap /Users/mac/Documents/GitHub/PerfectServer/.build/x86_64-apple-macosx/debug/PerfectMySQL.build/module.modulemap /Users/mac/Documents/GitHub/PerfectServer/.build/x86_64-apple-macosx/debug/PerfectCURL.build/module.modulemap /Users/mac/Documents/GitHub/PerfectServer/.build/x86_64-apple-macosx/debug/StORM.build/module.modulemap /Users/mac/Documents/GitHub/PerfectServer/.build/x86_64-apple-macosx/debug/MySQLStORM.build/module.modulemap /Users/mac/Documents/GitHub/PerfectServer/.build/x86_64-apple-macosx/debug/PerfectHTTP.build/module.modulemap /Users/mac/Documents/GitHub/PerfectServer/.build/x86_64-apple-macosx/debug/PerfectLib.build/module.modulemap /Users/mac/Documents/GitHub/PerfectServer/.build/x86_64-apple-macosx/debug/PerfectThread.build/module.modulemap /Users/mac/Documents/GitHub/PerfectServer/.build/x86_64-apple-macosx/debug/PerfectCrypto.build/module.modulemap /Users/mac/Documents/GitHub/PerfectServer/.build/x86_64-apple-macosx/debug/PerfectLogger.build/module.modulemap /Users/mac/Documents/GitHub/PerfectServer/.build/x86_64-apple-macosx/debug/PerfectHTTPServer.build/module.modulemap /Users/mac/Documents/GitHub/PerfectServer/.build/x86_64-apple-macosx/debug/PerfectNet.build/module.modulemap /Users/mac/Documents/GitHub/PerfectServer/.build/x86_64-apple-macosx/debug/SwiftMoment.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/mach-o/compact_unwind_encoding.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/xpc/XPC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/mac/Documents/GitHub/PerfectServer/.build/x86_64-apple-macosx/debug/PerfectCRUD.build/Expression/In~partial.swiftdoc : /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/PerfectCRUD.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Expression/Like.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Table.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Where.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Database.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Update.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Create.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Delete.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Coding/Coding.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Logging.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Expression/Logical.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Expression/In.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Join.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Expression/Expression.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Expression/Comparison.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Coding/CodingNames.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Coding/CodingBindings.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Coding/CodingKeyPaths.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Coding/CodingJoins.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Expression/InInts.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Expression/ComparisonInts.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Expression/EqualityInts.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Coding/CodingRows.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Select.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Insert.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Expression/Equality.swift /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/XPC.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/ObjectiveC.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Combine.framework/Modules/Combine.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/Dispatch.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/Darwin.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/Foundation.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/CoreFoundation.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/CoreGraphics.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/Swift.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/IOKit.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/SwiftOnoneSupport.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/XPC.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/ObjectiveC.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/Combine.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/Dispatch.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/Darwin.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/Foundation.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/CoreFoundation.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/CoreGraphics.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/Swift.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/IOKit.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/SwiftOnoneSupport.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/mach-o/dyld.modulemap /Users/mac/Documents/GitHub/PerfectServer/.build/x86_64-apple-macosx/debug/PerfectCRUD.build/module.modulemap /Users/mac/Documents/GitHub/PerfectServer/.build/x86_64-apple-macosx/debug/PerfectMySQL.build/module.modulemap /Users/mac/Documents/GitHub/PerfectServer/.build/x86_64-apple-macosx/debug/PerfectCURL.build/module.modulemap /Users/mac/Documents/GitHub/PerfectServer/.build/x86_64-apple-macosx/debug/StORM.build/module.modulemap /Users/mac/Documents/GitHub/PerfectServer/.build/x86_64-apple-macosx/debug/MySQLStORM.build/module.modulemap /Users/mac/Documents/GitHub/PerfectServer/.build/x86_64-apple-macosx/debug/PerfectHTTP.build/module.modulemap /Users/mac/Documents/GitHub/PerfectServer/.build/x86_64-apple-macosx/debug/PerfectLib.build/module.modulemap /Users/mac/Documents/GitHub/PerfectServer/.build/x86_64-apple-macosx/debug/PerfectThread.build/module.modulemap /Users/mac/Documents/GitHub/PerfectServer/.build/x86_64-apple-macosx/debug/PerfectCrypto.build/module.modulemap /Users/mac/Documents/GitHub/PerfectServer/.build/x86_64-apple-macosx/debug/PerfectLogger.build/module.modulemap /Users/mac/Documents/GitHub/PerfectServer/.build/x86_64-apple-macosx/debug/PerfectHTTPServer.build/module.modulemap /Users/mac/Documents/GitHub/PerfectServer/.build/x86_64-apple-macosx/debug/PerfectNet.build/module.modulemap /Users/mac/Documents/GitHub/PerfectServer/.build/x86_64-apple-macosx/debug/SwiftMoment.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/mach-o/compact_unwind_encoding.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/xpc/XPC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes /Users/mac/Documents/GitHub/PerfectServer/.build/x86_64-apple-macosx/debug/PerfectCRUD.build/Expression/In~partial.swiftsourceinfo : /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/PerfectCRUD.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Expression/Like.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Table.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Where.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Database.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Update.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Create.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Delete.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Coding/Coding.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Logging.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Expression/Logical.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Expression/In.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Join.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Expression/Expression.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Expression/Comparison.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Coding/CodingNames.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Coding/CodingBindings.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Coding/CodingKeyPaths.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Coding/CodingJoins.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Expression/InInts.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Expression/ComparisonInts.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Expression/EqualityInts.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Coding/CodingRows.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Select.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Insert.swift /Users/mac/Documents/GitHub/PerfectServer/.build/checkouts/Perfect-CRUD/Sources/PerfectCRUD/Expression/Equality.swift /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/XPC.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/ObjectiveC.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Combine.framework/Modules/Combine.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/Dispatch.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/Darwin.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/Foundation.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/CoreFoundation.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/CoreGraphics.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/Swift.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/IOKit.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/swift/SwiftOnoneSupport.swiftmodule/x86_64-apple-macos.swiftinterface /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/XPC.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/ObjectiveC.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/Combine.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/Dispatch.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/Darwin.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/Foundation.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/CoreFoundation.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/CoreGraphics.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/Swift.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/IOKit.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/11.3/SwiftOnoneSupport.swiftmodule/x86_64-apple-macos.swiftmodule /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/mach-o/dyld.modulemap /Users/mac/Documents/GitHub/PerfectServer/.build/x86_64-apple-macosx/debug/PerfectCRUD.build/module.modulemap /Users/mac/Documents/GitHub/PerfectServer/.build/x86_64-apple-macosx/debug/PerfectMySQL.build/module.modulemap /Users/mac/Documents/GitHub/PerfectServer/.build/x86_64-apple-macosx/debug/PerfectCURL.build/module.modulemap /Users/mac/Documents/GitHub/PerfectServer/.build/x86_64-apple-macosx/debug/StORM.build/module.modulemap /Users/mac/Documents/GitHub/PerfectServer/.build/x86_64-apple-macosx/debug/MySQLStORM.build/module.modulemap /Users/mac/Documents/GitHub/PerfectServer/.build/x86_64-apple-macosx/debug/PerfectHTTP.build/module.modulemap /Users/mac/Documents/GitHub/PerfectServer/.build/x86_64-apple-macosx/debug/PerfectLib.build/module.modulemap /Users/mac/Documents/GitHub/PerfectServer/.build/x86_64-apple-macosx/debug/PerfectThread.build/module.modulemap /Users/mac/Documents/GitHub/PerfectServer/.build/x86_64-apple-macosx/debug/PerfectCrypto.build/module.modulemap /Users/mac/Documents/GitHub/PerfectServer/.build/x86_64-apple-macosx/debug/PerfectLogger.build/module.modulemap /Users/mac/Documents/GitHub/PerfectServer/.build/x86_64-apple-macosx/debug/PerfectHTTPServer.build/module.modulemap /Users/mac/Documents/GitHub/PerfectServer/.build/x86_64-apple-macosx/debug/PerfectNet.build/module.modulemap /Users/mac/Documents/GitHub/PerfectServer/.build/x86_64-apple-macosx/debug/SwiftMoment.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/mach-o/compact_unwind_encoding.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/xpc/XPC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
D
/code/target/lambda/release/build/serde_derive-89e77db2b46f515c/build_script_build-89e77db2b46f515c: /root/.cargo/registry/src/github.com-1ecc6299db9ec823/serde_derive-1.0.114/build.rs /code/target/lambda/release/build/serde_derive-89e77db2b46f515c/build_script_build-89e77db2b46f515c.d: /root/.cargo/registry/src/github.com-1ecc6299db9ec823/serde_derive-1.0.114/build.rs /root/.cargo/registry/src/github.com-1ecc6299db9ec823/serde_derive-1.0.114/build.rs:
D
module gfmod.opengl.opengl; import core.stdc.stdlib; import std.string, std.conv, std.exception, std.array, std.algorithm; import derelict.util.exception, derelict.opengl3.gl3; import std.experimental.logger; import gfmod.core.text, gfmod.opengl.textureunit; /// The one exception type thrown in this wrapper. /// A failing OpenGL function should <b>always</b> throw an $(D OpenGLException). class OpenGLException : Exception { public { @safe pure nothrow this(string message, string file =__FILE__, size_t line = __LINE__, Throwable next = null) { super(message, file, line, next); } } } /// This object is passed around to other OpenGL wrapper objects /// to ensure library loading. /// Create one to use OpenGL. final class OpenGL { public { enum Vendor { AMD, Apple, // for software rendering aka no driver Intel, Mesa, Microsoft, // for "GDI generic" aka no driver NVIDIA, other } /// Load OpenGL library, redirect debug output to our logger. /// You can pass a null logger if you don't want logging. /// Throws: $(D OpenGLException) on error. this(Logger logger) @system { _logger = logger is null ? new NullLogger() : logger; try { DerelictGL3.load(); } catch(DerelictException e) { throw new OpenGLException(e.msg, __FILE__, __LINE__, e); } //DerelictGL.load(); // load deprecated functions too _logger.infof("OpenGL loaded, version %s", DerelictGL3.loadedVersion()); // do not log here since unimportant errors might happen: // no context is necessarily created at this point getLimits(false); _textureUnits = new TextureUnits(this); } /// Unload the OpenGL library. /// /// Also checks for and logs any OpenGL objects that were not deleted to detect /// leaks. ~this() { logGLLeaks(); close(); } /// Assume any existing OpenGL objects are leaks and write them into the log. /// /// Should only be called when no GL objects should exist, e.g. after deleting /// all GL objects. Called automatically by the OpenGL destructor. void logGLLeaks() { // Yeah, this is a pretty ugly hack. But it works. GLuint maxID = 100000; foreach(id; 0 .. maxID) { void leak(string type, GLuint id) { _logger.errorf("Leaked a %s OpenGL object. Handle: %s", type, id); } if(glIsTexture(id)) { leak("texture", id); } else if(glIsBuffer(id)) { leak("buffer", id); } else if(glIsFramebuffer(id)) { leak("framebuffer", id); } else if(glIsRenderbuffer(id)) { leak("renderbuffer", id); } else if(glIsVertexArray(id)) { leak("vertex array", id); } else if(glIsShader(id)) { leak("shader handle", id); } else if(glIsQuery(id)) { leak("query", id); } else if(glIsProgram(id)) { leak("program", id); } // These are not present in (our base requirement) OpenGL 3.0 so we // check if they're available. else if(glIsSampler !is null && glIsSampler(id)) { leak("sampler", id); } else if(glIsTransformFeedback !is null && glIsTransformFeedback(id)) { leak("transform feedback", id); } else if(glIsProgramPipeline !is null && glIsProgramPipeline(id)) { leak("program pipeline", id); } } } /// Returns: true if the OpenGL extension is supported. bool supportsExtension(string extension) { foreach(s; _extensions) if (s == extension) return true; return false; } /// Reload OpenGL function pointers. /// Once a first OpenGL context has been created, /// you should call reload() to get the context you want. GLVersion reload() @system { GLVersion result; try { result = DerelictGL3.reload(); } catch(DerelictException e) { throw new OpenGLException(e.msg, __FILE__, __LINE__, e); } _logger.infof("OpenGL reloaded, version %s", DerelictGL3.loadedVersion()); _logger.infof(" Version: %s", getVersionString()); _logger.infof(" Renderer: %s", getRendererString()); _logger.infof(" Vendor: %s", getVendorString()); _logger.infof(" GLSL version: %s", getGLSLVersionString()); runtimeCheck(); // parse extensions _extensions = getExtensionsStrings(); runtimeCheck(); _logger.infof(" Extensions: %s found", _extensions.length); _logger.infof(" - EXT_texture_filter_anisotropic is%s supported", EXT_texture_filter_anisotropic() ? "": " not"); _logger.infof(" - EXT_framebuffer_object is%s supported", EXT_framebuffer_object() ? "": " not"); _logger.info("Extensions:"); _logger.info(_extensions); getLimits(true); _textureUnits = new TextureUnits(this); debug { // now that the context exists, pipe OpenGL output pipeOpenGLDebugOutput(); } return result; } /// Releases the OpenGL dynamic library. /// All resources should have been released at this point, /// since you won't be able to call any OpenGL function afterwards. void close() { DerelictGL3.unload(); } /// Check for pending OpenGL errors, log a message if there is. /// Only for debug purpose since this check will be disabled in a release build. void debugCheck() { debug { GLint r = glGetError(); if (r != GL_NO_ERROR) { flushGLErrors(); // flush other errors if any _logger.errorf("OpenGL error: %s", getErrorString(r)); assert(false); // break here } } } /** * Checks pending OpenGL errors. * * Returns: true if at least one OpenGL error was pending. OpenGL error status is cleared. */ bool runtimeCheck(string file = __FILE__, int line = __LINE__) @trusted nothrow { GLint r = glGetError(); if (r != GL_NO_ERROR) { string errorString = getErrorString(r); flushGLErrors(); // flush other errors if any _logger.warningf("GL error detected in runtimeCheck called " "from file %s, line %s: ", file, line, errorString) .assumeWontThrow; return false; } return true; } /// Sanitize a GL string returned by glGetString/glGetStringi. string sanitizeGLString(const(char)* sZ) { import core.stdc.string: strlen; if (sZ is null) { return "(unknown)"; } // Need to copy the string as it's const char[] text = sZ[0 .. strlen(sZ)].dup; if(!text.sanitizeASCIIInPlace()) { _logger.warning("Invalid (non-ASCII) character in a GL string result"); } return text.assumeUnique(); } /// Returns: OpenGL string returned by $(D glGetString). /// See_also: $(WEB www.opengl.org/sdk/docs/man/xhtml/glGetString.xml) string getString(GLenum name) { const(char)* sZ = glGetString(name); runtimeCheck(); return sanitizeGLString(sZ); } /// Returns: An array of OpenGL strings returned by $(D glGetStringi). /// See_also: $(WEB https://www.opengl.org/wiki/GLAPI/glGetString) string[] getStrings(GLenum pname, int numStrings) { auto result = new string[numStrings]; foreach(uint i, ref str; result) { const(char)* sZ = glGetStringi(pname, i); // If error, return strings we got so far. if(!runtimeCheck()) { return result[0 .. i]; } str = sanitizeGLString(sZ); } return result; } /// Returns: OpenGL version string, can be "major_number.minor_number" or /// "major_number.minor_number.release_number". string getVersionString() { return getString(GL_VERSION); } /// Returns: The company responsible for this OpenGL implementation, so /// that you can plant a giant toxic mushroom below their office. string getVendorString() { return getString(GL_VENDOR); } /// Tries to detect the driver maker. /// Returns: Identified vendor. Vendor getVendor() { string s = getVendorString(); if (canFind(s, "AMD") || canFind(s, "ATI") || canFind(s, "Advanced Micro Devices")) return Vendor.AMD; else if (canFind(s, "NVIDIA") || canFind(s, "nouveau") || canFind(s, "Nouveau")) return Vendor.NVIDIA; else if (canFind(s, "Intel")) return Vendor.Intel; else if (canFind(s, "Mesa")) return Vendor.Mesa; else if (canFind(s, "Microsoft")) return Vendor.Microsoft; else if (canFind(s, "Apple")) return Vendor.Apple; else return Vendor.other; } /// Returns: Name of the renderer. This name is typically specific /// to a particular configuration of a hardware platform. string getRendererString() { return getString(GL_RENDERER); } /// Returns: GLSL version string, can be "major_number.minor_number" or /// "major_number.minor_number.release_number". string getGLSLVersionString() { return getString(GL_SHADING_LANGUAGE_VERSION); } /// Returns: An array of names of supported OpenGL extensions. string[] getExtensionsStrings() { scope(exit) { runtimeCheck(); } const numExtensions = getInteger(GL_NUM_EXTENSIONS, 0, true); runtimeCheck(); return getStrings(GL_EXTENSIONS, numExtensions); } /// Calls $(D glGetIntegerv) and gives back the requested integer. /// Returns: true if $(D glGetIntegerv) succeeded. /// See_also: $(WEB www.opengl.org/sdk/docs/man4/xhtml/glGet.xml). /// Note: It is generally a bad idea to call $(D glGetSomething) since it might stall /// the OpenGL pipeline. bool getInteger(GLenum pname, out int result, string file = __FILE__, int line = __LINE__) nothrow { GLint param; glGetIntegerv(pname, &param); if (runtimeCheck()) { result = param; return true; } else return false; } /// Returns: The requested integer returned by $(D glGetIntegerv) /// or defaultValue if an error occured. /// See_also: $(WEB www.opengl.org/sdk/docs/man4/xhtml/glGet.xml). int getInteger(GLenum pname, GLint defaultValue, bool logging, string file = __FILE__, int line = __LINE__) { int result; if (getInteger(pname, result)) { return result; } else { if (logging) { _logger.warningf("couldn't get OpenGL integer (called from " "file %s, line %s): ID %s", file, line, pname); } return defaultValue; } } /// Returns: The requested float returned by $(D glGetFloatv). /// See_also: $(WEB www.opengl.org/sdk/docs/man4/xhtml/glGet.xml). /// Throws: $(D OpenGLException) if at least one OpenGL error was pending. float getFloat(GLenum pname) { GLfloat res; glGetFloatv(pname, &res); runtimeCheck(); return res; } /// Returns: The requested float returned by $(D glGetFloatv) /// or defaultValue if an error occured. /// See_also: $(WEB www.opengl.org/sdk/docs/man4/xhtml/glGet.xml). float getFloat(GLenum pname, GLfloat defaultValue, bool logging) { try { return getFloat(pname); } catch(OpenGLException e) { if (logging) _logger.warning(e.msg); return defaultValue; } } } package { Logger _logger; static string getErrorString(GLint r) pure nothrow { switch(r) { case GL_NO_ERROR: return "GL_NO_ERROR"; case GL_INVALID_ENUM: return "GL_INVALID_ENUM"; case GL_INVALID_VALUE: return "GL_INVALID_VALUE"; case GL_INVALID_OPERATION: return "GL_INVALID_OPERATION"; case GL_OUT_OF_MEMORY: return "GL_OUT_OF_MEMORY"; // case GL_TABLE_TOO_LARGE: return "GL_TABLE_TOO_LARGE"; // case GL_STACK_OVERFLOW: return "GL_STACK_OVERFLOW"; // case GL_STACK_UNDERFLOW: return "GL_STACK_UNDERFLOW"; default: return "Unknown OpenGL error"; } } } public { /// Returns: Maximum texture size. /// This value should be at least 512 for a conforming OpenGL implementation. int maxTextureSize() pure const nothrow { return _maxTextureSize; } /// Returns: Number of texture units. int maxTextureUnits() pure const nothrow { return _maxTextureUnits; } /// Returns: Number of texture image units usable in a fragment shader. int maxFragmentTextureImageUnits() pure const nothrow { return _maxFragmentTextureImageUnits; } /// Returns: Number of texture image units usable in a vertex shader. int maxVertexImageUnits() pure const nothrow { return _maxVertexTextureImageUnits; } /// Returns: Number of combined texture image units. int maxCombinedImageUnits() pure const nothrow { return _maxCombinedTextureImageUnits; } /// Returns: Maximum number of color attachments. This is the number of targets a fragment shader can output to. /// You can rely on this number being at least 4 if MRT is supported. int maxColorAttachments() pure const nothrow { return _maxColorAttachments; } /// Returns: Texture units abstraction. TextureUnits textureUnits() pure nothrow { return _textureUnits; } /// Returns: Maximum value of anisotropic filter. float maxTextureMaxAnisotropy() pure const nothrow { return _maxTextureMaxAnisotropy; } } private { string[] _extensions; TextureUnits _textureUnits; int _majorVersion = 1; int _minorVersion = 1; int _maxTextureSize; int _maxTextureUnits; // number of conventional units, deprecated int _maxFragmentTextureImageUnits; // max for fragment shader int _maxVertexTextureImageUnits; // max for vertex shader int _maxCombinedTextureImageUnits; // max total int _maxColorAttachments; float _maxTextureMaxAnisotropy; void getLimits(bool logging) { runtimeCheck(); // GL_MAJOR_VERSION/GL_MINOR_VERSION may not always work, so we parse version // string. auto verString = getVersionString().split()[0]; import std.format; bool failedParse = false; // If this can't parse the version string, _majorVersion/_minorVersion will be 1.1 try if(formattedRead(verString, "%s.%s", &_minorVersion, &_majorVersion) < 2) { failedParse = true; } catch(Exception e) { failedParse = true; } if(logging && failedParse) { _logger.warningf("couldn't parse OpenGL version string. " "Assuming version %s.%s", _majorVersion, _minorVersion); } runtimeCheck(); _maxTextureSize = getInteger(GL_MAX_TEXTURE_SIZE, 512, logging); // For other textures, add calls to: // GL_MAX_ARRAY_TEXTURE_LAYERS​, GL_MAX_3D_TEXTURE_SIZE​ _maxTextureUnits = getInteger(GL_MAX_TEXTURE_IMAGE_UNITS, 2, logging); _maxFragmentTextureImageUnits = getInteger(GL_MAX_TEXTURE_IMAGE_UNITS, 2, logging); // odd GL enum name because of legacy reasons (initially only fragment shader could access textures) _maxVertexTextureImageUnits = getInteger(GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS, 2, logging); _maxCombinedTextureImageUnits = getInteger(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, 2, logging); // Get texture unit max for other shader stages with: // GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS, GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS, GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS _maxColorAttachments = getInteger(GL_MAX_COLOR_ATTACHMENTS, 4, logging); if (EXT_texture_filter_anisotropic()) _maxTextureMaxAnisotropy = getFloat(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, 1.0f, logging); else _maxTextureMaxAnisotropy = 1.0f; } // flush out OpenGL errors void flushGLErrors() nothrow { int timeout = 0; while (++timeout <= 5) // avoid infinite loop in a no-driver situation { GLint r = glGetError(); if (r == GL_NO_ERROR) break; } } void pipeOpenGLDebugOutput() { if (KHR_debug()) { glDebugMessageCallback(&loggingCallbackOpenGL, cast(void*)this); // enable all messages glDebugMessageControl(GL_DONT_CARE, GL_DONT_CARE, GL_DONT_CARE, 0, null, GL_TRUE); glEnable(GL_DEBUG_OUTPUT); //glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS); } } } } extern(System) private { // This callback can be called from multiple threads // TODO synchronization for Log objects nothrow void loggingCallbackOpenGL(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const(GLchar)* message, GLvoid* userParam) { try { OpenGL opengl = cast(OpenGL)userParam; try { Logger logger = opengl._logger; string ssource; switch (source) { case GL_DEBUG_SOURCE_API: ssource = "API"; break; case GL_DEBUG_SOURCE_WINDOW_SYSTEM: ssource = "window system"; break; case GL_DEBUG_SOURCE_SHADER_COMPILER: ssource = "shader compiler"; break; case GL_DEBUG_SOURCE_THIRD_PARTY: ssource = "third party"; break; case GL_DEBUG_SOURCE_APPLICATION: ssource = "application"; break; case GL_DEBUG_SOURCE_OTHER: ssource = "other"; break; default: ssource= "unknown"; break; } string stype; switch (type) { case GL_DEBUG_TYPE_ERROR: stype = "error"; break; case GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR: stype = "deprecated behaviour"; break; case GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR: stype = "undefined behaviour"; break; case GL_DEBUG_TYPE_PORTABILITY: stype = "portabiliy"; break; case GL_DEBUG_TYPE_PERFORMANCE: stype = "performance"; break; case GL_DEBUG_TYPE_OTHER: stype = "other"; break; default: stype = "unknown"; break; } LogLevel level; string sseverity; switch (severity) { case GL_DEBUG_SEVERITY_HIGH: level = LogLevel.error; sseverity = "high"; break; case GL_DEBUG_SEVERITY_MEDIUM: level = LogLevel.warning; sseverity = "medium"; break; case GL_DEBUG_SEVERITY_LOW: level = LogLevel.warning; sseverity = "low"; break; case GL_DEBUG_SEVERITY_NOTIFICATION: level = LogLevel.info; sseverity = "notification"; break; default: level = LogLevel.warning; sseverity = "unknown"; break; } // Need to copy message as it's const import core.stdc.string; auto text = FixedString!1024.fromCString(message); if(!text.sanitizeASCIIInPlace()) { logger.warning("Invalid (non-ASCII) character in GL debug output"); } // Spammy NVidia binary driver message that pretty much tells us that the // buffer objects works as it should. if(id == 131185) { return; } // Spammy NVidia binary driver message that tells as that mipmap level // of texture '0' is inconsistent with its min filter // (no idea what causes this, possibly dimgui). // - thought we may be binding '0' somewhere, but that's not the case, // and dimgui textures have no mimpaps afaics. if(id == 131204) { return; } if (level == LogLevel.info) logger.infof("opengl: %s (id: %s, source: %s, type: %s, severity: %s)", text, id, ssource, stype, sseverity); if (level == LogLevel.warning) logger.warningf("opengl: %s (id: %s, source: %s, type: %s, severity: %s)", text, id, ssource, stype, sseverity); if (level == LogLevel.error) logger.errorf("opengl: %s (id: %s, source: %s, type: %s, severity: %s)", text, id, ssource, stype, sseverity); } catch (Exception e) { // got exception while logging, ignore it } } catch (Throwable e) { // No Throwable is supposed to cross C callbacks boundaries // Crash immediately exit(-1); } } } import std.traits; struct FixedBuffer(size_t size, T) if(!hasElaborateDestructor!T) { private: T[size] buffer; size_t used; public: T[] data() @safe pure nothrow @nogc { return buffer[0 .. used]; } alias data this; } struct FixedString(size_t size) { FixedBuffer!(size, char) base; alias base this; this(const char[] data) @safe pure nothrow @nogc { assert(data.length <= size, "FixedString too small to contain assigned data"); buffer[0 .. data.length] = data[]; used = data.length; } static auto fromCString(const char* data) @system pure nothrow @nogc { import core.stdc.string; return FixedString!size(data[0 .. strlen(data)]); } }
D
module ast.Expression; import ast.Instruction; import syntax.Word; import tables.Symbol; class Expression : Instruction { this (Word token) { super (token); } public ref Symbol symbol () { return _symbol; } override void print (int nb = 0) {} override void prettyPrint (int nb = 0) {} override void prettyPrint (OutBuffer buf, int nb = 0) {} private Symbol _symbol; }
D
class Foo { public void f() { } private void g() { } invariant() { f(); // error, cannot call public member function from invariant g(); // ok, g() is not public } }
D
module core.internal.lifetime; import core.lifetime : forward; /+ emplaceRef is a package function for druntime internal use. It works like emplace, but takes its argument by ref (as opposed to "by pointer"). This makes it easier to use, easier to be safe, and faster in a non-inline build. Furthermore, emplaceRef optionally takes a type parameter, which specifies the type we want to build. This helps to build qualified objects on mutable buffer, without breaking the type system with unsafe casts. +/ void emplaceRef(T, UT, Args...)(ref UT chunk, auto ref Args args) { static if (args.length == 0) { static assert(is(typeof({static T i;})), "Cannot emplace a " ~ T.stringof ~ " because " ~ T.stringof ~ ".this() is annotated with @disable."); static if (is(T == class)) static assert(!__traits(isAbstractClass, T), T.stringof ~ " is abstract and it can't be emplaced"); emplaceInitializer(chunk); } else static if ( !is(T == struct) && Args.length == 1 /* primitives, enums, arrays */ || Args.length == 1 && is(typeof({T t = forward!(args[0]);})) /* conversions */ || is(typeof(T(forward!args))) /* general constructors */) { static struct S { T payload; this()(auto ref Args args) { static if (__traits(compiles, payload = forward!args)) payload = forward!args; else payload = T(forward!args); } } if (__ctfe) { static if (__traits(compiles, chunk = T(forward!args))) chunk = T(forward!args); else static if (args.length == 1 && __traits(compiles, chunk = forward!(args[0]))) chunk = forward!(args[0]); else assert(0, "CTFE emplace doesn't support " ~ T.stringof ~ " from " ~ Args.stringof); } else { S* p = () @trusted { return cast(S*) &chunk; }(); static if (UT.sizeof > 0) emplaceInitializer(*p); p.__ctor(forward!args); } } else static if (is(typeof(chunk.__ctor(forward!args)))) { // This catches the rare case of local types that keep a frame pointer emplaceInitializer(chunk); chunk.__ctor(forward!args); } else { //We can't emplace. Try to diagnose a disabled postblit. static assert(!(Args.length == 1 && is(Args[0] : T)), "Cannot emplace a " ~ T.stringof ~ " because " ~ T.stringof ~ ".this(this) is annotated with @disable."); //We can't emplace. static assert(false, T.stringof ~ " cannot be emplaced from " ~ Args[].stringof ~ "."); } } // ditto static import core.internal.traits; void emplaceRef(UT, Args...)(ref UT chunk, auto ref Args args) if (is(UT == core.internal.traits.Unqual!UT)) { emplaceRef!(UT, UT)(chunk, forward!args); } /+ Emplaces T.init. In contrast to `emplaceRef(chunk)`, there are no checks for disabled default constructors etc. +/ void emplaceInitializer(T)(scope ref T chunk) nothrow pure @trusted if (!is(T == const) && !is(T == immutable) && !is(T == inout)) { import core.internal.traits : hasElaborateAssign; static if (__traits(isZeroInit, T)) { import core.stdc.string : memset; memset(cast(void*) &chunk, 0, T.sizeof); } else static if (__traits(isScalar, T) || T.sizeof <= 16 && !hasElaborateAssign!T && __traits(compiles, (){ T chunk; chunk = T.init; })) { chunk = T.init; } else static if (__traits(isStaticArray, T)) { // For static arrays there is no initializer symbol created. Instead, we emplace elements one-by-one. foreach (i; 0 .. T.length) { emplaceInitializer(chunk[i]); } } else { import core.stdc.string : memcpy; const initializer = __traits(initSymbol, T); memcpy(cast(void*)&chunk, initializer.ptr, initializer.length); } } @safe unittest { static void testInitializer(T)() { // mutable T { T dst = void; emplaceInitializer(dst); assert(dst is T.init); } // shared T { shared T dst = void; emplaceInitializer(dst); assert(dst is shared(T).init); } // const T { const T dst = void; static assert(!__traits(compiles, emplaceInitializer(dst))); } } static struct ElaborateAndZero { int a; this(this) {} } static struct ElaborateAndNonZero { int a = 42; this(this) {} } static union LargeNonZeroUnion { byte[128] a = 1; } testInitializer!int(); testInitializer!double(); testInitializer!ElaborateAndZero(); testInitializer!ElaborateAndNonZero(); testInitializer!LargeNonZeroUnion(); static if (is(__vector(double[4]))) { // DMD 2.096 and GDC 11.1 can't compare vectors with `is` so can't use // testInitializer. enum VE : __vector(double[4]) { a = [1.0, 2.0, 3.0, double.nan], b = [4.0, 5.0, 6.0, double.nan], } const VE expected = VE.a; VE dst = VE.b; shared VE sharedDst = VE.b; emplaceInitializer(dst); emplaceInitializer(sharedDst); () @trusted { import core.stdc.string : memcmp; assert(memcmp(&expected, &dst, VE.sizeof) == 0); assert(memcmp(&expected, cast(void*) &sharedDst, VE.sizeof) == 0); }(); static assert(!__traits(compiles, emplaceInitializer(expected))); } } /* Simple swap function. */ void swap(T)(ref T lhs, ref T rhs) { import core.lifetime : move, moveEmplace; T tmp = move(lhs); moveEmplace(rhs, lhs); moveEmplace(tmp, rhs); }
D
/** This module implements a $(LINK2 http://dlang.org/template-mixin.html, template mixin) containing a program to search a list of directories for all .d files therein, then writes a D program to run all unit tests in those files using unit_threaded. The program implemented by this mixin only writes out a D file that itself must be compiled and run. To use this as a runnable program, simply mix in and compile: ----- #!/usr/bin/rdmd import unit_threaded; mixin genUtMain; ----- Generally however, this code will be used by the gen_ut_main dub configuration via `dub run`. By default, genUtMain will look for unit tests in CWD and write a program out to a temporary file. To change the file to write to, use the $(D -f) option. To change what directories to look in, simply pass them in as the remaining command-line arguments. The resulting file is also a program that must be compiled and, when run, will run the unit tests found. By default, it will run all tests. To run one test or all tests in a particular package, pass them in as command-line arguments. The $(D -h) option will list all command-line options. Examples (assuming the generated file is called $(D ut.d)): ----- rdmd -unittest ut.d # run all tests rdmd -unittest ut.d tests.foo tests.bar # run all tests from these packages rdmd ut.d -h # list command-line options ----- */ module unit_threaded.runtime; import std.stdio; import std.array : replace, array, join; import std.conv : to; import std.algorithm : map, filter, startsWith, endsWith, remove; import std.string: strip; import std.exception : enforce; import std.file : exists, DirEntry, dirEntries, isDir, SpanMode, tempDir, getcwd, dirName, mkdirRecurse; import std.path : buildNormalizedPath, buildPath, baseName, relativePath, dirSeparator; mixin template genUtMain() { int main(string[] args) { try { writeUtMainFile(args); return 0; } catch(Exception ex) { import std.stdio: stderr; stderr.writeln(ex.msg); return 1; } } } struct Options { bool verbose; string fileName; string[] dirs; bool help; bool showVersion; string[] includes; string[] files; bool earlyReturn() @safe pure nothrow const { return help || showVersion; } } Options getGenUtOptions(string[] args) { import std.getopt; Options options; auto getOptRes = getopt( args, "verbose|v", "Verbose mode.", &options.verbose, "file|f", "The filename to write. Will use a temporary if not set.", &options.fileName, "I", "Import paths as would be passed to the compiler", &options.includes, "version", "Show version.", &options.showVersion, ); if (getOptRes.helpWanted) { defaultGetoptPrinter("Usage: gen_ut_main [options] [testDir1] [testDir2]...", getOptRes.options); options.help = true; return options; } if (options.showVersion) { writeln("unit_threaded.runtime version v0.6.1"); return options; } options.dirs = args.length <= 1 ? ["."] : args[1 .. $]; if (options.verbose) { writeln(__FILE__, ": finding all test cases in ", options.dirs); } return options; } DirEntry[] findModuleEntries(in Options options) { import std.algorithm: splitter, canFind; import std.array: array, empty; // dub list of files, don't bother reading the filesystem since // dub has done it already if(!options.files.empty && options.dirs == ["."]) { return options.files. filter!(a => a != options.fileName). map!(a => buildNormalizedPath(a)). map!(a => DirEntry(a)) .array; } DirEntry[] modules; foreach (dir; options.dirs) { enforce(isDir(dir), dir ~ " is not a directory name"); auto entries = dirEntries(dir, "*.d", SpanMode.depth); auto normalised = entries.map!(a => buildNormalizedPath(a.name)); bool isHiddenDir(string p) { return p.startsWith("."); } bool anyHiddenDir(string p) { return p.splitter(dirSeparator).canFind!isHiddenDir; } modules ~= normalised. filter!(a => !anyHiddenDir(a)). map!(a => DirEntry(a)).array; } return modules; } string[] findModuleNames(in Options options) { import std.path : dirSeparator, stripExtension, absolutePath; // if a user passes -Isrc and a file is called src/foo/bar.d, // the module name should be foo.bar, not src.foo.bar, // so this function subtracts import path options string relativeToImportDirs(string path) { foreach(string importPath; options.includes) { importPath = relativePath(importPath); if(!importPath.endsWith(dirSeparator)) importPath ~= dirSeparator; if(path.startsWith(importPath)) { return path.replace(importPath, ""); } } return path; } return findModuleEntries(options). filter!(a => a.baseName != "package.d" && a.baseName != "reggaefile.d"). filter!(a => a.absolutePath != options.fileName.absolutePath). map!(a => relativeToImportDirs(a.name)). map!(a => replace(a.stripExtension, dirSeparator, ".")). array; } string writeUtMainFile(string[] args) { auto options = getGenUtOptions(args); return writeUtMainFile(options); } string writeUtMainFile(Options options) { if (options.earlyReturn) { return options.fileName; } return writeUtMainFile(options, findModuleNames(options)); } private string writeUtMainFile(Options options, in string[] modules) { if (!options.fileName) { options.fileName = buildPath(tempDir, getcwd[1..$], "ut.d"); } if(!haveToUpdate(options, modules)) { if(options.verbose) writeln("Not writing to ", options.fileName, ": no changes detected"); return options.fileName; } else { if(options.verbose) writeln("Writing to unit test main file ", options.fileName); } const dirName = options.fileName.dirName; dirName.exists || mkdirRecurse(dirName); auto wfile = File(options.fileName, "w"); wfile.write(modulesDbList(modules)); wfile.writeln(q{ //Automatically generated by unit_threaded.gen_ut_main, do not edit by hand. import std.stdio; import unit_threaded; }); wfile.writeln("int main(string[] args)"); wfile.writeln("{"); wfile.writeln(` writeln("\nAutomatically generated file ` ~ options.fileName.replace("\\", "\\\\") ~ `");`); wfile.writeln(" writeln(`Running unit tests from dirs " ~ options.dirs.to!string ~ "`);"); immutable indent = " "; wfile.writeln(" return runTests!(\n" ~ modules.map!(a => indent ~ `"` ~ a ~ `"`).join(",\n") ~ "\n" ~ indent ~ ")\n" ~ indent ~ "(args);"); wfile.writeln("}"); wfile.close(); return options.fileName; } private bool haveToUpdate(in Options options, in string[] modules) { if (!options.fileName.exists) { return true; } auto file = File(options.fileName); return file.readln.strip != modulesDbList(modules); } //used to not update the file if the file list hasn't changed private string modulesDbList(in string[] modules) @safe pure nothrow { return "//" ~ modules.join(","); }
D
// ********************************************************************* // change keys menu // ********************************************************************* instance MENU_OPT_CONTROLS(C_MENU_DEF) { backpic = MENU_BACK_PIC; items[0] = "MENU_ITEM_CHG_KEYS_HEADLINE"; // Items items[1] = "MENU_ITEM_KEY_UP"; items[2] = "MENU_ITEM_KEY_DOWN"; items[3] = "MENU_ITEM_KEY_LEFT"; items[4] = "MENU_ITEM_KEY_RIGHT"; items[5] = "MENU_ITEM_KEY_STRAFE_LEFT"; items[6] = "MENU_ITEM_KEY_STRAFE_RIGHT"; items[7] = "MENU_ITEM_KEY_JUMPCLIMBSTRAFE"; items[8] = "MENU_ITEM_KEY_RUNMODETOGGLE"; items[9] = "MENU_ITEM_KEY_SNEAK"; items[10] = "MENU_ITEM_KEY_ACTION"; items[11] = "MENU_ITEM_KEY_WEAPON"; items[12] = "MENU_ITEM_KEY_MAP"; items[13] = "MENU_ITEM_KEY_HKEY01"; items[14] = "MENU_ITEM_KEY_HKEY02"; items[15] = "MENU_ITEM_KEY_LOOK"; items[16] = "MENU_ITEM_KEY_INVENTORY"; items[17] = "MENU_ITEM_KEY_SCREEN_STATUS"; items[18] = "MENU_ITEM_KEY_SCREEN_LOG"; // Input items[19] = "MENU_ITEM_INP_UP"; items[20] = "MENU_ITEM_INP_DOWN"; items[21] = "MENU_ITEM_INP_LEFT"; items[22] = "MENU_ITEM_INP_RIGHT"; items[23] = "MENU_ITEM_INP_STRAFE_LEFT"; items[24] = "MENU_ITEM_INP_STRAFE_RIGHT"; items[25] = "MENU_ITEM_INP_JUMPCLIMBSTRAFE"; items[26] = "MENU_ITEM_INP_RUNMODETOGGLE"; items[27] = "MENU_ITEM_INP_SNEAK"; items[28] = "MENU_ITEM_INP_ACTION"; items[29] = "MENU_ITEM_INP_WEAPON"; items[30] = "MENU_ITEM_INP_MAP"; items[31] = "MENU_ITEM_INP_HKEY01"; items[32] = "MENU_ITEM_INP_HKEY02"; items[33] = "MENU_ITEM_INP_LOOK"; items[34] = "MENU_ITEM_INP_INVENTORY"; items[35] = "MENU_ITEM_INP_SCREEN_STATUS"; items[36] = "MENU_ITEM_INP_SCREEN_LOG"; // items[37] = "MENU_ITEM_CHG_KEYS_SET_DEFAULT"; items[38] = "MENU_ITEM_CHG_KEYS_SET_ALTERNATIVE"; items[39] = "MENUITEM_CHG_KEYS_BACK"; items[40] = "MENU_ITEM_NEXTMENU"; flags = flags | MENU_SHOW_INFO; }; instance MENU_ITEM_NEXTMENU(C_MENU_ITEM_DEF) { backpic = MENU_ITEM_BACK_PIC; text[0] = "weitere Tasten..."; text[1] = "weitere Gothic 2 Tasten festlegen"; // Kommentar // Positionen und Dimensionen posx = ctrl_sp1_1 + 2500; posy = ctrl_y_start + ctrl_y_step * 21 + CTRL_GROUP6; dimy = 300; fontName = MENU_FONT_SMALL; // Aktionen onSelAction_S[0]= "MENU_OPT_CONTROLS_EXTKEYS"; onSelAction[0] = SEL_ACTION_STARTMENU; // Weitere Eigenschaften flags = flags | IT_TXT_CENTER; hideIfOptionSectionSet = "GAME"; hideIfOptionSet = "useGothic1Controls"; hideOnValue = 1; }; instance MENU_OPT_CONTROLS_EXTKEYS(C_MENU_DEF) { backpic = MENU_BACK_PIC; items[0] = "MENU_ITEM_CHG_EXTKEYS_HEADLINE"; // Items items[1] = "MENU_ITEM_KEY_WEAPON_LEFT"; items[2] = "MENU_ITEM_KEY_WEAPON_RIGHT"; items[3] = "MENU_ITEM_KEY_WEAPON_PARADE"; items[4] = "MENU_ITEM_KEY_LOCKFOCUS"; items[5] = "MENU_ITEM_KEY_QUICKMANA"; items[6] = "MENU_ITEM_KEY_QUICKHEALTH"; items[7] = "MENU_ITEM_INP_WEAPON_LEFT"; items[8] = "MENU_ITEM_INP_WEAPON_RIGHT"; items[9] = "MENU_ITEM_INP_WEAPON_PARADE"; items[10] = "MENU_ITEM_INP_LOCKFOCUS"; items[11] = "MENU_ITEM_INP_QUICKMANA"; items[12] = "MENU_ITEM_INP_QUICKHEALTH"; items[13] = "MENU_ITEM_CHG_KEYS_SET_DEFAULT"; items[14] = "MENU_ITEM_CHG_KEYS_SET_ALTERNATIVE"; items[15] = "MENUITEM_CHG_KEYS_BACK"; flags = flags | MENU_SHOW_INFO; }; const int ctrl_sp1_1 = 600; // 1.Spalte (Beschreibung) const int ctrl_sp1_2 = ctrl_sp1_1 + 2500; // 1.Spalte (Taste) const int ctrl_dimx = 4600; // Breite des Tastenfeldes const int ctrl_y_step = 260; // Abstand der Felder (y) const int ctrl_y_step2 = 180; const int ctrl_y_title = 500; // Start der Felder (y) const int ctrl_y_start = ctrl_y_title + ctrl_y_step * 2; // Start der Felder (y) const int CTRL_GROUP1 = ctrl_y_step2 * 0; const int CTRL_GROUP2 = ctrl_y_step2 * 1; const int CTRL_GROUP3 = ctrl_y_step2 * 2; const int CTRL_GROUP4 = ctrl_y_step2 * 3; const int CTRL_GROUP5 = ctrl_y_step2 * 4; const int CTRL_GROUP6 = ctrl_y_step2 * 5; INSTANCE MENU_ITEM_KEY_WEAPON_LEFT(C_MENU_ITEM_DEF) { text[0] = "Schlag links"; text[1] = "Taste ENTF zum Löschen und RETURN zum definieren"; // Kommentar posx = ctrl_sp1_1; posy = ctrl_y_start + ctrl_y_step * 1 + CTRL_GROUP2; onSelAction[0] = SEL_ACTION_EXECCOMMANDS; onSelAction_S[0]= "RUN MENU_ITEM_INP_WEAPON_LEFT"; fontName = MENU_FONT_SMALL; flags = flags; hideIfOptionSectionSet = "GAME"; hideIfOptionSet = "useGothic1Controls"; hideOnValue = 1; }; INSTANCE MENU_ITEM_KEY_WEAPON_RIGHT(C_MENU_ITEM_DEF) { text[0] = "Schlag rechts"; text[1] = "Taste ENTF zum Löschen und RETURN zum definieren"; // Kommentar posx = ctrl_sp1_1; posy = ctrl_y_start + ctrl_y_step * 2 + CTRL_GROUP2; onSelAction[0] = SEL_ACTION_EXECCOMMANDS; onSelAction_S[0]= "RUN MENU_ITEM_INP_WEAPON_RIGHT"; fontName = MENU_FONT_SMALL; flags = flags; hideIfOptionSectionSet = "GAME"; hideIfOptionSet = "useGothic1Controls"; hideOnValue = 1; }; INSTANCE MENU_ITEM_KEY_WEAPON_PARADE(C_MENU_ITEM_DEF) { text[0] = "Blocken"; text[1] = "Taste ENTF zum Löschen und RETURN zum definieren"; // Kommentar posx = ctrl_sp1_1; posy = ctrl_y_start + ctrl_y_step * 3 + CTRL_GROUP2; onSelAction[0] = SEL_ACTION_EXECCOMMANDS; onSelAction_S[0]= "RUN MENU_ITEM_INP_WEAPON_PARADE"; fontName = MENU_FONT_SMALL; flags = flags; hideIfOptionSectionSet = "GAME"; hideIfOptionSet = "useGothic1Controls"; hideOnValue = 1; }; INSTANCE MENU_ITEM_INP_WEAPON_LEFT(C_MENU_ITEM_DEF) { type = MENU_ITEM_INPUT; text[1] = "Gewünschte Taste betätigen."; posx = ctrl_sp1_2; posy = ctrl_y_start + ctrl_y_step * 1 + CTRL_GROUP2; dimx = ctrl_dimx; dimy = 300; fontName = MENU_FONT_SMALL; backPic = MENU_KBDINPUT_BACK_PIC; onChgSetOption = "keyActionLeft"; onChgSetOptionSection = "KEYS"; flags = flags & ~IT_SELECTABLE; hideIfOptionSectionSet = "GAME"; hideIfOptionSet = "useGothic1Controls"; hideOnValue = 1; }; INSTANCE MENU_ITEM_INP_WEAPON_RIGHT(C_MENU_ITEM_DEF) { type = MENU_ITEM_INPUT; text[1] = "Gewünschte Taste betätigen."; posx = ctrl_sp1_2; posy = ctrl_y_start + ctrl_y_step * 2 + CTRL_GROUP2; dimx = ctrl_dimx; dimy = 300; fontName = MENU_FONT_SMALL; backPic = MENU_KBDINPUT_BACK_PIC; onChgSetOption = "keyActionRight"; onChgSetOptionSection = "KEYS"; flags = flags & ~IT_SELECTABLE; hideIfOptionSectionSet = "GAME"; hideIfOptionSet = "useGothic1Controls"; hideOnValue = 1; }; INSTANCE MENU_ITEM_INP_WEAPON_PARADE(C_MENU_ITEM_DEF) { type = MENU_ITEM_INPUT; text[1] = "Gewünschte Taste betätigen."; posx = ctrl_sp1_2; posy = ctrl_y_start + ctrl_y_step * 3 + CTRL_GROUP2; dimx = ctrl_dimx; dimy = 300; fontName = MENU_FONT_SMALL; backPic = MENU_KBDINPUT_BACK_PIC; onChgSetOption = "keyParade"; onChgSetOptionSection = "KEYS"; flags = flags & ~IT_SELECTABLE; hideIfOptionSectionSet = "GAME"; hideIfOptionSet = "useGothic1Controls"; hideOnValue = 1; }; INSTANCE MENU_ITEM_KEY_LOCKFOCUS(C_MENU_ITEM_DEF) { text[0] = "Gegner Lock"; text[1] = "Taste ENTF zum Löschen und RETURN zum definieren"; // Kommentar posx = ctrl_sp1_1; posy = ctrl_y_start + ctrl_y_step * 4 + CTRL_GROUP2; onSelAction[0] = SEL_ACTION_EXECCOMMANDS; onSelAction_S[0]= "RUN MENU_ITEM_INP_LOCKFOCUS"; fontName = MENU_FONT_SMALL; flags = flags; hideIfOptionSectionSet = "GAME"; hideIfOptionSet = "useGothic1Controls"; hideOnValue = 1; }; INSTANCE MENU_ITEM_KEY_QUICKMANA(C_MENU_ITEM_DEF) { text[0] = "Manatrank"; text[1] = "Taste ENTF zum Löschen und RETURN zum definieren"; // Kommentar posx = ctrl_sp1_1; posy = ctrl_y_start + ctrl_y_step * 5 + CTRL_GROUP2; onSelAction[0] = SEL_ACTION_EXECCOMMANDS; onSelAction_S[0]= "RUN MENU_ITEM_INP_QUICKMANA"; fontName = MENU_FONT_SMALL; flags = flags; hideIfOptionSectionSet = "GAME"; hideIfOptionSet = "usePotionKeys"; hideOnValue = 0; }; INSTANCE MENU_ITEM_KEY_QUICKHEALTH(C_MENU_ITEM_DEF) { text[0] = "Heiltrank"; text[1] = "Taste ENTF zum Löschen und RETURN zum definieren"; // Kommentar posx = ctrl_sp1_1; posy = ctrl_y_start + ctrl_y_step * 6 + CTRL_GROUP2; onSelAction[0] = SEL_ACTION_EXECCOMMANDS; onSelAction_S[0]= "RUN MENU_ITEM_INP_QUICKHEALTH"; fontName = MENU_FONT_SMALL; flags = flags; hideIfOptionSectionSet = "GAME"; hideIfOptionSet = "usePotionKeys"; hideOnValue = 0; }; INSTANCE MENU_ITEM_INP_LOCKFOCUS(C_MENU_ITEM_DEF) { type = MENU_ITEM_INPUT; text[1] = "Gewünschte Taste betätigen."; posx = ctrl_sp1_2; posy = ctrl_y_start + ctrl_y_step * 4 + CTRL_GROUP2; dimx = ctrl_dimx; dimy = 300; fontName = MENU_FONT_SMALL; backPic = MENU_KBDINPUT_BACK_PIC; onChgSetOption = "keyLockTarget"; onChgSetOptionSection = "KEYS"; hideIfOptionSectionSet = "GAME"; hideIfOptionSet = "useGothic1Controls"; hideOnValue = 1; flags = flags & ~IT_SELECTABLE; }; INSTANCE MENU_ITEM_INP_QUICKMANA(C_MENU_ITEM_DEF) { type = MENU_ITEM_INPUT; text[1] = "Gewünschte Taste betätigen."; posx = ctrl_sp1_2; posy = ctrl_y_start + ctrl_y_step * 5 + CTRL_GROUP2; dimx = ctrl_dimx; dimy = 300; fontName = MENU_FONT_SMALL; backPic = MENU_KBDINPUT_BACK_PIC; onChgSetOption = "keyPotion"; onChgSetOptionSection = "KEYS"; flags = flags & ~IT_SELECTABLE; hideIfOptionSectionSet = "GAME"; hideIfOptionSet = "usePotionKeys"; hideOnValue = 0; }; INSTANCE MENU_ITEM_INP_QUICKHEALTH(C_MENU_ITEM_DEF) { type = MENU_ITEM_INPUT; text[1] = "Gewünschte Taste betätigen."; posx = ctrl_sp1_2; posy = ctrl_y_start + ctrl_y_step * 6 + CTRL_GROUP2; dimx = ctrl_dimx; dimy = 300; fontName = MENU_FONT_SMALL; backPic = MENU_KBDINPUT_BACK_PIC; onChgSetOption = "keyHeal"; onChgSetOptionSection = "KEYS"; flags = flags & ~IT_SELECTABLE; hideIfOptionSectionSet = "GAME"; hideIfOptionSet = "usePotionKeys"; hideOnValue = 0; }; INSTANCE MENU_ITEM_INP_HKEY01(C_MENU_ITEM_DEF) { type = MENU_ITEM_INPUT; text[1] = "Gewünschte Taste betätigen."; posx = ctrl_sp1_2; posy = ctrl_y_start + ctrl_y_step * 12 + CTRL_GROUP3; dimx = ctrl_dimx; dimy = 300; fontName = MENU_FONT_SMALL; backPic = MENU_KBDINPUT_BACK_PIC; onChgSetOption = "keyPotion"; onChgSetOptionSection = "KEYS"; flags = flags & ~IT_SELECTABLE; hideIfOptionSectionSet = "GAME"; hideIfOptionSet = "usePotionKeys"; hideOnValue = 0; }; INSTANCE MENU_ITEM_INP_HKEY02(C_MENU_ITEM_DEF) { type = MENU_ITEM_INPUT; text[1] = "Gewünschte Taste betätigen."; posx = ctrl_sp1_2; posy = ctrl_y_start + ctrl_y_step * 13 + CTRL_GROUP3; dimx = ctrl_dimx; dimy = 300; fontName = MENU_FONT_SMALL; backPic = MENU_KBDINPUT_BACK_PIC; onChgSetOption = "keyHeal"; onChgSetOptionSection = "KEYS"; flags = flags & ~IT_SELECTABLE; hideIfOptionSectionSet = "GAME"; hideIfOptionSet = "usePotionKeys"; hideOnValue = 0; }; INSTANCE MENU_ITEM_CHG_KEYS_HEADLINE(C_MENU_ITEM_DEF) { text[0] = "STEUERUNG EINSTELLUNGEN"; type = MENU_ITEM_TEXT; // Position und Dimension posx = 0; posy = ctrl_y_title; dimx = 8100; fontName = MENU_FONT_BRIGHT; flags = flags & ~IT_SELECTABLE; flags = flags | IT_TXT_CENTER; }; INSTANCE MENU_ITEM_CHG_EXTKEYS_HEADLINE(C_MENU_ITEM_DEF) { text[0] = "ERWEITERTE STEUERUNG"; type = MENU_ITEM_TEXT; // Position und Dimension posx = 0; posy = ctrl_y_title; dimx = 8100; fontName = MENU_FONT_BRIGHT; flags = flags & ~IT_SELECTABLE; flags = flags | IT_TXT_CENTER; }; // // Group 1 (movement) // INSTANCE MENU_ITEM_KEY_UP(C_MENU_ITEM_DEF) { text[0] = "Vorwärts"; text[1] = "Taste ENTF zum Löschen und RETURN zum definieren"; // Kommentar posx = ctrl_sp1_1; posy = ctrl_y_start + ctrl_y_step * 0 + CTRL_GROUP1; onSelAction[0] = SEL_ACTION_EXECCOMMANDS; onSelAction_S[0]= "RUN MENU_ITEM_INP_UP"; fontName = MENU_FONT_SMALL; flags = flags; }; INSTANCE MENU_ITEM_KEY_DOWN(C_MENU_ITEM_DEF) { text[0] = "Rückwärts"; text[1] = "Taste ENTF zum Löschen und RETURN zum definieren"; // Kommentar posx = ctrl_sp1_1; posy = ctrl_y_start + ctrl_y_step * 1 + CTRL_GROUP1; onSelAction[0] = SEL_ACTION_EXECCOMMANDS; onSelAction_S[0]= "RUN MENU_ITEM_INP_DOWN"; fontName = MENU_FONT_SMALL; flags = flags; }; INSTANCE MENU_ITEM_KEY_LEFT(C_MENU_ITEM_DEF) { text[0] = "Links drehen"; text[1] = "Taste ENTF zum Löschen und RETURN zum definieren"; // Kommentar posx = ctrl_sp1_1; posy = ctrl_y_start + ctrl_y_step * 2 + CTRL_GROUP1; onSelAction[0] = SEL_ACTION_EXECCOMMANDS; onSelAction_S[0]= "RUN MENU_ITEM_INP_LEFT"; fontName = MENU_FONT_SMALL; flags = flags; }; INSTANCE MENU_ITEM_KEY_RIGHT(C_MENU_ITEM_DEF) { text[0] = "Rechts drehen"; text[1] = "Taste ENTF zum Löschen und RETURN zum definieren"; // Kommentar posx = ctrl_sp1_1; posy = ctrl_y_start + ctrl_y_step * 3 + CTRL_GROUP1; onSelAction[0] = SEL_ACTION_EXECCOMMANDS; onSelAction_S[0]= "RUN MENU_ITEM_INP_RIGHT"; fontName = MENU_FONT_SMALL; flags = flags; }; INSTANCE MENU_ITEM_KEY_STRAFE_LEFT(C_MENU_ITEM_DEF) { text[0] = "Seitwärts links"; text[1] = "Taste ENTF zum Löschen und RETURN zum definieren"; // Kommentar posx = ctrl_sp1_1; posy = ctrl_y_start + ctrl_y_step * 4 + CTRL_GROUP1; onSelAction[0] = SEL_ACTION_EXECCOMMANDS; onSelAction_S[0]= "RUN MENU_ITEM_INP_STRAFE_LEFT"; fontName = MENU_FONT_SMALL; flags = flags; }; INSTANCE MENU_ITEM_KEY_STRAFE_RIGHT(C_MENU_ITEM_DEF) { text[0] = "Seitwärts rechts"; text[1] = "Taste ENTF zum Löschen und RETURN zum definieren"; // Kommentar posx = ctrl_sp1_1; posy = ctrl_y_start + ctrl_y_step * 5 + CTRL_GROUP1; onSelAction[0] = SEL_ACTION_EXECCOMMANDS; onSelAction_S[0]= "RUN MENU_ITEM_INP_STRAFE_RIGHT"; fontName = MENU_FONT_SMALL; flags = flags; }; INSTANCE MENU_ITEM_KEY_JUMPCLIMBSTRAFE(C_MENU_ITEM_DEF) { text[0] = "Springen"; text[1] = "Taste ENTF zum Löschen und RETURN zum definieren"; // Kommentar posx = ctrl_sp1_1; posy = ctrl_y_start + ctrl_y_step * 6 + CTRL_GROUP1; onSelAction[0] = SEL_ACTION_EXECCOMMANDS; onSelAction_S[0]= "RUN MENU_ITEM_INP_JUMPCLIMBSTRAFE"; fontName = MENU_FONT_SMALL; flags = flags; }; INSTANCE MENU_ITEM_KEY_RUNMODETOGGLE(C_MENU_ITEM_DEF) { text[0] = "Gehen/Laufen"; text[1] = "Taste ENTF zum Löschen und RETURN zum definieren"; // Kommentar posx = ctrl_sp1_1; posy = ctrl_y_start + ctrl_y_step * 7 + CTRL_GROUP1; onSelAction[0] = SEL_ACTION_EXECCOMMANDS; onSelAction_S[0]= "RUN MENU_ITEM_INP_RUNMODETOGGLE"; fontName = MENU_FONT_SMALL; flags = flags; }; INSTANCE MENU_ITEM_KEY_SNEAK(C_MENU_ITEM_DEF) { text[0] = "Schleichen"; text[1] = "Taste ENTF zum Löschen und RETURN zum definieren"; // Kommentar posx = ctrl_sp1_1; posy = ctrl_y_start + ctrl_y_step * 8 + CTRL_GROUP1; onSelAction[0] = SEL_ACTION_EXECCOMMANDS; onSelAction_S[0]= "RUN MENU_ITEM_INP_SNEAK"; fontName = MENU_FONT_SMALL; flags = flags; }; // // Group 2 (actions) // INSTANCE MENU_ITEM_KEY_ACTION(C_MENU_ITEM_DEF) { text[0] = "Aktion"; text[1] = "Taste ENTF zum Löschen und RETURN zum definieren"; // Kommentar posx = ctrl_sp1_1; posy = ctrl_y_start + ctrl_y_step * 9 + CTRL_GROUP2; onSelAction[0] = SEL_ACTION_EXECCOMMANDS; onSelAction_S[0]= "RUN MENU_ITEM_INP_ACTION"; fontName = MENU_FONT_SMALL; flags = flags; }; INSTANCE MENU_ITEM_KEY_WEAPON(C_MENU_ITEM_DEF) { text[0] = "Waffe ziehen"; text[1] = "Taste ENTF zum Löschen und RETURN zum definieren"; // Kommentar posx = ctrl_sp1_1; posy = ctrl_y_start + ctrl_y_step * 10 + CTRL_GROUP2; onSelAction[0] = SEL_ACTION_EXECCOMMANDS; onSelAction_S[0]= "RUN MENU_ITEM_INP_WEAPON"; fontName = MENU_FONT_SMALL; flags = flags; }; INSTANCE MENU_ITEM_KEY_MAP(C_MENU_ITEM_DEF) { text[0] = "Karte"; text[1] = "Taste ENTF zum Löschen und RETURN zum definieren"; // Kommentar posx = ctrl_sp1_1; posy = ctrl_y_start + ctrl_y_step * 11 + CTRL_GROUP2; onSelAction[0] = SEL_ACTION_EXECCOMMANDS; onSelAction_S[0]= "RUN MENU_ITEM_INP_MAP"; fontName = MENU_FONT_SMALL; flags = flags; }; // // Group 3 (view) // INSTANCE MENU_ITEM_KEY_LOOK(C_MENU_ITEM_DEF) { text[0] = "Umsehen"; text[1] = "Taste ENTF zum Löschen und RETURN zum definieren"; // Kommentar posx = ctrl_sp1_1; posy = ctrl_y_start + ctrl_y_step * 15 + CTRL_GROUP3; onSelAction[0] = SEL_ACTION_EXECCOMMANDS; onSelAction_S[0]= "RUN MENU_ITEM_INP_LOOK"; fontName = MENU_FONT_SMALL; flags = flags; }; INSTANCE MENU_ITEM_KEY_LOOK_FP(C_MENU_ITEM_DEF) { text[0] = "FirstPerson"; text[1] = "Taste ENTF zum Löschen und RETURN zum definieren"; // Kommentar posx = ctrl_sp1_1; posy = ctrl_y_start + ctrl_y_step * 15 + CTRL_GROUP3; onSelAction[0] = SEL_ACTION_EXECCOMMANDS; onSelAction_S[0]= "RUN MENU_ITEM_INP_LOOK_FP"; fontName = MENU_FONT_SMALL; flags = flags; }; // // Group 4 (screens) // INSTANCE MENU_ITEM_KEY_INVENTORY(C_MENU_ITEM_DEF) { text[0] = "Inventar"; text[1] = "Taste ENTF zum Löschen und RETURN zum definieren"; // Kommentar posx = ctrl_sp1_1; posy = ctrl_y_start + ctrl_y_step * 16 + CTRL_GROUP4; onSelAction[0] = SEL_ACTION_EXECCOMMANDS; onSelAction_S[0]= "RUN MENU_ITEM_INP_INVENTORY"; fontName = MENU_FONT_SMALL; flags = flags; }; INSTANCE MENU_ITEM_KEY_SCREEN_STATUS(C_MENU_ITEM_DEF) { text[0] = "Spielerstatus"; text[1] = "Taste ENTF zum Löschen und RETURN zum definieren"; // Kommentar posx = ctrl_sp1_1; posy = ctrl_y_start + ctrl_y_step * 17 + CTRL_GROUP4; onSelAction[0] = SEL_ACTION_EXECCOMMANDS; onSelAction_S[0]= "RUN MENU_ITEM_INP_SCREEN_STATUS"; fontName = MENU_FONT_SMALL; flags = flags; }; INSTANCE MENU_ITEM_KEY_SCREEN_LOG(C_MENU_ITEM_DEF) { text[0] = "Missionen/Notizen"; text[1] = "Taste ENTF zum Löschen und RETURN zum definieren"; // Kommentar posx = ctrl_sp1_1; posy = ctrl_y_start + ctrl_y_step * 18 + CTRL_GROUP4; onSelAction[0] = SEL_ACTION_EXECCOMMANDS; onSelAction_S[0]= "RUN MENU_ITEM_INP_SCREEN_LOG"; fontName = MENU_FONT_SMALL; flags = flags; }; // // Group 1 (movement) // INSTANCE MENU_ITEM_INP_UP(C_MENU_ITEM_DEF) { backPic = MENU_KBDINPUT_BACK_PIC; text[1] = "Gewünschte Taste betätigen."; type = MENU_ITEM_INPUT; posx = ctrl_sp1_2; posy = ctrl_y_start + ctrl_y_step * 0 + CTRL_GROUP1; dimx = ctrl_dimx; dimy = 300; fontName = MENU_FONT_SMALL; onChgSetOption = "keyUp"; onChgSetOptionSection = "KEYS"; flags = flags & ~IT_SELECTABLE; }; INSTANCE MENU_ITEM_INP_DOWN(C_MENU_ITEM_DEF) { type = MENU_ITEM_INPUT; text[1] = "Gewünschte Taste betätigen."; posx = ctrl_sp1_2; posy = ctrl_y_start + ctrl_y_step * 1 + CTRL_GROUP1; dimx = ctrl_dimx; dimy = 300; fontName = MENU_FONT_SMALL; backPic = MENU_KBDINPUT_BACK_PIC; onChgSetOption = "keyDown"; onChgSetOptionSection = "KEYS"; flags = flags & ~IT_SELECTABLE; }; INSTANCE MENU_ITEM_INP_LEFT(C_MENU_ITEM_DEF) { type = MENU_ITEM_INPUT; text[1] = "Gewünschte Taste betätigen."; posx = ctrl_sp1_2; posy = ctrl_y_start + ctrl_y_step * 2 + CTRL_GROUP1; dimx = ctrl_dimx; dimy = 300; fontName = MENU_FONT_SMALL; backPic = MENU_KBDINPUT_BACK_PIC; onChgSetOption = "keyLeft"; onChgSetOptionSection = "KEYS"; flags = IT_CHROMAKEYED|IT_TRANSPARENT; }; INSTANCE MENU_ITEM_INP_RIGHT(C_MENU_ITEM_DEF) { type = MENU_ITEM_INPUT; text[1] = "Gewünschte Taste betätigen."; posx = ctrl_sp1_2; posy = ctrl_y_start + ctrl_y_step * 3 + CTRL_GROUP1; dimx = ctrl_dimx; dimy = 300; fontName = MENU_FONT_SMALL; backPic = MENU_KBDINPUT_BACK_PIC; onChgSetOption = "keyRight"; onChgSetOptionSection = "KEYS"; flags = flags & ~IT_SELECTABLE; }; INSTANCE MENU_ITEM_INP_STRAFE_LEFT(C_MENU_ITEM_DEF) { type = MENU_ITEM_INPUT; text[1] = "Gewünschte Taste betätigen."; posx = ctrl_sp1_2; posy = ctrl_y_start + ctrl_y_step * 4 + CTRL_GROUP1; dimx = ctrl_dimx; dimy = 300; fontName = MENU_FONT_SMALL; backPic = MENU_KBDINPUT_BACK_PIC; onChgSetOption = "keyStrafeLeft"; onChgSetOptionSection = "KEYS"; flags = IT_CHROMAKEYED|IT_TRANSPARENT; }; INSTANCE MENU_ITEM_INP_STRAFE_RIGHT(C_MENU_ITEM_DEF) { type = MENU_ITEM_INPUT; text[1] = "Gewünschte Taste betätigen."; posx = ctrl_sp1_2; posy = ctrl_y_start + ctrl_y_step * 5 + CTRL_GROUP1; dimx = ctrl_dimx; dimy = 300; fontName = MENU_FONT_SMALL; backPic = MENU_KBDINPUT_BACK_PIC; onChgSetOption = "keyStrafeRight"; onChgSetOptionSection = "KEYS"; flags = flags & ~IT_SELECTABLE; }; INSTANCE MENU_ITEM_INP_JUMPCLIMBSTRAFE(C_MENU_ITEM_DEF) { type = MENU_ITEM_INPUT; text[1] = "Gewünschte Taste betätigen."; posx = ctrl_sp1_2; posy = ctrl_y_start + ctrl_y_step * 6 + CTRL_GROUP1; dimx = ctrl_dimx; dimy = 300; fontName = MENU_FONT_SMALL; backPic = MENU_KBDINPUT_BACK_PIC; onChgSetOption = "keySMove"; onChgSetOptionSection = "KEYS"; flags = flags & ~IT_SELECTABLE; }; instance MENU_ITEM_INP_RUNMODETOGGLE(C_MENU_ITEM_DEF) { type = MENU_ITEM_INPUT; text[1] = "Gewünschte Taste betätigen."; posx = ctrl_sp1_2; posy = ctrl_y_start + ctrl_y_step * 7 + CTRL_GROUP1; dimx = ctrl_dimx; dimy = 300; fontName = MENU_FONT_SMALL; backPic = MENU_KBDINPUT_BACK_PIC; onChgSetOption = "keySlow"; onChgSetOptionSection = "KEYS"; flags = flags & ~IT_SELECTABLE; }; INSTANCE MENU_ITEM_INP_SNEAK(C_MENU_ITEM_DEF) { type = MENU_ITEM_INPUT; text[1] = "Gewünschte Taste betätigen."; posx = ctrl_sp1_2; posy = ctrl_y_start + ctrl_y_step * 8 + CTRL_GROUP1; dimx = ctrl_dimx; dimy = 300; fontName = MENU_FONT_SMALL; backPic = MENU_KBDINPUT_BACK_PIC; onChgSetOption = "keySneak"; onChgSetOptionSection = "KEYS"; flags = flags & ~IT_SELECTABLE; }; // // Group 2 (actions) // INSTANCE MENU_ITEM_INP_ACTION(C_MENU_ITEM_DEF) { type = MENU_ITEM_INPUT; text[1] = "Gewünschte Taste betätigen."; posx = ctrl_sp1_2; posy = ctrl_y_start + ctrl_y_step * 9 + CTRL_GROUP2; dimx = ctrl_dimx; dimy = 300; fontName = MENU_FONT_SMALL; backPic = MENU_KBDINPUT_BACK_PIC; onChgSetOption = "keyAction"; onChgSetOptionSection = "KEYS"; flags = flags & ~IT_SELECTABLE; }; INSTANCE MENU_ITEM_INP_WEAPON(C_MENU_ITEM_DEF) { type = MENU_ITEM_INPUT; text[1] = "Gewünschte Taste betätigen."; posx = ctrl_sp1_2; posy = ctrl_y_start + ctrl_y_step * 10 + CTRL_GROUP2; dimx = ctrl_dimx; dimy = 300; fontName = MENU_FONT_SMALL; backPic = MENU_KBDINPUT_BACK_PIC; onChgSetOption = "keyWeapon"; onChgSetOptionSection = "KEYS"; flags = flags & ~IT_SELECTABLE; }; INSTANCE MENU_ITEM_INP_MAP(C_MENU_ITEM_DEF) { type = MENU_ITEM_INPUT; text[1] = "Gewünschte Taste betätigen."; posx = ctrl_sp1_2; posy = ctrl_y_start + ctrl_y_step * 11 + CTRL_GROUP2; dimx = ctrl_dimx; dimy = 300; fontName = MENU_FONT_SMALL; backPic = MENU_KBDINPUT_BACK_PIC; onChgSetOption = "keyShowMap"; onChgSetOptionSection = "KEYS"; flags = flags & ~IT_SELECTABLE; }; // // Group 3 (view) // INSTANCE MENU_ITEM_KEY_HKEY01(C_MENU_ITEM_DEF) { text[0] = "Slowmotion"; text[1] = "Taste ENTF zum Löschen und RETURN zum definieren"; // Kommentar posx = ctrl_sp1_1; posy = ctrl_y_start + ctrl_y_step * 12 + CTRL_GROUP3; onSelAction[0] = SEL_ACTION_EXECCOMMANDS; onSelAction_S[0]= "RUN MENU_ITEM_INP_QUICKMANA"; fontName = MENU_FONT_SMALL; flags = flags; hideIfOptionSectionSet = "GAME"; hideIfOptionSet = "usePotionKeys"; hideOnValue = 0; }; INSTANCE MENU_ITEM_KEY_HKEY02(C_MENU_ITEM_DEF) { text[0] = "Trank trinken"; text[1] = "Taste ENTF zum Löschen und RETURN zum definieren"; // Kommentar posx = ctrl_sp1_1; posy = ctrl_y_start + ctrl_y_step * 13 + CTRL_GROUP3; onSelAction[0] = SEL_ACTION_EXECCOMMANDS; onSelAction_S[0]= "RUN MENU_ITEM_INP_QUICKHEALTH"; fontName = MENU_FONT_SMALL; flags = flags; hideIfOptionSectionSet = "GAME"; hideIfOptionSet = "usePotionKeys"; hideOnValue = 0; }; INSTANCE MENU_ITEM_INP_LOOK(C_MENU_ITEM_DEF) { type = MENU_ITEM_INPUT; text[1] = "Gewünschte Taste betätigen."; posx = ctrl_sp1_2; posy = ctrl_y_start + ctrl_y_step * 15 + CTRL_GROUP3; dimx = ctrl_dimx; dimy = 300; fontName = MENU_FONT_SMALL; backPic = MENU_KBDINPUT_BACK_PIC; onChgSetOption = "keyLook"; onChgSetOptionSection = "KEYS"; flags = flags & ~IT_SELECTABLE; }; INSTANCE MENU_ITEM_INP_LOOK_FP(C_MENU_ITEM_DEF) { type = MENU_ITEM_INPUT; text[1] = "Gewünschte Taste betätigen."; posx = ctrl_sp1_2; posy = ctrl_y_start + ctrl_y_step * 15 + CTRL_GROUP3; dimx = ctrl_dimx; dimy = 300; fontName = MENU_FONT_SMALL; backPic = MENU_KBDINPUT_BACK_PIC; onChgSetOption = "keyLookFP"; onChgSetOptionSection = "KEYS"; flags = flags & ~IT_SELECTABLE; }; // // Group 4 (screens) // INSTANCE MENU_ITEM_INP_INVENTORY(C_MENU_ITEM_DEF) { type = MENU_ITEM_INPUT; text[1] = "Gewünschte Taste betätigen."; posx = ctrl_sp1_2; posy = ctrl_y_start + ctrl_y_step * 16 + CTRL_GROUP4; dimx = ctrl_dimx; dimy = 300; fontName = MENU_FONT_SMALL; backPic = MENU_KBDINPUT_BACK_PIC; onChgSetOption = "keyInventory"; onChgSetOptionSection = "KEYS"; flags = flags & ~IT_SELECTABLE; }; INSTANCE MENU_ITEM_INP_SCREEN_STATUS(C_MENU_ITEM_DEF) { type = MENU_ITEM_INPUT; text[1] = "Gewünschte Taste betätigen."; posx = ctrl_sp1_2; posy = ctrl_y_start + ctrl_y_step * 17 + CTRL_GROUP4; dimx = ctrl_dimx; dimy = 300; fontName = MENU_FONT_SMALL; backPic = MENU_KBDINPUT_BACK_PIC; onChgSetOption = "keyShowStatus"; onChgSetOptionSection = "KEYS"; flags = flags & ~IT_SELECTABLE; }; INSTANCE MENU_ITEM_INP_SCREEN_LOG(C_MENU_ITEM_DEF) { type = MENU_ITEM_INPUT; text[1] = "Gewünschte Taste betätigen."; posx = ctrl_sp1_2; posy = ctrl_y_start + ctrl_y_step * 18 + CTRL_GROUP4; dimx = ctrl_dimx; dimy = 300; fontName = MENU_FONT_SMALL; backPic = MENU_KBDINPUT_BACK_PIC; onChgSetOption = "keyShowLog"; onChgSetOptionSection = "KEYS"; flags = flags & ~IT_SELECTABLE; }; // // Weitere Elemente // INSTANCE MENU_ITEM_CHG_KEYS_SET_DEFAULT(C_MENU_ITEM_DEF) { text[0] = "Standard-Einstellung"; text[1] = "Aktiviert die Standardbelegung."; // Kommentar posx = ctrl_sp1_1; posy = ctrl_y_start + ctrl_y_step * 19 + CTRL_GROUP5; dimy = 300; onSelAction[0] = SEL_ACTION_EXECCOMMANDS; onSelAction_S[0]= "SETDEFAULT"; fontName = MENU_FONT_SMALL; flags = flags | IT_TXT_CENTER; }; INSTANCE MENU_ITEM_CHG_KEYS_SET_ALTERNATIVE(C_MENU_ITEM_DEF) { text[0] = "Alternativ-Einstellung"; text[1] = "Aktiviert eine alternative Standardbelegung."; // Kommentar posx = ctrl_sp1_1; posy = ctrl_y_start + ctrl_y_step * 20 + CTRL_GROUP5; dimy = 300; onSelAction[0] = SEL_ACTION_EXECCOMMANDS; onSelAction_S[0]= "SETALTERNATIVE"; fontName = MENU_FONT_SMALL; flags = flags | IT_TXT_CENTER; }; INSTANCE MENUITEM_CHG_KEYS_BACK(C_MENU_ITEM_DEF) { backpic = MENU_ITEM_BACK_PIC; text[0] = "Zurück"; // Position und Dimension posx = ctrl_sp1_1; posy = ctrl_y_start + ctrl_y_step * 21 + CTRL_GROUP6; dimy = 300; // Aktionen fontName = MENU_FONT_SMALL; onSelAction[0] = SEL_ACTION_BACK; flags = flags | IT_TXT_CENTER; };
D
instance DIA_BDT_13_EXIT(C_Info) { nr = 999; condition = DIA_BDT_13_EXIT_Condition; information = DIA_BDT_13_EXIT_Info; permanent = TRUE; description = Dialog_Ende; }; func int DIA_BDT_13_EXIT_Condition() { return TRUE; }; func void DIA_BDT_13_EXIT_Info() { AI_StopProcessInfos(self); }; instance DIA_BDT_13_STANDARD(C_Info) { nr = 2; condition = DIA_BDT_13_STANDARD_Condition; information = DIA_BDT_13_STANDARD_Info; permanent = TRUE; important = TRUE; }; func int DIA_BDT_13_STANDARD_Condition() { if(Npc_IsInState(self,ZS_Talk)) { return TRUE; }; }; func void B_Verschwinde_Stimme13() { AI_Output(self,other,"DIA_BDT_13_STANDARD_13_01"); //Проваливай! }; func void DIA_BDT_13_STANDARD_Info() { var int randy; randy = Hlp_Random(3); if(randy == 0) { AI_Output(self,other,"DIA_BDT_13_STANDARD_13_00"); //Что уставился, как идиот?! }; if(randy == 1) { B_Verschwinde_Stimme13(); }; if(randy == 2) { AI_Output(self,other,"DIA_BDT_13_STANDARD_13_02"); //Оставь меня в покое, придурок. }; AI_StopProcessInfos(self); }; func void B_AssignAmbientInfos_BDT_13(var C_Npc slf) { dia_bdt_13_exit.npc = Hlp_GetInstanceID(slf); dia_bdt_13_standard.npc = Hlp_GetInstanceID(slf); };
D
// Written in the D programming language. /** This module implements a variety of type constructors, i.e., templates that allow construction of new, useful general-purpose types. Source: $(PHOBOSSRC std/_typecons.d) Macros: WIKI = Phobos/StdVariant Synopsis: ---- // value tuples alias Tuple!(float, "x", float, "y", float, "z") Coord; Coord c; c[1] = 1; // access by index c.z = 1; // access by given name alias Tuple!(string, string) DicEntry; // names can be omitted // Rebindable references to const and immutable objects void bar() { const w1 = new Widget, w2 = new Widget; w1.foo(); // w1 = w2 would not work; can't rebind const object auto r = Rebindable!(const Widget)(w1); // invoke method as if r were a Widget object r.foo(); // rebind r to refer to another object r = w2; } ---- Copyright: Copyright the respective authors, 2008- License: $(WEB boost.org/LICENSE_1_0.txt, Boost License 1.0). Authors: $(WEB erdani.org, Andrei Alexandrescu), $(WEB bartoszmilewski.wordpress.com, Bartosz Milewski), Don Clugston, Shin Fujishiro, Kenji Hara */ module std.typecons; import core.memory, core.stdc.stdlib; import std.algorithm, std.array, std.conv, std.exception, std.format, std.metastrings, std.traits, std.typetuple, std.range; debug(Unique) import std.stdio; /** Encapsulates unique ownership of a resource. Resource of type T is deleted at the end of the scope, unless it is transferred. The transfer can be explicit, by calling $(D release), or implicit, when returning Unique from a function. The resource can be a polymorphic class object, in which case Unique behaves polymorphically too. Example: */ struct Unique(T) { static if (is(T:Object)) alias T RefT; else alias T * RefT; public: /+ Doesn't work yet /** The safe constructor. It creates the resource and guarantees unique ownership of it (unless the constructor of $(D T) publishes aliases of $(D this)), */ this(A...)(A args) { _p = new T(args); } +/ /** Constructor that takes an rvalue. It will ensure uniqueness, as long as the rvalue isn't just a view on an lvalue (e.g., a cast) Typical usage: ---- Unique!(Foo) f = new Foo; ---- */ this(RefT p) { debug(Unique) writeln("Unique constructor with rvalue"); _p = p; } /** Constructor that takes an lvalue. It nulls its source. The nulling will ensure uniqueness as long as there are no previous aliases to the source. */ this(ref RefT p) { _p = p; debug(Unique) writeln("Unique constructor nulling source"); p = null; assert(p is null); } /+ Doesn't work yet /** Constructor that takes a Unique of a type that is convertible to our type: Disallow construction from lvalue (force the use of release on the source Unique) If the source is an rvalue, null its content, so the destrutctor doesn't delete it Typically used by the compiler to return $(D Unique) of derived type as $(D Unique) of base type. Example: ---- Unique!(Base) create() { Unique!(Derived) d = new Derived; return d; // Implicit Derived->Base conversion } ---- */ this(U)(ref Unique!(U) u) = null; this(U)(Unique!(U) u) { _p = u._p; u._p = null; } +/ ~this() { debug(Unique) writeln("Unique destructor of ", (_p is null)? null: _p); delete _p; _p = null; } bool isEmpty() const { return _p is null; } /** Returns a unique rvalue. Nullifies the current contents */ Unique release() { debug(Unique) writeln("Release"); auto u = Unique(_p); assert(_p is null); debug(Unique) writeln("return from Release"); return u; } /** Forwards member access to contents */ RefT opDot() { return _p; } /+ doesn't work yet! /** Postblit operator is undefined to prevent the cloning of $(D Unique) objects */ this(this) = null; +/ private: RefT _p; } /+ doesn't work yet unittest { writeln("Unique class"); class Bar { ~this() { writefln(" Bar destructor"); } int val() const { return 4; } } alias Unique!(Bar) UBar; UBar g(UBar u) { return u; } auto ub = UBar(new Bar); assert(!ub.isEmpty); assert(ub.val == 4); // should not compile // auto ub3 = g(ub); writeln("Calling g"); auto ub2 = g(ub.release); assert(ub.isEmpty); assert(!ub2.isEmpty); } unittest { writeln("Unique struct"); struct Foo { ~this() { writefln(" Bar destructor"); } int val() const { return 3; } } alias Unique!(Foo) UFoo; UFoo f(UFoo u) { writeln("inside f"); return u; } auto uf = UFoo(new Foo); assert(!uf.isEmpty); assert(uf.val == 3); // should not compile // auto uf3 = f(uf); writeln("Unique struct: calling f"); auto uf2 = f(uf.release); assert(uf.isEmpty); assert(!uf2.isEmpty); } +/ /** Tuple of values, for example $(D Tuple!(int, string)) is a record that stores an $(D int) and a $(D string). $(D Tuple) can be used to bundle values together, notably when returning multiple values from a function. If $(D obj) is a tuple, the individual members are accessible with the syntax $(D obj[0]) for the first field, $(D obj[1]) for the second, and so on. The choice of zero-based indexing instead of one-base indexing was motivated by the ability to use value tuples with various compile-time loop constructs (e.g. type tuple iteration), all of which use zero-based indexing. Example: ---- Tuple!(int, int) point; // assign coordinates point[0] = 5; point[1] = 6; // read coordinates auto x = point[0]; auto y = point[1]; ---- Tuple members can be named. It is legal to mix named and unnamed members. The method above is still applicable to all fields. Example: ---- alias Tuple!(int, "index", string, "value") Entry; Entry e; e.index = 4; e.value = "Hello"; assert(e[1] == "Hello"); assert(e[0] == 4); ---- Tuples with named fields are distinct types from tuples with unnamed fields, i.e. each naming imparts a separate type for the tuple. Two tuple differing in naming only are still distinct, even though they might have the same structure. Example: ---- Tuple!(int, "x", int, "y") point1; Tuple!(int, int) point2; assert(!is(typeof(point1) == typeof(point2))); // passes ---- */ struct Tuple(Specs...) { private: // Parse (type,name) pairs (FieldSpecs) out of the specified // arguments. Some fields would have name, others not. template parseSpecs(Specs...) { static if (Specs.length == 0) { alias TypeTuple!() parseSpecs; } else static if (is(Specs[0])) { static if (is(typeof(Specs[1]) : string)) { alias TypeTuple!(FieldSpec!(Specs[0 .. 2]), parseSpecs!(Specs[2 .. $])) parseSpecs; } else { alias TypeTuple!(FieldSpec!(Specs[0]), parseSpecs!(Specs[1 .. $])) parseSpecs; } } else { static assert(0, "Attempted to instantiate Tuple with an " ~"invalid argument: "~ Specs[0].stringof); } } template FieldSpec(T, string s = "") { alias T Type; alias s name; } alias parseSpecs!Specs fieldSpecs; // Used with staticMap. template extractType(alias spec) { alias spec.Type extractType; } template extractName(alias spec) { alias spec.name extractName; } // Generates named fields as follows: // alias Identity!(field[0]) name_0; // alias Identity!(field[1]) name_1; // : // NOTE: field[k] is an expression (which yields a symbol of a // variable) and can't be aliased directly. static string injectNamedFields() { string decl = ""; foreach (i, name; staticMap!(extractName, fieldSpecs)) { enum numbered = toStringNow!(i); decl ~= "alias Identity!(field[" ~ numbered ~ "]) _" ~ numbered ~ ";"; if (name.length != 0) { decl ~= "alias _" ~ numbered ~ " " ~ name ~ ";"; } } return decl; } // Returns Specs for a subtuple this[from .. to] preserving field // names if any. template sliceSpecs(size_t from, size_t to) { alias staticMap!(expandSpec, fieldSpecs[from .. to]) sliceSpecs; } template expandSpec(alias spec) { static if (spec.name.length == 0) { alias TypeTuple!(spec.Type) expandSpec; } else { alias TypeTuple!(spec.Type, spec.name) expandSpec; } } template defaultInit(T) { static if (!is(typeof({ T v = void; }))) // inout(U) and others @property T defaultInit(T v = T.init); else @property T defaultInit(); } template isCompatibleTuples(Tup1, Tup2, string op) { enum isCompatibleTuples = is(typeof( { Tup1 tup1 = void; Tup2 tup2 = void; static assert(tup1.field.length == tup2.field.length); foreach (i, _; Tup1.Types) { // this doesn't work if typeof(tup1.field[i]) == const(int) //typeof(tup1.field[i]) lhs = void; //typeof(tup2.field[i]) rhs = void; auto lhs = defaultInit!(typeof(tup1.field[i])); // workaround auto rhs = defaultInit!(typeof(tup2.field[i])); auto result = mixin("lhs "~op~" rhs"); } })); } public: /** The type of the tuple's components. */ alias staticMap!(extractType, fieldSpecs) Types; Types field; mixin(injectNamedFields()); alias field expand; alias field this; // This mitigates breakage of old code now that std.range.Zip uses // Tuple instead of the old Proxy. It's intentionally lacking ddoc // because it was intended for deprecation. // Now that it has been deprecated, it will be removed in January 2013. deprecated auto at(size_t index)() { return field[index]; } /** Constructor taking one value for each field. Each argument must be implicitly assignable to the respective element of the target. */ this(U...)(U values) if (U.length == Types.length) { foreach (i, Unused; Types) { field[i] = values[i]; } } /** Constructor taking a compatible tuple. Each element of the source must be implicitly assignable to the respective element of the target. */ this(U)(U another) if (isTuple!U && isCompatibleTuples!(typeof(this), U, "=")) { foreach (i, T; Types) { field[i] = another.field[i]; } } /** Comparison for equality. */ bool opEquals(R)(R rhs) if (isTuple!R && isCompatibleTuples!(typeof(this), R, "==")) { foreach (i, Unused; Types) { if (field[i] != rhs.field[i]) return false; } return true; } /// ditto bool opEquals(R)(R rhs) const if (isTuple!R && isCompatibleTuples!(typeof(this), R, "==")) { foreach (i, Unused; Types) { if (field[i] != rhs.field[i]) return false; } return true; } /** Comparison for ordering. */ int opCmp(R)(R rhs) if (isTuple!R && isCompatibleTuples!(typeof(this), R, "<")) { foreach (i, Unused; Types) { if (field[i] != rhs.field[i]) { return field[i] < rhs.field[i] ? -1 : 1; } } return 0; } /// ditto int opCmp(R)(R rhs) const if (isTuple!R && isCompatibleTuples!(typeof(this), R, "<")) { foreach (i, Unused; Types) { if (field[i] != rhs.field[i]) { return field[i] < rhs.field[i] ? -1 : 1; } } return 0; } /** Assignment from another tuple. Each element of the source must be implicitly assignable to the respective element of the target. */ void opAssign(R)(R rhs) if (isTuple!R && allSatisfy!(isAssignable, Types)) { static assert(field.length == rhs.field.length, "Length mismatch in attempting to assign a " ~ R.stringof ~" to a "~ typeof(this).stringof); // Do not swap; opAssign should be called on the fields. foreach (i, Unused; Types) { field[i] = rhs.field[i]; } } // @@@BUG4424@@@ workaround private mixin template _workaround4424() { @disable void opAssign(typeof(this) ); } mixin _workaround4424; /** Takes a slice of the tuple. Example: ---- Tuple!(int, string, float, double) a; a[1] = "abc"; a[2] = 4.5; auto s = a.slice!(1, 3); static assert(is(typeof(s) == Tuple!(string, float))); assert(s[0] == "abc" && s[1] == 4.5); ---- */ @property ref Tuple!(sliceSpecs!(from, to)) slice(uint from, uint to)() { return *cast(typeof(return) *) &(field[from]); } /** The length of the tuple. */ enum length = field.length; /** Converts to string. */ string toString() { enum header = typeof(this).stringof ~ "(", footer = ")", separator = ", "; Appender!string app; app.put(header); foreach (i, Unused; Types) { static if (i > 0) { app.put(separator); } // TODO: Change this once toString() works for shared objects. static if (is(Unused == class) && is(Unused == shared)) formattedWrite(app, "%s", field[i].stringof); else { FormatSpec!char f; // "%s" formatElement(app, field[i], f); } } app.put(footer); return app.data; } } private template Identity(alias T) { alias T Identity; } unittest { { Tuple!(int, "a", int, "b") nosh; static assert(nosh.length == 2); nosh.a = 5; nosh.b = 6; assert(nosh.a == 5); assert(nosh.b == 6); } { Tuple!(short, double) b; static assert(b.length == 2); b[1] = 5; auto a = Tuple!(int, real)(b); assert(a[0] == 0 && a[1] == 5); a = Tuple!(int, real)(1, 2); assert(a[0] == 1 && a[1] == 2); auto c = Tuple!(int, "a", double, "b")(a); assert(c[0] == 1 && c[1] == 2); } { Tuple!(int, real) nosh; nosh[0] = 5; nosh[1] = 0; assert(nosh[0] == 5 && nosh[1] == 0); assert(nosh.toString() == "Tuple!(int, real)(5, 0)", nosh.toString()); Tuple!(int, int) yessh; nosh = yessh; } { Tuple!(int, string) t; t[0] = 10; t[1] = "str"; assert(t[0] == 10 && t[1] == "str"); assert(t.toString() == `Tuple!(int, string)(10, "str")`, t.toString()); } { Tuple!(int, "a", double, "b") x; static assert(x.a.offsetof == x[0].offsetof); static assert(x.b.offsetof == x[1].offsetof); x.b = 4.5; x.a = 5; assert(x[0] == 5 && x[1] == 4.5); assert(x.a == 5 && x.b == 4.5); } // indexing { Tuple!(int, real) t; static assert(is(typeof(t[0]) == int)); static assert(is(typeof(t[1]) == real)); int* p0 = &t[0]; real* p1 = &t[1]; t[0] = 10; t[1] = -200.0L; assert(*p0 == t[0]); assert(*p1 == t[1]); } // slicing { Tuple!(int, "x", real, "y", double, "z", string) t; t[0] = 10; t[1] = 11; t[2] = 12; t[3] = "abc"; auto a = t.slice!(0, 3); assert(a.length == 3); assert(a.x == t.x); assert(a.y == t.y); assert(a.z == t.z); auto b = t.slice!(2, 4); assert(b.length == 2); assert(b.z == t.z); assert(b[1] == t[3]); } // nesting { Tuple!(Tuple!(int, real), Tuple!(string, "s")) t; static assert(is(typeof(t[0]) == Tuple!(int, real))); static assert(is(typeof(t[1]) == Tuple!(string, "s"))); static assert(is(typeof(t[0][0]) == int)); static assert(is(typeof(t[0][1]) == real)); static assert(is(typeof(t[1].s) == string)); t[0] = tuple(10, 20.0L); t[1].s = "abc"; assert(t[0][0] == 10); assert(t[0][1] == 20.0L); assert(t[1].s == "abc"); } // non-POD { static struct S { int count; this(this) { ++count; } ~this() { --count; } void opAssign(S rhs) { count = rhs.count; } } Tuple!(S, S) ss; Tuple!(S, S) ssCopy = ss; assert(ssCopy[0].count == 1); assert(ssCopy[1].count == 1); ssCopy[1] = ssCopy[0]; assert(ssCopy[1].count == 2); } // bug 2800 { static struct R { Tuple!(int, int) _front; @property ref Tuple!(int, int) front() { return _front; } @property bool empty() { return _front[0] >= 10; } void popFront() { ++_front[0]; } } foreach (a; R()) { static assert(is(typeof(a) == Tuple!(int, int))); assert(0 <= a[0] && a[0] < 10); assert(a[1] == 0); } } // Construction with compatible elements { auto t1 = Tuple!(int, double)(1, 1); // 8702 auto t8702a = tuple(tuple(1)); auto t8702b = Tuple!(Tuple!(int))(Tuple!(int)(1)); } // Construction with compatible tuple { Tuple!(int, int) x; x[0] = 10; x[1] = 20; Tuple!(int, "a", double, "b") y = x; assert(y.a == 10); assert(y.b == 20); // incompatible static assert(!__traits(compiles, Tuple!(int, int)(y))); } // 6275 { const int x = 1; auto t1 = tuple(x); alias Tuple!(const(int)) T; auto t2 = T(1); } } unittest { // opEquals { struct Equ1 { bool opEquals(Equ1) { return true; } } auto tm1 = tuple(Equ1.init); const tc1 = tuple(Equ1.init); static assert( is(typeof(tm1 == tm1))); static assert(!is(typeof(tm1 == tc1))); static assert(!is(typeof(tc1 == tm1))); static assert(!is(typeof(tc1 == tc1))); struct Equ2 { bool opEquals(const Equ2) const { return true; } } auto tm2 = tuple(Equ2.init); const tc2 = tuple(Equ2.init); static assert( is(typeof(tm2 == tm2))); static assert( is(typeof(tm2 == tc2))); static assert( is(typeof(tc2 == tm2))); static assert( is(typeof(tc2 == tc2))); struct Equ3 { bool opEquals(T)(T) { return true; } } auto tm3 = tuple(Equ3.init); // bugzilla 8686 const tc3 = tuple(Equ3.init); static assert( is(typeof(tm3 == tm3))); static assert( is(typeof(tm3 == tc3))); static assert(!is(typeof(tc3 == tm3))); static assert(!is(typeof(tc3 == tc3))); struct Equ4 { bool opEquals(T)(T) const { return true; } } auto tm4 = tuple(Equ4.init); const tc4 = tuple(Equ4.init); static assert( is(typeof(tm4 == tm4))); static assert( is(typeof(tm4 == tc4))); static assert( is(typeof(tc4 == tm4))); static assert( is(typeof(tc4 == tc4))); } // opCmp { struct Cmp1 { int opCmp(Cmp1) { return 0; } } auto tm1 = tuple(Cmp1.init); const tc1 = tuple(Cmp1.init); static assert( is(typeof(tm1 < tm1))); static assert(!is(typeof(tm1 < tc1))); static assert(!is(typeof(tc1 < tm1))); static assert(!is(typeof(tc1 < tc1))); struct Cmp2 { int opCmp(const Cmp2) const { return 0; } } auto tm2 = tuple(Cmp2.init); const tc2 = tuple(Cmp2.init); static assert( is(typeof(tm2 < tm2))); static assert( is(typeof(tm2 < tc2))); static assert( is(typeof(tc2 < tm2))); static assert( is(typeof(tc2 < tc2))); struct Cmp3 { int opCmp(T)(T) { return 0; } } auto tm3 = tuple(Cmp3.init); const tc3 = tuple(Cmp3.init); static assert( is(typeof(tm3 < tm3))); static assert( is(typeof(tm3 < tc3))); static assert(!is(typeof(tc3 < tm3))); static assert(!is(typeof(tc3 < tc3))); struct Cmp4 { int opCmp(T)(T) const { return 0; } } auto tm4 = tuple(Cmp4.init); const tc4 = tuple(Cmp4.init); static assert( is(typeof(tm4 < tm4))); static assert( is(typeof(tm4 < tc4))); static assert( is(typeof(tc4 < tm4))); static assert( is(typeof(tc4 < tc4))); } } /** Returns a $(D Tuple) object instantiated and initialized according to the arguments. Example: ---- auto value = tuple(5, 6.7, "hello"); assert(value[0] == 5); assert(value[1] == 6.7); assert(value[2] == "hello"); ---- */ Tuple!T tuple(T...)(T args) { return typeof(return)(args); } /** Returns $(D true) if and only if $(D T) is an instance of the $(D Tuple) struct template. */ template isTuple(T) { static if (is(Unqual!T Unused : Tuple!Specs, Specs...)) { enum isTuple = true; } else { enum isTuple = false; } } unittest { static assert(isTuple!(Tuple!())); static assert(isTuple!(Tuple!(int))); static assert(isTuple!(Tuple!(int, real, string))); static assert(isTuple!(Tuple!(int, "x", real, "y"))); static assert(isTuple!(Tuple!(int, Tuple!(real), string))); static assert(isTuple!(const Tuple!(int))); static assert(isTuple!(immutable Tuple!(int))); static assert(!isTuple!(int)); static assert(!isTuple!(const int)); struct S {} static assert(!isTuple!(S)); } /** $(D Rebindable!(T)) is a simple, efficient wrapper that behaves just like an object of type $(D T), except that you can reassign it to refer to another object. For completeness, $(D Rebindable!(T)) aliases itself away to $(D T) if $(D T) is a non-const object type. However, $(D Rebindable!(T)) does not compile if $(D T) is a non-class type. Regular $(D const) object references cannot be reassigned: ---- class Widget { int x; int y() const { return a; } } const a = new Widget; a.y(); // fine a.x = 5; // error! can't modify const a a = new Widget; // error! can't modify const a ---- However, $(D Rebindable!(Widget)) does allow reassignment, while otherwise behaving exactly like a $(D const Widget): ---- auto a = Rebindable!(const Widget)(new Widget); a.y(); // fine a.x = 5; // error! can't modify const a a = new Widget; // fine ---- You may want to use $(D Rebindable) when you want to have mutable storage referring to $(D const) objects, for example an array of references that must be sorted in place. $(D Rebindable) does not break the soundness of D's type system and does not incur any of the risks usually associated with $(D cast). */ template Rebindable(T) if (is(T == class) || is(T == interface) || isArray!T) { static if (!is(T X == const U, U) && !is(T X == immutable U, U)) { alias T Rebindable; } else static if (isArray!T) { alias const(ElementType!T)[] Rebindable; } else { struct Rebindable { private union { T original; U stripped; } void opAssign(T another) pure nothrow { stripped = cast(U) another; } void opAssign(Rebindable another) pure nothrow { stripped = another.stripped; } static if (is(T == const U)) { // safely assign immutable to const void opAssign(Rebindable!(immutable U) another) pure nothrow { stripped = another.stripped; } } this(T initializer) pure nothrow { opAssign(initializer); } @property ref inout(T) get() inout pure nothrow { return original; } alias get this; } } } /** Convenience function for creating a $(D Rebindable) using automatic type inference. */ Rebindable!T rebindable(T)(T obj) if (is(T == class) || is(T == interface) || isArray!T) { typeof(return) ret; ret = obj; return ret; } /** This function simply returns the $(D Rebindable) object passed in. It's useful in generic programming cases when a given object may be either a regular $(D class) or a $(D Rebindable). */ Rebindable!T rebindable(T)(Rebindable!T obj) { return obj; } unittest { interface CI { const int foo(); } class C : CI { int foo() const { return 42; } @property int bar() const { return 23; } } Rebindable!(C) obj0; static assert(is(typeof(obj0) == C)); Rebindable!(const(C)) obj1; static assert(is(typeof(obj1.get) == const(C)), typeof(obj1.get).stringof); static assert(is(typeof(obj1.stripped) == C)); obj1 = new C; assert(obj1.get !is null); obj1 = new const(C); assert(obj1.get !is null); Rebindable!(immutable(C)) obj2; static assert(is(typeof(obj2.get) == immutable(C))); static assert(is(typeof(obj2.stripped) == C)); obj2 = new immutable(C); assert(obj1.get !is null); // test opDot assert(obj2.foo() == 42); assert(obj2.bar == 23); interface I { final int foo() const { return 42; } } Rebindable!(I) obj3; static assert(is(typeof(obj3) == I)); Rebindable!(const I) obj4; static assert(is(typeof(obj4.get) == const I)); static assert(is(typeof(obj4.stripped) == I)); static assert(is(typeof(obj4.foo()) == int)); obj4 = new class I {}; Rebindable!(immutable C) obj5i; Rebindable!(const C) obj5c; obj5c = obj5c; obj5c = obj5i; obj5i = obj5i; static assert(!__traits(compiles, obj5i = obj5c)); // Test the convenience functions. auto obj5convenience = rebindable(obj5i); assert(obj5convenience is obj5i); auto obj6 = rebindable(new immutable(C)); static assert(is(typeof(obj6) == Rebindable!(immutable C))); assert(obj6.foo() == 42); auto obj7 = rebindable(new C); CI interface1 = obj7; auto interfaceRebind1 = rebindable(interface1); assert(interfaceRebind1.foo() == 42); const interface2 = interface1; auto interfaceRebind2 = rebindable(interface2); assert(interfaceRebind2.foo() == 42); auto arr = [1,2,3,4,5]; const arrConst = arr; assert(rebindable(arr) == arr); assert(rebindable(arrConst) == arr); } /** Order the provided members to minimize size while preserving alignment. Returns a declaration to be mixed in. Example: --- struct Banner { mixin(alignForSize!(byte[6], double)(["name", "height"])); } --- Alignment is not always optimal for 80-bit reals, nor for structs declared as align(1). */ string alignForSize(E...)(string[] names...) { // Sort all of the members by .alignof. // BUG: Alignment is not always optimal for align(1) structs // or 80-bit reals or 64-bit primitives on x86. // TRICK: Use the fact that .alignof is always a power of 2, // and maximum 16 on extant systems. Thus, we can perform // a very limited radix sort. // Contains the members with .alignof = 64,32,16,8,4,2,1 assert(E.length == names.length, "alignForSize: There should be as many member names as the types"); string[7] declaration = ["", "", "", "", "", "", ""]; foreach (i, T; E) { auto a = T.alignof; auto k = a>=64? 0 : a>=32? 1 : a>=16? 2 : a>=8? 3 : a>=4? 4 : a>=2? 5 : 6; declaration[k] ~= T.stringof ~ " " ~ names[i] ~ ";\n"; } auto s = ""; foreach (decl; declaration) s ~= decl; return s; } unittest { enum x = alignForSize!(int[], char[3], short, double[5])("x", "y","z", "w"); struct Foo{ int x; } enum y = alignForSize!(ubyte, Foo, cdouble)("x", "y","z"); static if(size_t.sizeof == uint.sizeof) { enum passNormalX = x == "double[5u] w;\nint[] x;\nshort z;\nchar[3u] y;\n"; enum passNormalY = y == "cdouble z;\nFoo y;\nubyte x;\n"; enum passAbnormalX = x == "int[] x;\ndouble[5u] w;\nshort z;\nchar[3u] y;\n"; enum passAbnormalY = y == "Foo y;\ncdouble z;\nubyte x;\n"; // ^ blame http://d.puremagic.com/issues/show_bug.cgi?id=231 static assert(passNormalX || double.alignof <= (int[]).alignof && passAbnormalX); static assert(passNormalY || double.alignof <= int.alignof && passAbnormalY); } else { static assert(x == "int[] x;\ndouble[5LU] w;\nshort z;\nchar[3LU] y;\n"); static assert(y == "cdouble z;\nFoo y;\nubyte x;\n"); } } /*--* First-class reference type */ struct Ref(T) { private T * _p; this(ref T value) { _p = &value; } ref T opDot() { return *_p; } /*ref*/ T opImplicitCastTo() { return *_p; } @property ref T value() { return *_p; } void opAssign(T value) { *_p = value; } void opAssign(T * value) { _p = value; } } unittest { Ref!(int) x; int y = 42; x = &y; assert(x.value == 42); x = 5; assert(x.value == 5); assert(y == 5); } /** Defines a value paired with a distinctive "null" state that denotes the absence of a value. If default constructed, a $(D Nullable!T) object starts in the null state. Assigning it renders it non-null. Calling $(D nullify) can nullify it again. Example: ---- Nullable!int a; assert(a.isNull); a = 5; assert(!a.isNull); assert(a == 5); ---- Practically $(D Nullable!T) stores a $(D T) and a $(D bool). */ struct Nullable(T) { private T _value; private bool _isNull = true; /** Constructor initializing $(D this) with $(D value). */ this()(T value) { _value = value; _isNull = false; } /** Returns $(D true) if and only if $(D this) is in the null state. */ @property bool isNull() const pure nothrow @safe { return _isNull; } /** Forces $(D this) to the null state. */ void nullify()() { .destroy(_value); _isNull = true; } /** Assigns $(D value) to the internally-held state. If the assignment succeeds, $(D this) becomes non-null. */ void opAssign()(T value) { _value = value; _isNull = false; } /** Gets the value. $(D this) must not be in the null state. This function is also called for the implicit conversion to $(D T). */ @property ref inout(T) get() inout pure nothrow @safe { enum message = "Called `get' on null Nullable!" ~ T.stringof ~ "."; assert(!isNull, message); return _value; } /** Implicitly converts to $(D T). $(D this) must not be in the null state. */ alias get this; } unittest { Nullable!int a; assert(a.isNull); assertThrown!Throwable(a.get); a = 5; assert(!a.isNull); assert(a == 5); assert(a != 3); assert(a.get != 3); a.nullify(); assert(a.isNull); a = 3; assert(a == 3); a *= 6; assert(a == 18); a = a; assert(a == 18); a.nullify(); assertThrown!Throwable(a += 2); } unittest { auto k = Nullable!int(74); assert(k == 74); k.nullify(); assert(k.isNull); } unittest { static int f(in Nullable!int x) { return x.isNull ? 42 : x.get; } Nullable!int a; assert(f(a) == 42); a = 8; assert(f(a) == 8); a.nullify(); assert(f(a) == 42); } unittest { static struct S { int x; } Nullable!S s; assert(s.isNull); s = S(6); assert(s == S(6)); assert(s != S(0)); assert(s.get != S(0)); s.x = 9190; assert(s.x == 9190); s.nullify(); assertThrown!Throwable(s.x = 9441); } unittest { // Ensure Nullable can be used in pure/nothrow/@safe environment. function() pure nothrow @safe { Nullable!int n; assert(n.isNull); n = 4; assert(!n.isNull); assert(n == 4); n.nullify(); assert(n.isNull); }(); } unittest { // Ensure Nullable can be used when the value is not pure/nothrow/@safe static struct S { int x; this(this) @system {} } Nullable!S s; assert(s.isNull); s = S(5); assert(!s.isNull); assert(s.x == 5); s.nullify(); assert(s.isNull); } unittest { // Bugzilla 9404 alias N = Nullable!int; void foo(N a) { N b; b = a; // `N b = a;` works fine } N n; foo(n); } unittest { //Check nullable immutable is constructable { auto a1 = Nullable!(immutable int)(); auto a2 = Nullable!(immutable int)(1); auto i = a2.get; } //Check immutable nullable is constructable { auto a1 = immutable (Nullable!int)(); auto a2 = immutable (Nullable!int)(1); auto i = a2.get; } } unittest { alias NInt = Nullable!int; //Construct tests { //from other Nullable null NInt a1; NInt b1 = a1; assert(b1.isNull); //from other Nullable non-null NInt a2 = NInt(1); NInt b2 = a2; assert(b2 == 1); //Construct from similar nullable auto a3 = immutable(NInt)(); NInt b3 = a3; assert(b3.isNull); } //Assign tests { //from other Nullable null NInt a1; NInt b1; b1 = a1; assert(b1.isNull); //from other Nullable non-null NInt a2 = NInt(1); NInt b2; b2 = a2; assert(b2 == 1); //Construct from similar nullable auto a3 = immutable(NInt)(); NInt b3 = a3; b3 = a3; assert(b3.isNull); } } unittest { //Check nullable is nicelly embedable in a struct static struct S1 { Nullable!int ni; } static struct S2 //inspired from 9404 { Nullable!int ni; this(S2 other) { ni = other.ni; } void opAssign(S2 other) { ni = other.ni; } } foreach (S; TypeTuple!(S1, S2)) { S a; S b = a; S c; c = a; } } /** Just like $(D Nullable!T), except that the null state is defined as a particular value. For example, $(D Nullable!(uint, uint.max)) is an $(D uint) that sets aside the value $(D uint.max) to denote a null state. $(D Nullable!(T, nullValue)) is more storage-efficient than $(D Nullable!T) because it does not need to store an extra $(D bool). */ struct Nullable(T, T nullValue) { private T _value = nullValue; /** Constructor initializing $(D this) with $(D value). */ this()(T value) { _value = value; } /** Returns $(D true) if and only if $(D this) is in the null state. */ @property bool isNull()() const { return _value == nullValue; } /** Forces $(D this) to the null state. */ void nullify()() { _value = nullValue; } /** Assigns $(D value) to the internally-held state. No null checks are made. Note that the assignment may leave $(D this) in the null state. */ void opAssign()(T value) { _value = value; } /** Gets the value. $(D this) must not be in the null state. This function is also called for the implicit conversion to $(D T). */ @property ref inout(T) get()() inout { //@@@6169@@@: We avoid any call that might evaluate nullValue's %s, //Because it might messup get's purity and safety inference. enum message = "Called `get' on null Nullable!(" ~ T.stringof ~ ",nullValue)."; assert(!isNull, message); return _value; } /** Implicitly converts to $(D T). Gets the value. $(D this) must not be in the null state. */ alias get this; } unittest { Nullable!(int, int.min) a; assert(a.isNull); assertThrown!Throwable(a.get); a = 5; assert(!a.isNull); assert(a == 5); static assert(a.sizeof == int.sizeof); } unittest { auto a = Nullable!(int, int.min)(8); assert(a == 8); a.nullify(); assert(a.isNull); } unittest { static int f(in Nullable!(int, int.min) x) { return x.isNull ? 42 : x.get; } Nullable!(int, int.min) a; assert(f(a) == 42); a = 8; assert(f(a) == 8); a.nullify(); assert(f(a) == 42); } unittest { // Ensure Nullable can be used in pure/nothrow/@safe environment. function() pure nothrow @safe { Nullable!(int, int.min) n; assert(n.isNull); n = 4; assert(!n.isNull); assert(n == 4); n.nullify(); assert(n.isNull); }(); } unittest { // Ensure Nullable can be used when the value is not pure/nothrow/@safe static struct S { int x; bool opEquals(const S s) const @system { return s.x == x; } } Nullable!(S, S(711)) s; assert(s.isNull); s = S(5); assert(!s.isNull); assert(s.x == 5); s.nullify(); assert(s.isNull); } unittest { //Check nullable is nicelly embedable in a struct static struct S1 { Nullable!(int, 0) ni; } static struct S2 //inspired from 9404 { Nullable!(int, 0) ni; this(S2 other) { ni = other.ni; } void opAssign(S2 other) { ni = other.ni; } } foreach (S; TypeTuple!(S1, S2)) { S a; S b = a; S c; c = a; } } /** Just like $(D Nullable!T), except that the object refers to a value sitting elsewhere in memory. This makes assignments overwrite the initially assigned value. Internally $(D NullableRef!T) only stores a pointer to $(D T) (i.e., $(D Nullable!T.sizeof == (T*).sizeof)). */ struct NullableRef(T) { private T* _value; /** Constructor binding $(D this) with $(D value). */ this(T* value) pure nothrow @safe { _value = value; } /** Binds the internal state to $(D value). */ void bind(T* value) pure nothrow @safe { _value = value; } /** Returns $(D true) if and only if $(D this) is in the null state. */ @property bool isNull() const pure nothrow @safe { return _value is null; } /** Forces $(D this) to the null state. */ void nullify() pure nothrow @safe { _value = null; } /** Assigns $(D value) to the internally-held state. */ void opAssign()(T value) if (isAssignable!T) //@@@9416@@@ { enum message = "Called `opAssign' on null NullableRef!" ~ T.stringof ~ "."; assert(!isNull, message); *_value = value; } /** Gets the value. $(D this) must not be in the null state. This function is also called for the implicit conversion to $(D T). */ @property ref inout(T) get() inout pure nothrow @safe { enum message = "Called `get' on null NullableRef!" ~ T.stringof ~ "."; assert(!isNull, message); return *_value; } /** Implicitly converts to $(D T). $(D this) must not be in the null state. */ alias get this; } unittest { int x = 5, y = 7; auto a = NullableRef!(int)(&x); assert(!a.isNull); assert(a == 5); assert(x == 5); a = 42; assert(x == 42); assert(!a.isNull); assert(a == 42); a.nullify(); assert(x == 42); assert(a.isNull); assertThrown!Throwable(a.get); assertThrown!Throwable(a = 71); a.bind(&y); assert(a == 7); y = 135; assert(a == 135); } unittest { static int f(in NullableRef!int x) { return x.isNull ? 42 : x.get; } int x = 5; auto a = NullableRef!int(&x); assert(f(a) == 5); a.nullify(); assert(f(a) == 42); } unittest { // Ensure NullableRef can be used in pure/nothrow/@safe environment. function() pure nothrow @safe { auto storage = new int; *storage = 19902; NullableRef!int n; assert(n.isNull); n.bind(storage); assert(!n.isNull); assert(n == 19902); n = 2294; assert(n == 2294); assert(*storage == 2294); n.nullify(); assert(n.isNull); }(); } unittest { // Ensure NullableRef can be used when the value is not pure/nothrow/@safe static struct S { int x; this(this) @system {} bool opEquals(const S s) const @system { return s.x == x; } } auto storage = S(5); NullableRef!S s; assert(s.isNull); s.bind(&storage); assert(!s.isNull); assert(s.x == 5); s.nullify(); assert(s.isNull); } unittest { //Check nullable is nicelly embedable in a struct static struct S1 { NullableRef!int ni; } static struct S2 //inspired from 9404 { NullableRef!int ni; this(S2 other) { ni = other.ni; } void opAssign(S2 other) { ni = other.ni; } } foreach (S; TypeTuple!(S1, S2)) { S a; S b = a; S c; c = a; } } /** $(D BlackHole!Base) is a subclass of $(D Base) which automatically implements all abstract member functions in $(D Base) as do-nothing functions. Each auto-implemented function just returns the default value of the return type without doing anything. The name came from $(WEB search.cpan.org/~sburke/Class-_BlackHole-0.04/lib/Class/_BlackHole.pm, Class::_BlackHole) Perl module by Sean M. Burke. Example: -------------------- abstract class C { int m_value; this(int v) { m_value = v; } int value() @property { return m_value; } abstract real realValue() @property; abstract void doSomething(); } void main() { auto c = new BlackHole!C(42); writeln(c.value); // prints "42" // Abstract functions are implemented as do-nothing: writeln(c.realValue); // prints "NaN" c.doSomething(); // does nothing } -------------------- See_Also: AutoImplement, generateEmptyFunction */ template BlackHole(Base) { alias AutoImplement!(Base, generateEmptyFunction, isAbstractFunction) BlackHole; } unittest { // return default { interface I_1 { real test(); } auto o = new BlackHole!I_1; assert(o.test() !<>= 0); // NaN } // doc example { static class C { int m_value; this(int v) { m_value = v; } int value() @property { return m_value; } abstract real realValue() @property; abstract void doSomething(); } auto c = new BlackHole!C(42); assert(c.value == 42); assert(c.realValue !<>= 0); // NaN c.doSomething(); } } /** $(D WhiteHole!Base) is a subclass of $(D Base) which automatically implements all abstract member functions as throw-always functions. Each auto-implemented function fails with throwing an $(D Error) and does never return. Useful for trapping use of not-yet-implemented functions. The name came from $(WEB search.cpan.org/~mschwern/Class-_WhiteHole-0.04/lib/Class/_WhiteHole.pm, Class::_WhiteHole) Perl module by Michael G Schwern. Example: -------------------- class C { abstract void notYetImplemented(); } void main() { auto c = new WhiteHole!C; c.notYetImplemented(); // throws an Error } -------------------- BUGS: Nothrow functions cause program to abort in release mode because the trap is implemented with $(D assert(0)) for nothrow functions. See_Also: AutoImplement, generateAssertTrap */ template WhiteHole(Base) { alias AutoImplement!(Base, generateAssertTrap, isAbstractFunction) WhiteHole; } // / ditto class NotImplementedError : Error { this(string method) { super(method ~ " is not implemented"); } } unittest { // nothrow debug // see the BUGS above { interface I_1 { void foo(); void bar() nothrow; } auto o = new WhiteHole!I_1; uint trap; try { o.foo(); } catch (Error e) { ++trap; } assert(trap == 1); try { o.bar(); } catch (Error e) { ++trap; } assert(trap == 2); } // doc example { static class C { abstract void notYetImplemented(); } auto c = new WhiteHole!C; try { c.notYetImplemented(); assert(0); } catch (Error e) {} } } /** $(D AutoImplement) automatically implements (by default) all abstract member functions in the class or interface $(D Base) in specified way. Params: how = template which specifies _how functions will be implemented/overridden. Two arguments are passed to $(D how): the type $(D Base) and an alias to an implemented function. Then $(D how) must return an implemented function body as a string. The generated function body can use these keywords: $(UL $(LI $(D a0), $(D a1), &hellip;: arguments passed to the function;) $(LI $(D args): a tuple of the arguments;) $(LI $(D self): an alias to the function itself;) $(LI $(D parent): an alias to the overridden function (if any).) ) You may want to use templated property functions (instead of Implicit Template Properties) to generate complex functions: -------------------- // Prints log messages for each call to overridden functions. string generateLogger(C, alias fun)() @property { enum qname = C.stringof ~ "." ~ __traits(identifier, fun); string stmt; stmt ~= q{ struct Importer { import std.stdio; } }; stmt ~= `Importer.writeln$(LPAREN)"Log: ` ~ qname ~ `(", args, ")"$(RPAREN);`; static if (!__traits(isAbstractFunction, fun)) { static if (is(typeof(return) == void)) stmt ~= q{ parent(args); }; else stmt ~= q{ auto r = parent(args); Importer.writeln("--> ", r); return r; }; } return stmt; } -------------------- what = template which determines _what functions should be implemented/overridden. An argument is passed to $(D what): an alias to a non-final member function in $(D Base). Then $(D what) must return a boolean value. Return $(D true) to indicate that the passed function should be implemented/overridden. -------------------- // Sees if fun returns something. template hasValue(alias fun) { enum bool hasValue = !is(ReturnType!(fun) == void); } -------------------- Note: Generated code is inserted in the scope of $(D std.typecons) module. Thus, any useful functions outside $(D std.typecons) cannot be used in the generated code. To workaround this problem, you may $(D import) necessary things in a local struct, as done in the $(D generateLogger()) template in the above example. BUGS: $(UL $(LI Variadic arguments to constructors are not forwarded to super.) $(LI Deep interface inheritance causes compile error with messages like "Error: function std.typecons._AutoImplement!(Foo)._AutoImplement.bar does not override any function". [$(BUGZILLA 2525), $(BUGZILLA 3525)] ) $(LI The $(D parent) keyword is actually a delegate to the super class' corresponding member function. [$(BUGZILLA 2540)] ) $(LI Using alias template parameter in $(D how) and/or $(D what) may cause strange compile error. Use template tuple parameter instead to workaround this problem. [$(BUGZILLA 4217)] ) ) */ class AutoImplement(Base, alias how, alias what = isAbstractFunction) : Base { private alias AutoImplement_Helper!( "autoImplement_helper_", "Base", Base, how, what ) autoImplement_helper_; mixin(autoImplement_helper_.code); } /* * Code-generating stuffs are encupsulated in this helper template so that * namespace pollusion, which can cause name confliction with Base's public * members, should be minimized. */ private template AutoImplement_Helper(string myName, string baseName, Base, alias generateMethodBody, alias cherrypickMethod) { private static: //::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::// // Internal stuffs //::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::// // this would be deprecated by std.typelist.Filter template staticFilter(alias pred, lst...) { static if (lst.length > 0) { alias staticFilter!(pred, lst[1 .. $]) tail; // static if (pred!(lst[0])) alias TypeTuple!(lst[0], tail) staticFilter; else alias tail staticFilter; } else alias TypeTuple!() staticFilter; } // Returns function overload sets in the class C, filtered with pred. template enumerateOverloads(C, alias pred) { template Impl(names...) { static if (names.length > 0) { alias staticFilter!(pred, MemberFunctionsTuple!(C, names[0])) methods; alias Impl!(names[1 .. $]) next; static if (methods.length > 0) alias TypeTuple!(OverloadSet!(names[0], methods), next) Impl; else alias next Impl; } else alias TypeTuple!() Impl; } alias Impl!(__traits(allMembers, C)) enumerateOverloads; } //::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::// // Target functions //::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::// // Add a non-final check to the cherrypickMethod. template canonicalPicker(fun.../+[BUG 4217]+/) { enum bool canonicalPicker = !__traits(isFinalFunction, fun[0]) && cherrypickMethod!(fun); } /* * A tuple of overload sets, each item of which consists of functions to be * implemented by the generated code. */ alias enumerateOverloads!(Base, canonicalPicker) targetOverloadSets; /* * A tuple of the super class' constructors. Used for forwarding * constructor calls. */ static if (__traits(hasMember, Base, "__ctor")) alias OverloadSet!("__ctor", __traits(getOverloads, Base, "__ctor")) ctorOverloadSet; else alias OverloadSet!("__ctor") ctorOverloadSet; // empty //::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::// // Type information //::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::// /* * The generated code will be mixed into AutoImplement, which will be * instantiated in this module's scope. Thus, any user-defined types are * out of scope and cannot be used directly (i.e. by their names). * * We will use FuncInfo instances for accessing return types and parameter * types of the implemented functions. The instances will be populated to * the AutoImplement's scope in a certain way; see the populate() below. */ // Returns the preferred identifier for the FuncInfo instance for the i-th // overloaded function with the name. template INTERNAL_FUNCINFO_ID(string name, size_t i) { enum string INTERNAL_FUNCINFO_ID = "F_" ~ name ~ "_" ~ toStringNow!(i); } /* * Insert FuncInfo instances about all the target functions here. This * enables the generated code to access type information via, for example, * "autoImplement_helper_.F_foo_1". */ template populate(overloads...) { static if (overloads.length > 0) { mixin populate!(overloads[0].name, overloads[0].contents); mixin populate!(overloads[1 .. $]); } } template populate(string name, methods...) { static if (methods.length > 0) { mixin populate!(name, methods[0 .. $ - 1]); // alias methods[$ - 1] target; enum ith = methods.length - 1; mixin( "alias FuncInfo!(target) " ~ INTERNAL_FUNCINFO_ID!(name, ith) ~ ";" ); } } public mixin populate!(targetOverloadSets); public mixin populate!( ctorOverloadSet ); //::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::// // Code-generating policies //::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::// /* Common policy configurations for generating constructors and methods. */ template CommonGeneratingPolicy() { // base class identifier which generated code should use enum string BASE_CLASS_ID = baseName; // FuncInfo instance identifier which generated code should use template FUNCINFO_ID(string name, size_t i) { enum string FUNCINFO_ID = myName ~ "." ~ INTERNAL_FUNCINFO_ID!(name, i); } } /* Policy configurations for generating constructors. */ template ConstructorGeneratingPolicy() { mixin CommonGeneratingPolicy; /* Generates constructor body. Just forward to the base class' one. */ string generateFunctionBody(ctor.../+[BUG 4217]+/)() @property { enum varstyle = variadicFunctionStyle!(typeof(&ctor[0])); static if (varstyle & (Variadic.c | Variadic.d)) { // the argptr-forwarding problem pragma(msg, "Warning: AutoImplement!(", Base, ") ", "ignored variadic arguments to the constructor ", FunctionTypeOf!(typeof(&ctor[0])) ); } return "super(args);"; } } /* Policy configurations for genearting target methods. */ template MethodGeneratingPolicy() { mixin CommonGeneratingPolicy; /* Geneartes method body. */ string generateFunctionBody(func.../+[BUG 4217]+/)() @property { return generateMethodBody!(Base, func); // given } } //::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::// // Generated code //::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::// alias MemberFunctionGenerator!( ConstructorGeneratingPolicy!() ) ConstructorGenerator; alias MemberFunctionGenerator!( MethodGeneratingPolicy!() ) MethodGenerator; public enum string code = ConstructorGenerator.generateCode!( ctorOverloadSet ) ~ "\n" ~ MethodGenerator.generateCode!(targetOverloadSets); debug (SHOW_GENERATED_CODE) { pragma(msg, "-------------------- < ", Base, " >"); pragma(msg, code); pragma(msg, "--------------------"); } } //debug = SHOW_GENERATED_CODE; version(unittest) import core.vararg; unittest { // no function to implement { interface I_1 {} auto o = new BlackHole!I_1; } // parameters { interface I_3 { void test(int, in int, out int, ref int, lazy int); } auto o = new BlackHole!I_3; } // use of user-defined type { struct S {} interface I_4 { S test(); } auto o = new BlackHole!I_4; } // overloads { interface I_5 { void test(string); real test(real); int test(); int test() @property; // ? } auto o = new BlackHole!I_5; } // constructor forwarding { static class C_6 { this(int n) { assert(n == 42); } this(string s) { assert(s == "Deeee"); } this(...) {} } auto o1 = new BlackHole!C_6(42); auto o2 = new BlackHole!C_6("Deeee"); auto o3 = new BlackHole!C_6(1, 2, 3, 4); } // attributes { interface I_7 { ref int test_ref(); int test_pure() pure; int test_nothrow() nothrow; int test_property() @property; int test_safe() @safe; int test_trusted() @trusted; int test_system() @system; int test_pure_nothrow() pure nothrow; } auto o = new BlackHole!I_7; } // storage classes { interface I_8 { void test_const() const; void test_immutable() immutable; void test_shared() shared; void test_shared_const() shared const; } auto o = new BlackHole!I_8; } /+ // deep inheritance { // XXX [BUG 2525,3525] // NOTE: [r494] func.c(504-571) FuncDeclaration::semantic() interface I { void foo(); } interface J : I {} interface K : J {} static abstract class C_9 : K {} auto o = new BlackHole!C_9; }+/ } /* Used by MemberFunctionGenerator. */ package template OverloadSet(string nam, T...) { enum string name = nam; alias T contents; } /* Used by MemberFunctionGenerator. */ package template FuncInfo(alias func, /+[BUG 4217 ?]+/ T = typeof(&func)) { alias ReturnType!(T) RT; alias ParameterTypeTuple!(T) PT; } package template FuncInfo(Func) { alias ReturnType!(Func) RT; alias ParameterTypeTuple!(Func) PT; } /* General-purpose member function generator. -------------------- template GeneratingPolicy() { // [optional] the name of the class where functions are derived enum string BASE_CLASS_ID; // [optional] define this if you have only function types enum bool WITHOUT_SYMBOL; // [optional] Returns preferred identifier for i-th parameter. template PARAMETER_VARIABLE_ID(size_t i); // Returns the identifier of the FuncInfo instance for the i-th overload // of the specified name. The identifier must be accessible in the scope // where generated code is mixed. template FUNCINFO_ID(string name, size_t i); // Returns implemented function body as a string. When WITHOUT_SYMBOL is // defined, the latter is used. template generateFunctionBody(alias func); template generateFunctionBody(string name, FuncType); } -------------------- */ package template MemberFunctionGenerator(alias Policy) { private static: //::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::// // Internal stuffs //::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::// enum CONSTRUCTOR_NAME = "__ctor"; // true if functions are derived from a base class enum WITH_BASE_CLASS = __traits(hasMember, Policy, "BASE_CLASS_ID"); // true if functions are specified as types, not symbols enum WITHOUT_SYMBOL = __traits(hasMember, Policy, "WITHOUT_SYMBOL"); // preferred identifier for i-th parameter variable static if (__traits(hasMember, Policy, "PARAMETER_VARIABLE_ID")) { alias Policy.PARAMETER_VARIABLE_ID PARAMETER_VARIABLE_ID; } else { template PARAMETER_VARIABLE_ID(size_t i) { enum string PARAMETER_VARIABLE_ID = "a" ~ toStringNow!(i); // default: a0, a1, ... } } // Returns a tuple consisting of 0,1,2,...,n-1. For static foreach. template CountUp(size_t n) { static if (n > 0) alias TypeTuple!(CountUp!(n - 1), n - 1) CountUp; else alias TypeTuple!() CountUp; } //::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::// // Code generator //::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::// /* * Runs through all the target overload sets and generates D code which * implements all the functions in the overload sets. */ public string generateCode(overloads...)() @property { string code = ""; // run through all the overload sets foreach (i_; CountUp!(0 + overloads.length)) // workaround { enum i = 0 + i_; // workaround alias overloads[i] oset; code ~= generateCodeForOverloadSet!(oset); static if (WITH_BASE_CLASS && oset.name != CONSTRUCTOR_NAME) { // The generated function declarations may hide existing ones // in the base class (cf. HiddenFuncError), so we put an alias // declaration here to reveal possible hidden functions. code ~= Format!("alias %s.%s %s;\n", Policy.BASE_CLASS_ID, // [BUG 2540] super. oset.name, oset.name ); } } return code; } // handle each overload set private string generateCodeForOverloadSet(alias oset)() @property { string code = ""; foreach (i_; CountUp!(0 + oset.contents.length)) // workaround { enum i = 0 + i_; // workaround code ~= generateFunction!( Policy.FUNCINFO_ID!(oset.name, i), oset.name, oset.contents[i]) ~ "\n"; } return code; } /* * Returns D code which implements the function func. This function * actually generates only the declarator part; the function body part is * generated by the functionGenerator() policy. */ public string generateFunction( string myFuncInfo, string name, func... )() @property { enum isCtor = (name == CONSTRUCTOR_NAME); string code; // the result /*** Function Declarator ***/ { alias FunctionTypeOf!(func) Func; alias FunctionAttribute FA; enum atts = functionAttributes!(func); enum realName = isCtor ? "this" : name; /* Made them CTFE funcs just for the sake of Format!(...) */ // return type with optional "ref" static string make_returnType() { string rtype = ""; if (!isCtor) { if (atts & FA.ref_) rtype ~= "ref "; rtype ~= myFuncInfo ~ ".RT"; } return rtype; } enum returnType = make_returnType(); // function attributes attached after declaration static string make_postAtts() { string poatts = ""; if (atts & FA.pure_ ) poatts ~= " pure"; if (atts & FA.nothrow_) poatts ~= " nothrow"; if (atts & FA.property) poatts ~= " @property"; if (atts & FA.safe ) poatts ~= " @safe"; if (atts & FA.trusted ) poatts ~= " @trusted"; return poatts; } enum postAtts = make_postAtts(); // function storage class static string make_storageClass() { string postc = ""; if (is(Func == shared)) postc ~= " shared"; if (is(Func == const)) postc ~= " const"; if (is(Func == immutable)) postc ~= " immutable"; return postc; } enum storageClass = make_storageClass(); // if (isAbstractFunction!func) code ~= "override "; code ~= Format!("extern(%s) %s %s(%s) %s %s\n", functionLinkage!(func), returnType, realName, generateParameters!(myFuncInfo, func)(), postAtts, storageClass ); } /*** Function Body ***/ code ~= "{\n"; { enum nparams = ParameterTypeTuple!(func).length; /* Declare keywords: args, self and parent. */ string preamble; preamble ~= "alias TypeTuple!(" ~ enumerateParameters!(nparams) ~ ") args;\n"; if (!isCtor) { preamble ~= "alias " ~ name ~ " self;\n"; if (WITH_BASE_CLASS && !__traits(isAbstractFunction, func)) //preamble ~= "alias super." ~ name ~ " parent;\n"; // [BUG 2540] preamble ~= "auto parent = &super." ~ name ~ ";\n"; } // Function body static if (WITHOUT_SYMBOL) enum fbody = Policy.generateFunctionBody!(name, func); else enum fbody = Policy.generateFunctionBody!(func); code ~= preamble; code ~= fbody; } code ~= "}"; return code; } /* * Returns D code which declares function parameters. * "ref int a0, real a1, ..." */ private string generateParameters(string myFuncInfo, func...)() { alias ParameterStorageClass STC; alias ParameterStorageClassTuple!(func) stcs; enum nparams = stcs.length; string params = ""; // the result foreach (i, stc; stcs) { if (i > 0) params ~= ", "; // Parameter storage classes. if (stc & STC.scope_) params ~= "scope "; if (stc & STC.out_ ) params ~= "out "; if (stc & STC.ref_ ) params ~= "ref "; if (stc & STC.lazy_ ) params ~= "lazy "; // Take parameter type from the FuncInfo. params ~= myFuncInfo ~ ".PT[" ~ toStringNow!(i) ~ "]"; // Declare a parameter variable. params ~= " " ~ PARAMETER_VARIABLE_ID!(i); } // Add some ellipsis part if needed. final switch (variadicFunctionStyle!(func)) { case Variadic.no: break; case Variadic.c, Variadic.d: // (...) or (a, b, ...) params ~= (nparams == 0) ? "..." : ", ..."; break; case Variadic.typesafe: params ~= " ..."; break; } return params; } // Returns D code which enumerates n parameter variables using comma as the // separator. "a0, a1, a2, a3" private string enumerateParameters(size_t n)() @property { string params = ""; foreach (i_; CountUp!(n)) { enum i = 0 + i_; // workaround if (i > 0) params ~= ", "; params ~= PARAMETER_VARIABLE_ID!(i); } return params; } } /** Predefined how-policies for $(D AutoImplement). These templates are used by $(D BlackHole) and $(D WhiteHole), respectively. */ template generateEmptyFunction(C, func.../+[BUG 4217]+/) { static if (is(ReturnType!(func) == void)) enum string generateEmptyFunction = q{ }; else static if (functionAttributes!(func) & FunctionAttribute.ref_) enum string generateEmptyFunction = q{ static typeof(return) dummy; return dummy; }; else enum string generateEmptyFunction = q{ return typeof(return).init; }; } /// ditto template generateAssertTrap(C, func.../+[BUG 4217]+/) { static if (functionAttributes!(func) & FunctionAttribute.nothrow_) //XXX { pragma(msg, "Warning: WhiteHole!(", C, ") used assert(0) instead " "of Error for the auto-implemented nothrow function ", C, ".", __traits(identifier, func)); enum string generateAssertTrap = `assert(0, "` ~ C.stringof ~ "." ~ __traits(identifier, func) ~ ` is not implemented");`; } else enum string generateAssertTrap = `throw new NotImplementedError("` ~ C.stringof ~ "." ~ __traits(identifier, func) ~ `");`; } /** Options regarding auto-initialization of a $(D RefCounted) object (see the definition of $(D RefCounted) below). */ enum RefCountedAutoInitialize { /// Do not auto-initialize the object no, /// Auto-initialize the object yes, } /** Defines a reference-counted object containing a $(D T) value as payload. $(D RefCounted) keeps track of all references of an object, and when the reference count goes down to zero, frees the underlying store. $(D RefCounted) uses $(D malloc) and $(D free) for operation. $(D RefCounted) is unsafe and should be used with care. No references to the payload should be escaped outside the $(D RefCounted) object. The $(D autoInit) option makes the object ensure the store is automatically initialized. Leaving $(D autoInit == RefCountedAutoInitialize.yes) (the default option) is convenient but has the cost of a test whenever the payload is accessed. If $(D autoInit == RefCountedAutoInitialize.no), user code must call either $(D refCountedIsInitialized) or $(D refCountedEnsureInitialized) before attempting to access the payload. Not doing so results in null pointer dereference. Example: ---- // A pair of an $(D int) and a $(D size_t) - the latter being the // reference count - will be dynamically allocated auto rc1 = RefCounted!int(5); assert(rc1 == 5); // No more allocation, add just one extra reference count auto rc2 = rc1; // Reference semantics rc2 = 42; assert(rc1 == 42); // the pair will be freed when rc1 and rc2 go out of scope ---- */ struct RefCounted(T, RefCountedAutoInitialize autoInit = RefCountedAutoInitialize.yes) if (!is(T == class)) { /// $(D RefCounted) storage implementation. struct RefCountedStore { private struct Impl { T _payload; size_t _count; } private Impl* _store; private void initialize(A...)(auto ref A args) { _store = cast(Impl*) enforce(malloc(Impl.sizeof)); static if (hasIndirections!T) GC.addRange(&_store._payload, T.sizeof); emplace(&_store._payload, args); _store._count = 1; } /** Returns $(D true) if and only if the underlying store has been allocated and initialized. */ @property nothrow @safe bool isInitialized() const { return _store !is null; } /** Returns underlying reference count if it is allocated and initialized (a positive integer), and $(D 0) otherwise. */ @property nothrow @safe size_t refCount() const { return isInitialized ? _store._count : 0; } /** Makes sure the payload was properly initialized. Such a call is typically inserted before using the payload. */ void ensureInitialized() { if (!isInitialized) initialize(); } } RefCountedStore _refCounted; /// Returns storage implementation struct. @property nothrow @safe ref inout(RefCountedStore) refCountedStore() inout { return _refCounted; } /** Constructor that initializes the payload. Postcondition: $(D refCountedIsInitialized) */ this(A...)(auto ref A args) if (A.length > 0) { _refCounted.initialize(args); } /** Constructor that tracks the reference count appropriately. If $(D !refCountedIsInitialized), does nothing. */ this(this) { if (!_refCounted.isInitialized) return; ++_refCounted._store._count; } /** Destructor that tracks the reference count appropriately. If $(D !refCountedIsInitialized), does nothing. When the reference count goes down to zero, calls $(D destroy) agaist the payload and calls $(D free) to deallocate the corresponding resource. */ ~this() { if (!_refCounted.isInitialized) return; assert(_refCounted._store._count > 0); if (--_refCounted._store._count) return; // Done, deallocate .destroy(_refCounted._store._payload); static if (hasIndirections!T) GC.removeRange(&_refCounted._store._payload); free(_refCounted._store); _refCounted._store = null; } /** Assignment operators */ void opAssign(typeof(this) rhs) { swap(_refCounted._store, rhs._refCounted._store); } /// Ditto void opAssign(T rhs) { static if (autoInit == RefCountedAutoInitialize.yes) { _refCounted.ensureInitialized(); } else { assert(_refCounted.isInitialized); } move(rhs, _refCounted._store._payload); } //version to have a single properly ddoc'ed function (w/ correct sig) version(StdDdoc) { /** Returns a reference to the payload. If (autoInit == RefCountedAutoInitialize.yes), calls $(D refCountedEnsureInitialized). Otherwise, just issues $(D assert(refCountedIsInitialized)). Used with $(D alias refCountedPayload this;), so callers can just use the $(D RefCounted) object as a $(D T). $(BLUE The first overload exists only if $(D autoInit == RefCountedAutoInitialize.yes).) So if $(D autoInit == RefCountedAutoInitialize.no) or called for a constant or immutable object, then $(D refCountedPayload) will also be qualified as safe and nothrow (but will still assert if not initialized). */ @property ref T refCountedPayload(); /// ditto @property nothrow @safe ref inout(T) refCountedPayload() inout; } else { static if (autoInit == RefCountedAutoInitialize.yes) { //Can't use inout here because of potential mutation @property ref T refCountedPayload() { _refCounted.ensureInitialized(); return _refCounted._store._payload; } } @property nothrow @safe ref inout(T) refCountedPayload() inout { assert(_refCounted.isInitialized); return _refCounted._store._payload; } } /** Returns a reference to the payload. If (autoInit == RefCountedAutoInitialize.yes), calls $(D refCountedEnsureInitialized). Otherwise, just issues $(D assert(refCountedIsInitialized)). */ alias refCountedPayload this; } unittest { RefCounted!int* p; { auto rc1 = RefCounted!int(5); p = &rc1; assert(rc1 == 5); assert(rc1._refCounted._store._count == 1); auto rc2 = rc1; assert(rc1._refCounted._store._count == 2); // Reference semantics rc2 = 42; assert(rc1 == 42); rc2 = rc2; assert(rc2._refCounted._store._count == 2); rc1 = rc2; assert(rc1._refCounted._store._count == 2); } assert(p._refCounted._store == null); // RefCounted as a member struct A { RefCounted!int x; this(int y) { x._refCounted.initialize(y); } A copy() { auto another = this; return another; } } auto a = A(4); auto b = a.copy(); assert(a.x._refCounted._store._count == 2, "BUG 4356 still unfixed"); } unittest { RefCounted!int p1, p2; swap(p1, p2); } // 6606 unittest { union U { size_t i; void* p; } struct S { U u; } alias RefCounted!S SRC; } // 6436 unittest { struct S { this(ref int val) { assert(val == 3); ++val; } } int val = 3; auto s = RefCounted!S(val); assert(val == 4); } unittest { RefCounted!int a; a = 5; //This should not assert assert(a == 5); RefCounted!int b; b = a; //This should not assert either assert(b == 5); } /** Make proxy for $(D a). Example: ---- struct MyInt { private int value; mixin Proxy!value; this(int n){ value = n; } } MyInt n = 10; // Enable operations that original type has. ++n; assert(n == 11); assert(n * 2 == 22); void func(int n) { } // Disable implicit conversions to original type. //int x = n; //func(n); ---- */ mixin template Proxy(alias a) { auto ref opEquals(this X)(auto ref typeof(this) b) { import std.algorithm; static assert(startsWith(a.stringof, "this.")); return a == mixin("b."~a.stringof[5..$]); // remove "this." } auto ref opEquals(this X, B)(auto ref B b) if (!is(B == typeof(this))) { return a == b; } auto ref opCmp(this X, B)(auto ref B b) if (!is(typeof(a.opCmp(b))) || !is(typeof(b.opCmp(a)))) { static if (is(typeof(a.opCmp(b)))) return a.opCmp(b); else static if (is(typeof(b.opCmp(a)))) return -b.opCmp(a); else return a < b ? -1 : a > b ? +1 : 0; } auto ref opCall(this X, Args...)(auto ref Args args) { return a(args); } auto ref opCast(T, this X)() { return cast(T)a; } auto ref opIndex(this X, D...)(auto ref D i) { return a[i]; } auto ref opSlice(this X )() { return a[]; } auto ref opSlice(this X, B, E)(auto ref B b, auto ref E e) { return a[b..e]; } auto ref opUnary (string op, this X )() { return mixin(op~"a"); } auto ref opIndexUnary(string op, this X, D...)(auto ref D i) { return mixin(op~"a[i]"); } auto ref opSliceUnary(string op, this X )() { return mixin(op~"a[]"); } auto ref opSliceUnary(string op, this X, B, E)(auto ref B b, auto ref E e) { return mixin(op~"a[b..e]"); } auto ref opBinary (string op, this X, B)(auto ref B b) { return mixin("a "~op~" b"); } auto ref opBinaryRight(string op, this X, B)(auto ref B b) { return mixin("b "~op~" a"); } static if (!is(typeof(this) == class)) { private import std.traits; static if (isAssignable!(typeof(a), typeof(a))) { auto ref opAssign(this X)(auto ref typeof(this) v) { a = mixin("v."~a.stringof[5..$]); // remove "this." return this; } } else { @disable void opAssign(this X)(auto ref typeof(this) v); } } auto ref opAssign (this X, V )(auto ref V v) if (!is(V == typeof(this))) { return a = v; } auto ref opIndexAssign(this X, V, D...)(auto ref V v, auto ref D i) { return a[i] = v; } auto ref opSliceAssign(this X, V )(auto ref V v) { return a[] = v; } auto ref opSliceAssign(this X, V, B, E)(auto ref V v, auto ref B b, auto ref E e) { return a[b..e] = v; } auto ref opOpAssign (string op, this X, V )(auto ref V v) { return mixin("a " ~op~"= v"); } auto ref opIndexOpAssign(string op, this X, V, D...)(auto ref V v, auto ref D i) { return mixin("a[i] " ~op~"= v"); } auto ref opSliceOpAssign(string op, this X, V )(auto ref V v) { return mixin("a[] " ~op~"= v"); } auto ref opSliceOpAssign(string op, this X, V, B, E)(auto ref V v, auto ref B b, auto ref E e) { return mixin("a[b..e] "~op~"= v"); } template opDispatch(string name) { static if (is(typeof(__traits(getMember, a, name)) == function)) { // non template function auto ref opDispatch(this X, Args...)(auto ref Args args) { return mixin("a."~name~"(args)"); } } else static if (is(typeof(mixin("a."~name))) || __traits(getOverloads, a, name).length != 0) { // field or property function @property auto ref opDispatch(this X)() { return mixin("a."~name); } @property auto ref opDispatch(this X, V)(auto ref V v) { return mixin("a."~name~" = v"); } } else { // member template template opDispatch(T...) { auto ref opDispatch(this X, Args...)(auto ref Args args){ return mixin("a."~name~"!T(args)"); } } } } } unittest { static struct MyInt { private int value; mixin Proxy!value; this(int n){ value = n; } } MyInt m = 10; static assert(!__traits(compiles, { int x = m; })); static assert(!__traits(compiles, { void func(int n){} func(m); })); assert(m == 10); assert(m != 20); assert(m < 20); assert(+m == 10); assert(-m == -10); assert(++m == 11); assert(m++ == 11); assert(m == 12); assert(--m == 11); assert(m-- == 11); assert(m == 10); assert(cast(double)m == 10.0); assert(m + 10 == 20); assert(m - 5 == 5); assert(m * 20 == 200); assert(m / 2 == 5); assert(10 + m == 20); assert(15 - m == 5); assert(20 * m == 200); assert(50 / m == 5); m = m; m = 20; assert(m == 20); } unittest { static struct MyArray { private int[] value; mixin Proxy!value; this(int[] arr){ value = arr; } } MyArray a = [1,2,3,4]; assert(a == [1,2,3,4]); assert(a != [5,6,7,8]); assert(+a[0] == 1); version (LittleEndian) assert(cast(ulong[])a == [0x0000_0002_0000_0001, 0x0000_0004_0000_0003]); else assert(cast(ulong[])a == [0x0000_0001_0000_0002, 0x0000_0003_0000_0004]); assert(a ~ [10,11] == [1,2,3,4,10,11]); assert(a[0] == 1); //assert(a[] == [1,2,3,4]); // blocked by bug 2486 //assert(a[2..4] == [3,4]); // blocked by bug 2486 a = a; a = [5,6,7,8]; assert(a == [5,6,7,8]); a[0] = 0; assert(a == [0,6,7,8]); a[] = 1; assert(a == [1,1,1,1]); a[0..3] = 2; assert(a == [2,2,2,1]); a[0] += 2; assert(a == [4,2,2,1]); a[] *= 2; assert(a == [8,4,4,2]); a[0..2] /= 2; assert(a == [4,2,4,2]); } unittest { class Foo { int field; @property const int val1(){ return field; } @property void val1(int n){ field = n; } @property ref int val2(){ return field; } const int func(int x, int y){ return x; } void func1(ref int a){ a = 9; } T opCast(T)(){ return T.init; } T tempfunc(T)() { return T.init; } } class Hoge { Foo foo; mixin Proxy!foo; this(Foo f) { foo = f; } } auto h = new Hoge(new Foo()); int n; // blocked by bug 7641 //static assert(!__traits(compiles, { Foo f = h; })); // field h.field = 1; // lhs of assign n = h.field; // rhs of assign assert(h.field == 1); // lhs of BinExp assert(1 == h.field); // rhs of BinExp assert(n == 1); // getter/setter property function h.val1 = 4; n = h.val1; assert(h.val1 == 4); assert(4 == h.val1); assert(n == 4); // ref getter property function h.val2 = 8; n = h.val2; assert(h.val2 == 8); assert(8 == h.val2); assert(n == 8); // member function assert(h.func(2,4) == 2); h.func1(n); assert(n == 9); // bug5896 test assert(h.opCast!int() == 0); assert(cast(int)h == 0); immutable(Hoge) ih = new immutable(Hoge)(new Foo()); static assert(!__traits(compiles, ih.opCast!int())); static assert(!__traits(compiles, cast(int)ih)); // template member function assert(h.tempfunc!int() == 0); } unittest { struct MyInt { int payload; mixin Proxy!payload; } MyInt v; v = v; struct Foo { @disable void opAssign(typeof(this)); } struct MyFoo { Foo payload; mixin Proxy!payload; } MyFoo f; static assert(!__traits(compiles, f = f)); struct MyFoo2 { Foo payload; mixin Proxy!payload; // override default Proxy behavior void opAssign(typeof(this) rhs){} } MyFoo2 f2; f2 = f2; } /** Library typedef. */ template Typedef(T) { alias .Typedef!(T, T.init) Typedef; } /// ditto struct Typedef(T, T init, string cookie=null) { private T Typedef_payload = init; this(T init) { Typedef_payload = init; } mixin Proxy!Typedef_payload; } unittest { Typedef!int x = 10; static assert(!__traits(compiles, { int y = x; })); static assert(!__traits(compiles, { long z = x; })); Typedef!int y = 10; assert(x == y); Typedef!(float, 1.0) z; // specifies the init assert(z == 1.0); alias Typedef!(int, 0, "dollar") Dollar; alias Typedef!(int, 0, "yen") Yen; static assert(!is(Dollar == Yen)); } /** Allocates a $(D class) object right inside the current scope, therefore avoiding the overhead of $(D new). This facility is unsafe; it is the responsibility of the user to not escape a reference to the object outside the scope. Note: it's illegal to move a class reference even if you are sure there are no pointers to it. Example: ---- unittest { class A { int x; } auto a1 = scoped!A(); auto a2 = scoped!A(); a1.x = 42; a2.x = 53; assert(a1.x == 42); auto a3 = a2; // illegal, fails to compile assert([a2][0].x == 42); // illegal, unexpected behaviour } ---- */ @system auto scoped(T, Args...)(auto ref Args args) if (is(T == class)) { // _d_newclass now use default GC alignment (looks like (void*).sizeof * 2 for // small objects). We will just use the maximum of filed alignments. alias classInstanceAlignment!T alignment; alias _alignUp!alignment aligned; static struct Scoped(T) { // Addition of `alignment` is required as `Scoped_store` can be misaligned in memory. private void[aligned(__traits(classInstanceSize, T) + size_t.sizeof) + alignment] Scoped_store = void; @property inout(T) Scoped_payload() inout { void* alignedStore = cast(void*) aligned(cast(size_t) Scoped_store.ptr); // As `Scoped` can be unaligned moved in memory class instance should be moved accordingly. immutable size_t d = alignedStore - Scoped_store.ptr; size_t* currD = cast(size_t*) &Scoped_store[$ - size_t.sizeof]; if(d != *currD) { import core.stdc.string; memmove(alignedStore, Scoped_store.ptr + *currD, __traits(classInstanceSize, T)); *currD = d; } return cast(inout(T)) alignedStore; } alias Scoped_payload this; @disable this(this) { assert(false, "Illegal call to Scoped this(this)"); } ~this() { // `destroy` will also write .init but we have no functions in druntime // for deterministic finalization and memory releasing for now. .destroy(Scoped_payload); } } Scoped!T result; immutable size_t d = cast(void*) result.Scoped_payload - result.Scoped_store.ptr; *cast(size_t*) &result.Scoped_store[$ - size_t.sizeof] = d; emplace!(Unqual!T)(result.Scoped_store[d .. $ - size_t.sizeof], args); return result; } private size_t _alignUp(size_t alignment)(size_t n) if(alignment > 0 && !((alignment - 1) & alignment)) { enum badEnd = alignment - 1; // 0b11, 0b111, ... return (n + badEnd) & ~badEnd; } unittest // Issue 6580 testcase { enum alignment = (void*).alignof; static class C0 { } static class C1 { byte b; } static class C2 { byte[2] b; } static class C3 { byte[3] b; } static class C7 { byte[7] b; } static assert(scoped!C0().sizeof % alignment == 0); static assert(scoped!C1().sizeof % alignment == 0); static assert(scoped!C2().sizeof % alignment == 0); static assert(scoped!C3().sizeof % alignment == 0); static assert(scoped!C7().sizeof % alignment == 0); enum longAlignment = long.alignof; static class C1long { long long_; byte byte_ = 4; this() { } this(long _long, ref int i) { long_ = _long; ++i; } } static class C2long { byte[2] byte_ = [5, 6]; long long_ = 7; } static assert(scoped!C1long().sizeof % longAlignment == 0); static assert(scoped!C2long().sizeof % longAlignment == 0); void alignmentTest() { int var = 5; auto c1long = scoped!C1long(3, var); assert(var == 6); auto c2long = scoped!C2long(); assert(cast(size_t)&c1long.long_ % longAlignment == 0); assert(cast(size_t)&c2long.long_ % longAlignment == 0); assert(c1long.long_ == 3 && c1long.byte_ == 4); assert(c2long.byte_ == [5, 6] && c2long.long_ == 7); } alignmentTest(); version(DigitalMars) { void test(size_t size) { import core.stdc.stdlib; alloca(size); alignmentTest(); } foreach(i; 0 .. 10) test(i); } else { void test(size_t size)() { byte[size] arr; alignmentTest(); } foreach(i; TypeTuple!(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10)) test!i(); } } unittest // Original Issue 6580 testcase { class C { int i; byte b; } auto sa = [scoped!C(), scoped!C()]; assert(cast(size_t)&sa[0].i % int.alignof == 0); assert(cast(size_t)&sa[1].i % int.alignof == 0); // fails } unittest { class A { int x = 1; } auto a1 = scoped!A(); assert(a1.x == 1); auto a2 = scoped!A(); a1.x = 42; a2.x = 53; assert(a1.x == 42); } unittest { class A { int x = 1; this() { x = 2; } } auto a1 = scoped!A(); assert(a1.x == 2); auto a2 = scoped!A(); a1.x = 42; a2.x = 53; assert(a1.x == 42); } unittest { class A { int x = 1; this(int y) { x = y; } ~this() {} } auto a1 = scoped!A(5); assert(a1.x == 5); auto a2 = scoped!A(42); a1.x = 42; a2.x = 53; assert(a1.x == 42); } unittest { class A { static bool dead; ~this() { dead = true; } } class B : A { static bool dead; ~this() { dead = true; } } { auto b = scoped!B(); } assert(B.dead, "asdasd"); assert(A.dead, "asdasd"); } unittest // Issue 8039 testcase { static int dels; static struct S { ~this(){ ++dels; } } static class A { S s; } dels = 0; { scoped!A(); } assert(dels == 1); static class B { S[2] s; } dels = 0; { scoped!B(); } assert(dels == 2); static struct S2 { S[3] s; } static class C { S2[2] s; } dels = 0; { scoped!C(); } assert(dels == 6); static class D: A { S2[2] s; } dels = 0; { scoped!D(); } assert(dels == 1+6); } unittest { // bug4500 class A { this() { a = this; } this(int i) { a = this; } A a; bool check() { return this is a; } } auto a1 = scoped!A(); assert(a1.check()); auto a2 = scoped!A(1); assert(a2.check()); a1.a = a1; assert(a1.check()); } unittest { static class A { static int sdtor; this() { ++sdtor; assert(sdtor == 1); } ~this() { assert(sdtor == 1); --sdtor; } } interface Bob {} static class ABob : A, Bob { this() { ++sdtor; assert(sdtor == 2); } ~this() { assert(sdtor == 2); --sdtor; } } A.sdtor = 0; scope(exit) assert(A.sdtor == 0); auto abob = scoped!ABob(); } unittest { static class A { this(int) {} } static assert(!__traits(compiles, scoped!A())); } unittest { static class A { @property inout(int) foo() inout { return 1; } } auto a1 = scoped!A(); assert(a1.foo == 1); static assert(is(typeof(a1.foo) == int)); auto a2 = scoped!(const(A))(); assert(a2.foo == 1); static assert(is(typeof(a2.foo) == const(int))); auto a3 = scoped!(immutable(A))(); assert(a3.foo == 1); static assert(is(typeof(a3.foo) == immutable(int))); const c1 = scoped!A(); assert(c1.foo == 1); static assert(is(typeof(c1.foo) == const(int))); const c2 = scoped!(const(A))(); assert(c2.foo == 1); static assert(is(typeof(c2.foo) == const(int))); const c3 = scoped!(immutable(A))(); assert(c3.foo == 1); static assert(is(typeof(c3.foo) == immutable(int))); } unittest { class C { this(ref int val) { assert(val == 3); ++val; } } int val = 3; auto s = scoped!C(val); assert(val == 4); } /** Defines a simple, self-documenting yes/no flag. This makes it easy for APIs to define functions accepting flags without resorting to $(D bool), which is opaque in calls, and without needing to define an enumerated type separately. Using $(D Flag!"Name") instead of $(D bool) makes the flag's meaning visible in calls. Each yes/no flag has its own type, which makes confusions and mix-ups impossible. Example: ---- // Before string getLine(bool keepTerminator) { ... if (keepTerminator) ... ... } ... // Code calling getLine (usually far away from its definition) can't // be understood without looking at the documentation, even by users // familiar with the API. Assuming the reverse meaning // (i.e. "ignoreTerminator") and inserting the wrong code compiles and // runs with erroneous results. auto line = getLine(false); // After string getLine(Flag!"KeepTerminator" keepTerminator) { ... if (keepTerminator) ... ... } ... // Code calling getLine can be easily read and understood even by // people not fluent with the API. auto line = getLine(Flag!"KeepTerminator".yes); ---- Passing categorical data by means of unstructured $(D bool) parameters is classified under "simple-data coupling" by Steve McConnell in the $(LUCKY Code Complete) book, along with three other kinds of coupling. The author argues citing several studies that coupling has a negative effect on code quality. $(D Flag) offers a simple structuring method for passing yes/no flags to APIs. As a perk, the flag's name may be any string and as such can include characters not normally allowed in identifiers, such as spaces and dashes. */ template Flag(string name) { /// enum Flag : bool { /** When creating a value of type $(D Flag!"Name"), use $(D Flag!"Name".no) for the negative option. When using a value of type $(D Flag!"Name"), compare it against $(D Flag!"Name".no) or just $(D false) or $(D 0). */ no = false, /** When creating a value of type $(D Flag!"Name"), use $(D Flag!"Name".yes) for the affirmative option. When using a value of type $(D Flag!"Name"), compare it against $(D Flag!"Name".yes). */ yes = true } } /** Convenience names that allow using e.g. $(D Yes.encryption) instead of $(D Flag!"encryption".yes) and $(D No.encryption) instead of $(D Flag!"encryption".no). */ struct Yes { template opDispatch(string name) { enum opDispatch = Flag!name.yes; } } //template yes(string name) { enum Flag!name yes = Flag!name.yes; } /// Ditto struct No { template opDispatch(string name) { enum opDispatch = Flag!name.no; } } //template no(string name) { enum Flag!name no = Flag!name.no; } unittest { Flag!"abc" flag1; assert(flag1 == Flag!"abc".no); assert(flag1 == No.abc); assert(!flag1); if (flag1) assert(false); flag1 = Yes.abc; assert(flag1); if (!flag1) assert(false); if (flag1) {} else assert(false); assert(flag1 == Yes.abc); }
D
module twigd.data; import std.variant : Variant; struct Data { private Variant[string] data; @property Variant opDispatch(string name)() const { return name in data ? data[name] : Variant.init; } @property void opDispatch(string name, T)(T val) { data[name] = val; } } version(unittest) { import std.stdio : writeln; } unittest { Data data = Data(); data.name = "Eugene"; data.age = 27; assert(data.name.hasValue); assert(data.age.hasValue); assert(!data.day.hasValue); assert(data.name == "Eugene"); assert(data.age == 27); }
D
import item; import enums; import slump; class ItemHouse : Item { this() { auto a = [ "A house, a home.", "House sweet house.", "A good place for friends to live.", "Four walls and a roof, it's all you need!", "The house of the rising sun.", "The house always wins, don't gamble kids!", ]; super("House", char(127), Color.yellow_dark, random(a)); } }
D
/** This module implements any types that are not explicitly defined by the D compiler, but are considered standard D types. See https://dlang.org/spec/type.html */ module d.types; alias string = immutable(char)[]; alias wstring = immutable(wchar)[]; alias dstring = immutable(dchar)[]; alias uint8 = ubyte; alias uint16 = ushort; alias uint32 = uint; alias uint64 = ulong; alias uint128 = ucent; alias int8 = byte; alias int16 = short; alias int32 = int; alias int64 = long; alias int128 = cent; alias uintx = typeof(int.sizeof); alias intx = typeof(cast(void*)0 - cast(void*)0);
D
import std.math; extern(C) int printf(const char*, ...); string abc; template Floating(T) { T[3] a; T[3] b; T[3] c; T[] A() { printf("A\n"); abc ~= "A"; return a; } T[] B() { printf("B\n"); abc ~= "B"; return b; } T[] C() { printf("C\n"); abc ~= "C"; return c; } T D() { printf("D\n"); abc ~= "D"; return 4; } void testx() { a = [11, 22, 33]; b = [1, 2, 3]; c = [4, 5, 6]; abc = null; A()[] = B()[] + C()[]; assert(abc == "BCA"); assert(a[0] == 5); assert(a[1] == 7); assert(a[2] == 9); abc = null; A()[] = B()[] + 4; assert(abc == "BA"); assert(a[0] == 5); assert(a[1] == 6); assert(a[2] == 7); abc = null; A()[] = 4 + B()[]; assert(abc == "BA"); assert(a[0] == 5); assert(a[1] == 6); assert(a[2] == 7); abc = null; A()[] = D() + B()[]; assert(abc == "DBA"); assert(a[0] == 5); assert(a[1] == 6); assert(a[2] == 7); a = [11, 22, 33]; abc = null; A()[] += B()[]; assert(abc == "BA"); assert(a[0] == 12); assert(a[1] == 24); assert(a[2] == 36); a = [11, 22, 33]; A()[] += 4; assert(a[0] == 15); assert(a[1] == 26); assert(a[2] == 37); a = [11, 22, 33]; A()[] -= 4; assert(a[0] == 7); assert(a[1] == 18); assert(a[2] == 29); a = [11, 22, 33]; A()[] *= 4; assert(a[0] == 44); assert(a[1] == 88); assert(a[2] == 132); a = [4, 8, 32]; A()[] /= 4; assert(a[0] == 1); assert(a[1] == 2); assert(a[2] == 8); a = [4, 8, 33]; A()[] %= 4; assert(a[0] == 0); assert(a[1] == 0); assert(a[2] == 1); a = [11, 22, 33]; abc = null; A()[] += 4 + B()[]; assert(abc == "BA"); assert(a[0] == 16); assert(a[1] == 28); assert(a[2] == 40); abc = null; A()[] = B()[] - C()[]; assert(abc == "BCA"); printf("%Lg, %Lg, %Lg\n", cast(real)a[0], cast(real)a[1], cast(real)a[2]); assert(a[0] == -3); assert(a[1] == -3); assert(a[2] == -3); abc = null; A()[] = -B()[] - C()[]; assert(abc == "BCA"); printf("%Lg, %Lg, %Lg\n", cast(real)a[0], cast(real)a[1], cast(real)a[2]); assert(a[0] == -5); assert(a[1] == -7); assert(a[2] == -9); abc = null; A()[] = B()[] + C()[] * 4; assert(abc == "BCA"); printf("%Lg, %Lg, %Lg\n", cast(real)a[0], cast(real)a[1], cast(real)a[2]); assert(a[0] == 17); assert(a[1] == 22); assert(a[2] == 27); abc = null; A()[] = B()[] + C()[] * B()[]; assert(abc == "BCBA"); printf("%Lg, %Lg, %Lg\n", cast(real)a[0], cast(real)a[1], cast(real)a[2]); assert(a[0] == 5); assert(a[1] == 12); assert(a[2] == 21); abc = null; A()[] = B()[] + C()[] / 2; assert(abc == "BCA"); printf("%Lg, %Lg, %Lg\n", cast(real)a[0], cast(real)a[1], cast(real)a[2]); assert(a[0] == 3); assert(a[1] == 4.5); assert(a[2] == 6); abc = null; A()[] = B()[] + C()[] % 2; assert(abc == "BCA"); printf("%Lg, %Lg, %Lg\n", cast(real)a[0], cast(real)a[1], cast(real)a[2]); assert(a[0] == 1); assert(a[1] == 3); assert(a[2] == 3); } } mixin Floating!(float) Ffloat; mixin Floating!(double) Fdouble; mixin Floating!(real) Freal; void test1() { Ffloat.testx(); Fdouble.testx(); Freal.testx(); } /************************************************************************/ template Integral(T) { T[3] a; T[3] b; T[3] c; T[] A() { printf("A\n"); abc ~= "A"; return a; } T[] B() { printf("B\n"); abc ~= "B"; return b; } T[] C() { printf("C\n"); abc ~= "C"; return c; } T D() { printf("D\n"); abc ~= "D"; return 4; } void testx() { a = [11, 22, 33]; b = [1, 2, 3]; c = [4, 5, 6]; abc = null; A()[] = B()[] + C()[]; assert(abc == "BCA"); assert(a[0] == 5); assert(a[1] == 7); assert(a[2] == 9); abc = null; A()[] = B()[] + 4; assert(abc == "BA"); assert(a[0] == 5); assert(a[1] == 6); assert(a[2] == 7); abc = null; A()[] = 4 + B()[]; assert(abc == "BA"); assert(a[0] == 5); assert(a[1] == 6); assert(a[2] == 7); abc = null; A()[] = D() + B()[]; assert(abc == "DBA"); assert(a[0] == 5); assert(a[1] == 6); assert(a[2] == 7); a = [11, 22, 33]; abc = null; A()[] += B()[]; assert(abc == "BA"); assert(a[0] == 12); assert(a[1] == 24); assert(a[2] == 36); a = [11, 22, 33]; A()[] += 4; assert(a[0] == 15); assert(a[1] == 26); assert(a[2] == 37); a = [11, 22, 33]; A()[] -= 4; assert(a[0] == 7); assert(a[1] == 18); assert(a[2] == 29); a = [11, 22, 27]; A()[] *= 4; assert(a[0] == 44); assert(a[1] == 88); assert(a[2] == 108); a = [11, 22, 33]; A()[] /= 4; assert(a[0] == 2); assert(a[1] == 5); assert(a[2] == 8); a = [11, 22, 33]; A()[] %= 4; assert(a[0] == 3); assert(a[1] == 2); assert(a[2] == 1); a = [1, 2, 7]; A()[] &= 4; assert(a[0] == 0); assert(a[1] == 0); assert(a[2] == 4); a = [1, 2, 7]; A()[] |= 4; assert(a[0] == 5); assert(a[1] == 6); assert(a[2] == 7); a = [1, 2, 7]; A()[] ^= 4; assert(a[0] == 5); assert(a[1] == 6); assert(a[2] == 3); a = [11, 22, 33]; abc = null; A()[] += 4 + B()[]; assert(abc == "BA"); assert(a[0] == 16); assert(a[1] == 28); assert(a[2] == 40); abc = null; A()[] = B()[] - C()[]; assert(abc == "BCA"); printf("%lld, %lld, %lld\n", cast(long)a[0], cast(long)a[1], cast(long)a[2]); assert(a[0] == -3); assert(a[1] == -3); assert(a[2] == -3); abc = null; A()[] = -B()[] - C()[]; assert(abc == "BCA"); printf("%lld, %lld, %lld\n", cast(long)a[0], cast(long)a[1], cast(long)a[2]); assert(a[0] == -5); assert(a[1] == -7); assert(a[2] == -9); abc = null; A()[] = B()[] + C()[] * 4; assert(abc == "BCA"); printf("%lld, %lld, %lld\n", cast(long)a[0], cast(long)a[1], cast(long)a[2]); assert(a[0] == 17); assert(a[1] == 22); assert(a[2] == 27); abc = null; A()[] = B()[] + C()[] * B()[]; assert(abc == "BCBA"); printf("%lld, %lld, %lld\n", cast(long)a[0], cast(long)a[1], cast(long)a[2]); assert(a[0] == 5); assert(a[1] == 12); assert(a[2] == 21); abc = null; A()[] = B()[] + C()[] / 2; assert(abc == "BCA"); printf("%lld, %lld, %lld\n", cast(long)a[0], cast(long)a[1], cast(long)a[2]); assert(a[0] == 3); assert(a[1] == 4); assert(a[2] == 6); abc = null; A()[] = B()[] + C()[] % 2; assert(abc == "BCA"); printf("%lld, %lld, %lld\n", cast(long)a[0], cast(long)a[1], cast(long)a[2]); assert(a[0] == 1); assert(a[1] == 3); assert(a[2] == 3); abc = null; A()[] = ~B()[]; assert(abc == "BA"); assert(a[0] == ~cast(T)1); assert(a[1] == ~cast(T)2); assert(a[2] == ~cast(T)3); abc = null; A()[] = B()[] & 2; assert(abc == "BA"); assert(a[0] == 0); assert(a[1] == 2); assert(a[2] == 2); abc = null; A()[] = B()[] | 2; assert(abc == "BA"); assert(a[0] == 3); assert(a[1] == 2); assert(a[2] == 3); abc = null; A()[] = B()[] ^ 2; assert(abc == "BA"); assert(a[0] == 3); assert(a[1] == 0); assert(a[2] == 1); } } /************************************************************************/ mixin Integral!(byte) Fbyte; mixin Integral!(short) Fshort; mixin Integral!(int) Fint; mixin Integral!(long) Flong; void test2() { Fbyte.testx(); Fshort.testx(); Fint.testx(); Flong.testx(); } /************************************************************************/ void test3() { auto a = new double[10], b = a.dup, c = a.dup, d = a.dup; a[] = -(b[] * (c[] + 4)) + 5 * d[] / 3.0; } /************************************************************************/ void test4() { int[] a, b; if (a && b) {} } /***************************************************/ void test4662() { immutable double[] nums = [1.0, 2.0]; static assert(!is(typeof({ nums[] += nums[]; }))); static assert(!is(typeof({ nums[] -= nums[]; }))); static assert(!is(typeof({ nums[] /= nums[]; }))); static assert(!is(typeof({ nums[] += 4; }))); static assert(!is(typeof({ nums[] /= 7; }))); } /***************************************************/ // 5284 void bug5284_1() { class C { int v; } C [] mda; immutable(C)[] ida; static assert(!__traits(compiles, (mda[] = ida[]))); C [1] msa; immutable(C)[1] isa; static assert(!__traits(compiles, (msa[] = isa[]))); C m; immutable(C) i; static assert(!__traits(compiles, m = i)); } void bug5284_2a() { struct S { int v; } S [] mda; immutable(S)[] ida; mda[] = ida[]; S [1] msa; immutable(S)[1] isa; msa[] = isa[]; S m = S(); immutable(S) i = immutable(S)(); m = i; } void bug5284_2b() { struct S { int v; int[] arr; } S [] mda; immutable(S)[] ida; static assert(!__traits(compiles, (mda[] = ida[]))); S [1] msa; immutable(S)[1] isa; static assert(!__traits(compiles, (msa[] = isa[]))); S m; immutable(S) i; static assert(!__traits(compiles, m = i)); } void bug5284_3() { int [] ma; immutable(int)[] ia; ma[] = ia[]; int m; immutable(int) i; m = i; } void test5() { bug5284_1(); bug5284_2a(); bug5284_2b(); bug5284_3(); } /************************************************************************/ void test6() { int[10] a = [1,2,3,4,5,6,7,8,9,10]; int[10] b; b = a[] ^^ 2; assert(b[0] == 1); assert(b[1] == 4); assert(b[2] == 9); assert(b[3] == 16); assert(b[4] == 25); assert(b[5] == 36); assert(b[6] == 49); assert(b[7] == 64); assert(b[8] == 81); assert(b[9] == 100); int[10] c = 3; b = a[] ^^ c[]; assert(b[0] == 1); assert(b[1] == 8); assert(b[2] == 27); assert(b[3] == 64); assert(b[4] == 125); assert(b[5] == 216); assert(b[6] == 343); assert(b[7] == 512); assert(b[8] == 729); assert(b[9] == 1000); } /************************************************************************/ void test8390() { const int[] a = new int[5]; int[] b = new int[5]; b[] += a[]; } /************************************************************************/ // 8651 void test8651() { void test(T)() @safe pure nothrow { T[3] a = [11, 22, 33]; T[3] b = [1, 2, 3]; T[3] c = [4, 5, 6]; T d = 4; // Arithmetic array ops { a[] = b[] + c[]; a[] = b[] + 4; a[] = 4 + b[]; a[] = d + b[]; a[] += b[]; a[] += 4; a[] -= 4; a[] *= 4; a[] /= 4; a[] %= 4; a[] += 4 + b[]; a[] = b[] - c[]; a[] = -b[] - c[]; a[] = b[] + c[] * 4; a[] = b[] + c[] * b[]; a[] = b[] + c[] / 2; a[] = b[] + c[] % 2; } // Bitwise array ops static if (is(typeof(T.init & T.init))) { a[] &= 4; a[] |= 4; a[] ^= 4; a[] = ~b[]; a[] = b[] & 2; a[] = b[] | 2; a[] = b[] ^ 2; } } test!float(); test!double(); test!real(); test!byte(); test!short(); test!int(); test!long(); } /************************************************************************/ // 9656 void test9656() { static class C {} static struct S { immutable int[] narr1; immutable int[] narr2; immutable C[] carr1; immutable C[] carr2; this(int n) { narr1 = new int[](3); // OK, expected narr2 = [1,2,3].dup; // NG -> OK carr1 = [new C].dup; // NG -> OK C c = new C; static assert(!__traits(compiles, carr2 = [c])); } } { int[] ma = [1,2,3]; immutable ia = ma.dup; } { static struct V { int val; } V[] ma = [V(1), V(2)]; immutable ia = ma.dup; } { static struct R { int* ptr; } R[] ma = [R(new int), R(null)]; static assert(!__traits(compiles, { immutable ia = rarr.dup; })); } { C[] ma = [new C(), new C()]; static assert(!__traits(compiles, { immutable ia = carr.dup; })); } } /************************************************************************/ // 10282 void test10282() { int[3] a1 = [1, 3, 6]; int[3] a2 = [1, 3, 6] * 3; // OK const int[3] a3 = a1[] * 3; // OK <- Error const int[3] a4 = [1, 3, 6] * 3; // OK <- Error immutable int[3] a5 = [1, 3, 6] * 3; // OK <- Error } /************************************************************************/ // 10433 void test10433() { void foo(T)(in int[] v1, in T v2) { int[2] r; r[] = v1[] + v2[]; } immutable int[] v = [10, 20]; foo(v, v); } /************************************************************************/ // 10684 void test10684a() { int[] a = [0, 0]; a[] += [10, 20][]; } void test10684b() { int[] a = [1, 2, 3]; int[] b = [4, 5, 6]; // Allow array literal as the operand of array oeration a[] += [1, 2, 3]; assert(a == [2, 4, 6]); a[] *= b[] + [1, 1, 1]; assert(a == [2*(4+1), 4*(5+1), 6*(6+1)]); a[] = [9, 8, 7] - [1, 2, 3]; assert(a == [8, 6, 4]); a[] = [2, 4, 6] / 2; assert(a == [1,2,3]); // Disallow: [1,2,3] is not an lvalue static assert(!__traits(compiles, { [1,2,3] = a[] * 2; })); static assert(!__traits(compiles, { [1,2,3] += a[] * b[]; })); } /************************************************************************/ // 11376 template TL11376(T...) { alias TL11376 = T; } auto sumArrs11376(T0, T1)(T0[] a, T1[] b) { a[] += b[]; //no ICE without this line return a; } static assert(!__traits(compiles, sumArrs11376(TL11376!(string[], string).init))); /************************************************************************/ // 11525 void test11525() { static struct Complex(T) { T re, im; ref opOpAssign(string op : "*")(Complex z) { auto temp = re*z.re - im*z.im; im = im*z.re + re*z.im; re = temp; return this; } } auto a = [Complex!double(2, 2)]; assert(a.length == 1 && a[0].re == 2 && a[0].im == 2); a[] *= a[]; assert(a.length == 1 && a[0].re == 0 && a[0].im == 8); } /************************************************************************/ // 12250 void f12250(inout int[] p, inout int[] q, int[] r) { r[] = p[] + q[]; assert(r == [5,7,9]); r[] -= p[] - q[]; assert(r == [8,10,12]); } void test12250() { immutable int[3] x = [1,2,3], y = [4,5,6]; int[3] z; f12250(x[], y[], z[]); } /************************************************************************/ // 12179 void test12179() { void foo(int[]) {} int[1] a; foo(a[] = a[]); foo(a[] += a[]); foo(a[] -= a[]); foo(a[] *= a[]); foo(a[] /= a[]); foo(a[] %= a[]); foo(a[] ^= a[]); foo(a[] &= a[]); foo(a[] |= a[]); foo(a[] ^^= a[]); // from issue 11992 int[] arr1; int[][] arr2; arr1 ~= (a[] = [1] + a[]); // OK arr2 ~= (a[] = [1] + a[]); // OK } /************************************************************************/ // 12780 void test12780() { int ival = 2; int[] iarr = [1, 2, 3]; double dval = 2.0; double[] darr = [4, 5, 6]; double[] oarr = [0, 0, 0]; // multiply array operations oarr[] = dval * iarr[]; assert(oarr == [dval * iarr[0], dval * iarr[1], dval * iarr[2]]); oarr[] = iarr[] / dval; assert(oarr == [iarr[0] / dval, iarr[1] / dval, iarr[2] / dval]); oarr[] = dval * (ival + iarr[]); assert(oarr == [dval * (ival + iarr[0]), dval * (ival + iarr[1]), dval * (ival + iarr[2])]); oarr[] = (iarr[] & ival) / dval; assert(oarr == [(iarr[0] & ival) / dval, (iarr[1] & ival) / dval, (iarr[2] & ival) / dval]); oarr[] = darr[] + iarr[]; assert(oarr == [darr[0] + iarr[0], darr[1] + iarr[1], darr[2] + iarr[2]]); oarr[] = iarr[] - darr[]; assert(oarr == [iarr[0] - darr[0], iarr[1] - darr[1], iarr[2] - darr[2]]); oarr[] = darr[] * (ival & iarr[]); assert(oarr == [darr[0] * (ival & iarr[0]), darr[1] * (ival & iarr[1]), darr[2] * (ival & iarr[2])]); oarr[] = (iarr[] ^ ival) / darr[]; assert(oarr == [(iarr[0] ^ ival) / darr[0], (iarr[1] ^ ival) / darr[1], (iarr[2] ^ ival) / darr[2]]); } /************************************************************************/ // 13497 void test13497() { int[1] a = [2], b = [3]; int[1] c1 = a[] * b[]; int[1] c2 = (a[] * b[])[]; assert(c1 == [6]); assert(c2 == [6]); } /************************************************************************/ // 14649 void test14649() { char[] a = "abc".dup; char[] b = [char(1), char(2), char(3)]; string x = "abc"; string y = [char(1), char(2), char(3)]; char[] r = new char[](3); r[] = a[] + b[]; assert(r == "bdf"); r[] = x[] + y[]; assert(r == "bdf"); r[] = "hel"[] + "lo."[]; assert(r == [('h'+'l'), ('e'+'o'), ('l'+'.')]); enum s = "abc"; r[] = s[0..3] + "def"[0..3]; assert(r == [('a'+'d'), ('b'+'e'), ('c'+'f')]); } /************************************************************************/ // 14851 void test14851() { int[8] a, b, c; c = a[] | b[]; // OK <- NG from 2.068.0-b2 c = a[] ^ b[]; // OK <- NG from 2.068.0-b2 c[] = a[] | b[]; // OK c[] = a[] ^ b[]; // OK } /************************************************************************/ int main() { version(X86) { test1(); test2(); } else version(X86_64) { test1(); test2(); } else { pragma(msg, "arrayop.d:test1 Test skipped because arrayop evaluation" " order is ill-defined. See GDC issue #8"); } test3(); test4(); test5(); test6(); test8390(); test8651(); test9656(); test10282(); test10433(); test10684a(); test10684b(); test11525(); test12250(); test12780(); test13497(); test14649(); test14851(); printf("Success\n"); return 0; } version (none) { extern (C) T[] _arraySliceSliceAddSliceAssignd(T[] a, T[] c, T[] b) { foreach (i; 0 .. a.length) a[i] = b[i] + c[i]; return a; } }
D
const int Value_BeliarW_Raven = 500; const int Damage_BeliarW_Raven = 50; const int Value_BeliarW_1H_01 = 600; const int Damage_BeliarW_1H_01 = 90; const int Value_BeliarW_1H_02 = 650; const int Damage_BeliarW_1H_02 = 100; const int Value_BeliarW_1H_03 = 750; const int Damage_BeliarW_1H_03 = 110; const int Value_BeliarW_1H_04 = 850; const int Damage_BeliarW_1H_04 = 120; const int Value_BeliarW_1H_05 = 950; const int Damage_BeliarW_1H_05 = 110; const int Value_BeliarW_1H_06 = 1050; const int Damage_BeliarW_1H_06 = 120; const int Value_BeliarW_1H_07 = 1150; const int Damage_BeliarW_1H_07 = 130; const int Value_BeliarW_1H_08 = 1250; const int Damage_BeliarW_1H_08 = 140; const int Value_BeliarW_1H_09 = 1350; const int Damage_BeliarW_1H_09 = 150; const int Value_BeliarW_1H_10 = 1500; const int Damage_BeliarW_1H_10 = 160; const int Value_BeliarW_1H_11 = 1650; const int Damage_BeliarW_1H_11 = 170; const int Value_BeliarW_1H_12 = 1800; const int Damage_BeliarW_1H_12 = 180; const int Value_BeliarW_1H_13 = 2000; const int Damage_BeliarW_1H_13 = 190; const int Value_BeliarW_1H_14 = 2150; const int Damage_BeliarW_1H_14 = 200; const int Value_BeliarW_1H_15 = 2300; const int Damage_BeliarW_1H_15 = 210; const int Value_BeliarW_1H_16 = 2500; const int Damage_BeliarW_1H_16 = 230; const int Value_BeliarW_1H_17 = 2700; const int Damage_BeliarW_1H_17 = 260; const int Value_BeliarW_1H_18 = 2900; const int Damage_BeliarW_1H_18 = 290; const int Value_BeliarW_1H_19 = 3100; const int Damage_BeliarW_1H_19 = 320; const int Value_BeliarW_1H_20 = 3300; const int Damage_BeliarW_1H_20 = 350; const int Value_BeliarW_2H_01 = 600; const int Damage_BeliarW_2H_01 = 120; const int Value_BeliarW_2H_02 = 650; const int Damage_BeliarW_2H_02 = 130; const int Value_BeliarW_2H_03 = 750; const int Damage_BeliarW_2H_03 = 140; const int Value_BeliarW_2H_04 = 850; const int Damage_BeliarW_2H_04 = 150; const int Value_BeliarW_2H_05 = 950; const int Damage_BeliarW_2H_05 = 160; const int Value_BeliarW_2H_06 = 1050; const int Damage_BeliarW_2H_06 = 170; const int Value_BeliarW_2H_07 = 1150; const int Damage_BeliarW_2H_07 = 180; const int Value_BeliarW_2H_08 = 1250; const int Damage_BeliarW_2H_08 = 190; const int Value_BeliarW_2H_09 = 1350; const int Damage_BeliarW_2H_09 = 200; const int Value_BeliarW_2H_10 = 1500; const int Damage_BeliarW_2H_10 = 210; const int Value_BeliarW_2H_11 = 1650; const int Damage_BeliarW_2H_11 = 220; const int Value_BeliarW_2H_12 = 1800; const int Damage_BeliarW_2H_12 = 230; const int Value_BeliarW_2H_13 = 2000; const int Damage_BeliarW_2H_13 = 240; const int Value_BeliarW_2H_14 = 2150; const int Damage_BeliarW_2H_14 = 270; const int Value_BeliarW_2H_15 = 2300; const int Damage_BeliarW_2H_15 = 300; const int Value_BeliarW_2H_16 = 2500; const int Damage_BeliarW_2H_16 = 330; const int Value_BeliarW_2H_17 = 2700; const int Damage_BeliarW_2H_17 = 360; const int Value_BeliarW_2H_18 = 2900; const int Damage_BeliarW_2H_18 = 390; const int Value_BeliarW_2H_19 = 3100; const int Damage_BeliarW_2H_19 = 420; const int Value_BeliarW_2H_20 = 3300; const int Damage_BeliarW_2H_20 = 450; const int BeliarDamageChance_01 = 10; const int BeliarDamageChance_02 = 20; const int BeliarDamageChance_03 = 30; const int BeliarDamageChance_04 = 40; const int BeliarDamageChance_05 = 50; const int BeliarDamageChance_06 = 60; const int BeliarDamageChance_07 = 70; const int BeliarDamageChance_08 = 80; const int BeliarDamageChance_09 = 90; const int BeliarDamageChance_10 = 100; const int BeliarDamageChance_11 = 110; const int BeliarDamageChance_12 = 120; const int BeliarDamageChance_13 = 130; const int BeliarDamageChance_14 = 140; const int BeliarDamageChance_15 = 150; const int BeliarDamageChance_16 = 160; const int BeliarDamageChance_17 = 170; const int BeliarDamageChance_18 = 180; const int BeliarDamageChance_19 = 190; const int BeliarDamageChance_20 = 200; const int DAMAGE_BELIARSUPERWEAPON_1H_EDGE = 240; const int DAMAGE_BELIARSUPERWEAPON_2H_EDGE = 300; const int DAMAGE_BELIARSUPERWEAPON_1H_MAGIC = 250; const int DAMAGE_BELIARSUPERWEAPON_2H_MAGIC = 250; const int VALUE_BELIARSUPERWEAPON_1H = 5000; const int VALUE_BELIARSUPERWEAPON_2H = 5000;
D
module ddi.msg; struct Message { enum INTRO= `Welcome to DDataInput, a convenient way to input data. Copyright (C) 2012 Nathan M. Swan You can always type ".quit" to quit.`; enum OPENING_INSTRUCTIONS= `To open a file for editing, drag its thumbnail here, or type ".new": `; enum START_INPUT= `Okay, now you can start inputting data. Type ".mistake" if you make one, or ".done" when you're done.`; }
D
/home/ubuntu/substrate-node-template/target/debug/wbuild-runner/node-template-runtime6620869906145500559/target/x86_64-unknown-linux-gnu/debug/deps/fs2-e0a0fc64b3e22702.rmeta: /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/fs2-0.4.3/src/lib.rs /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/fs2-0.4.3/src/unix.rs /home/ubuntu/substrate-node-template/target/debug/wbuild-runner/node-template-runtime6620869906145500559/target/x86_64-unknown-linux-gnu/debug/deps/libfs2-e0a0fc64b3e22702.rlib: /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/fs2-0.4.3/src/lib.rs /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/fs2-0.4.3/src/unix.rs /home/ubuntu/substrate-node-template/target/debug/wbuild-runner/node-template-runtime6620869906145500559/target/x86_64-unknown-linux-gnu/debug/deps/fs2-e0a0fc64b3e22702.d: /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/fs2-0.4.3/src/lib.rs /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/fs2-0.4.3/src/unix.rs /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/fs2-0.4.3/src/lib.rs: /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/fs2-0.4.3/src/unix.rs:
D
/* * extra interface not define in any other modules, copied from MSDN 2003 * don't import this module directly, import std.internal.ole.win32.com instead * * author : Shawn Liu */ module org.eclipse.swt.internal.ole.win32.ifs; private import org.eclipse.swt.SWT; private import org.eclipse.swt.internal.win32.WINTYPES; private import org.eclipse.swt.internal.ole.win32.COM; //private import std.c.windows.windows; //private import std.c.windows.com; private import org.eclipse.swt.internal.ole.win32.COMTYPES; private import org.eclipse.swt.internal.ole.win32.OAIDL; private import org.eclipse.swt.internal.ole.win32.OBJIDL; private import org.eclipse.swt.internal.ole.win32.OLEIDL; private import org.eclipse.swt.internal.ole.win32.DOCOBJ; private import org.eclipse.swt.internal.ole.win32.EXDISP; private import org.eclipse.swt.internal.ole.win32.MSHTMHST; private import org.eclipse.swt.internal.ole.win32.extras; interface IAccessible : IDispatch { // int GetTypeInfoCount(int pctinfo); // int GetTypeInfo(THIS_ UINT itinfo, LCID lcid, ITypeInfo FAR* FAR* pptinfo); // int GetIDsOfNames - not implemented // int Invoke - not implemented HRESULT get_accParent(LPDISPATCH* ppdispParent); HRESULT get_accChildCount(LONG* pcountChildren); HRESULT get_accChild(VARIANT varChildID, LPDISPATCH* ppdispChild); HRESULT get_accName(VARIANT varID, BSTR* pszName); HRESULT get_accValue(VARIANT varID, BSTR* pszValue); HRESULT get_accDescription(VARIANT varID,BSTR* pszDescription); HRESULT get_accRole(VARIANT varID, VARIANT* pvarRole); HRESULT get_accState(VARIANT varID, VARIANT* pvarState); HRESULT get_accHelp(VARIANT varID, BSTR* pszHelp); HRESULT get_accHelpTopic(BSTR* pszHelpFile, VARIANT varChild, LONG* pidTopic); HRESULT get_accKeyboardShortcut(VARIANT varID, BSTR* pszKeyboardShortcut); HRESULT get_accFocus(VARIANT* pvarID); HRESULT get_accSelection(VARIANT* pvarChildren); HRESULT get_accDefaultAction(VARIANT varID,BSTR* pszDefaultAction); HRESULT accSelect(LONG flagsSelect, VARIANT varID); HRESULT accLocation(LONG* pxLeft, LONG* pyTop, LONG* pcxWidth, LONG* pcyHeight, VARIANT varID); HRESULT accNavigate(LONG navDir, VARIANT varStart, VARIANT* pvarEnd); HRESULT accHitTest(LONG xLeft, LONG yTop, VARIANT* pvarID); HRESULT accDoDefaultAction(VARIANT varID); HRESULT put_accName(VARIANT varID, BSTR* szName); HRESULT put_accValue(VARIANT varID, BSTR* szValue); } alias IAccessible LPACCESSIBLE; interface IClassFactory2 : IClassFactory { HRESULT GetLicInfo(LICINFO * pLicInfo); HRESULT RequestLicKey(DWORD dwReserved, BSTR * pbstrKey); HRESULT CreateInstanceLic(LPUNKNOWN pUnkOuter, LPUNKNOWN pUnkReserved, REFCIID riid, BSTR bstrKey, void ** ppvObject); } alias IClassFactory2 LPCLASSFACTORY2; interface IConnectionPoint : IUnknown { HRESULT GetConnectionInterface(IID * pIID); HRESULT GetConnectionPointContainer(LPCONNECTIONPOINTCONTAINER * ppCPC); HRESULT Advise(LPUNKNOWN pUnk, DWORD * pdwCookie); HRESULT Unadvise(DWORD dwCookie); HRESULT EnumConnections(LPENUMCONNECTIONS * ppEnum); } alias IConnectionPoint LPCONNECTIONPOINT; interface IConnectionPointContainer : IUnknown { HRESULT EnumConnectionPoints(LPENUMCONNECTIONPOINTS * ppEnum); HRESULT FindConnectionPoint(REFCIID riid, LPCONNECTIONPOINT * ppCP); } alias IConnectionPointContainer LPCONNECTIONPOINTCONTAINER; interface IEnumConnectionPoints : IUnknown { HRESULT Next(ULONG celt, LPCONNECTIONPOINT * rgelt, ULONG * pceltFetched); HRESULT Skip(ULONG celt); HRESULT Reset(); HRESULT Clone(LPENUMCONNECTIONPOINTS * ppenum); } alias IEnumConnectionPoints LPENUMCONNECTIONPOINTS; interface IEnumConnections : IUnknown { HRESULT Next(ULONG cConnections, CONNECTDATA ** rgpcd, ULONG * pcFetched); HRESULT Skip(ULONG cConnections); HRESULT Reset(); HRESULT Clone(LPENUMCONNECTIONS * ppEnum); }alias IEnumConnections LPENUMCONNECTIONS; interface IEnumVARIANT : IUnknown { HRESULT Next(ULONG celt, VARIANT *rgelt, ULONG *pceltFetched); HRESULT Skip(ULONG celt); HRESULT Reset(); HRESULT Clone(LPENUMVARIANT * ppenum); } alias IEnumVARIANT LPENUMVARIANT; interface IInternetSecurityManager : IUnknown { HRESULT SetSecuritySite(LPINTERNETSECURITYMGRSITE pSite); HRESULT GetSecuritySite(LPINTERNETSECURITYMGRSITE *ppSite); HRESULT MapUrlToZone(LPCWSTR pwszUrl, DWORD *pdwZone, DWORD dwFlags); HRESULT GetSecurityId(LPCWSTR pwszUrl, BYTE *pbSecurityId, DWORD *pcbSecurityId, DWORD_PTR dwReserved); HRESULT ProcessUrlAction(LPCWSTR pwszUrl, DWORD dwAction, BYTE *pPolicy, DWORD cbPolicy, BYTE *pContext, DWORD cbContext, DWORD dwFlags, DWORD dwReserved); HRESULT QueryCustomPolicy(LPCWSTR pwszUrl, REFGUID guidKey, BYTE **ppPolicy, DWORD *pcbPolicy, BYTE *pContext, DWORD cbContext, DWORD dwReserved); HRESULT SetZoneMapping(DWORD dwZone, LPCWSTR lpszPattern, DWORD dwFlags); HRESULT GetZoneMappings(DWORD dwZone, LPENUMSTRING * ppenumString, DWORD dwFlags); } interface IInternetSecurityMgrSite : IUnknown { HRESULT EnableModeless(BOOL fEnable); HRESULT GetWindow(HWND *phwnd); } alias IInternetSecurityMgrSite LPINTERNETSECURITYMGRSITE; interface IOleControl : IUnknown { HRESULT GetControlInfo(CONTROLINFO* pCI); HRESULT OnMnemonic(LPMSG pMsg); HRESULT OnAmbientPropertyChange(DISPID dispID); HRESULT FreezeEvents(BOOL bFreeze); } alias IOleControl LPOLECONTROL; interface IOleControlSite : IUnknown { HRESULT OnControlInfoChanged(); HRESULT LockInPlaceActive( BOOL fLock //Indicates whether to ensure the active state ); HRESULT GetExtendedControl( LPDISPATCH* ppDisp //Address of output variable that receives the // IDispatch interface pointer ); HRESULT TransformCoords( POINTL* pPtlHimetric , //Address of POINTL structure POINTF* pPtfContainer , //Address of POINTF structure DWORD dwFlags //Flags indicating the exact conversion ); HRESULT TranslateAccelerator( LPMSG pMsg , //Pointer to the structure DWORD grfModifiers //Flags describing the state of the keys ); HRESULT OnFocus( BOOL fGotFocus //Indicates whether the control gained focus ); HRESULT ShowPropertyFrame(); } alias IOleControlSite LPOLECONTROLSITE; interface IPersistStreamInit : IPersist { HRESULT IsDirty(); HRESULT Load(LPSTREAM pStm); HRESULT Save(LPSTREAM pStm, BOOL fClearDirty); HRESULT GetSizeMax(ULARGE_INTEGER * pcbSize); HRESULT InitNew(); } interface IPropertyNotifySink : IUnknown { HRESULT OnChanged(DISPID dispID); HRESULT OnRequestEdit(DISPID dispID); } alias IPropertyNotifySink LPPROPERTYNOTIFYSINK; interface IProvideClassInfo : IUnknown { HRESULT GetClassInfo(LPTYPEINFO * ppTI); } alias IProvideClassInfo LPPROVIDECLASSINFO; interface IProvideClassInfo2 : IProvideClassInfo { HRESULT GetGUID(DWORD dwGuidKind, GUID * pGUID); } alias IProvideClassInfo2 LPPROVIDECLASSINFO2; /* interface IDocHostUIHandler : IUnknown { int ShowContextMenu( int dwID, POINT* ppt, ComObj pcmdtReserved, ComObj pdispReserved); int GetHostInfo( int pInfo ); int ShowUI( int dwID, ComObj pActiveObject, ComObj pCommandTarget, ComObj pFrame, ComObj pDoc ); int HideUI(); int UpdateUI(); int EnableModeless( int fEnable ); int OnDocWindowActivate( int fActivate ); int OnFrameWindowActivate( int fActivate ); int ResizeBorder( RECT* prcBorder, ComObj pUIWindow, int fRameWindow ); int TranslateAccelerator( int lpMsg, int pguidCmdGroup, int nCmdID ); int GetOptionKeyPath( int pchKey, int dw ); int GetDropTarget( ComObj pDropTarget, ComObj* ppDropTarget ); int GetExternal( ComObj** ppDispatch ); int TranslateUrl( int dwTranslate, int pchURLIn, int ppchURLOut ); int FilterDataObject( ComObj pDO, ComObj* ppDORet ); } interface IDocHostShowUI : IUnknown { int ShowMessage( HWND hwnd, wchar* lpstrText, int lpstrCaption, int dwType, int lpstrHelpFile, int dwHelpContext, int plResult); int ShowHelp( HWND hwnd, int pszHelpFile, int uCommand, int dwData, long ptMouse, ComObj pDispatchObjectHit ); } */ interface IServiceProvider : IUnknown { HRESULT QueryService(REFGUID guidService, REFCIID riid, void **ppv); } alias IServiceProvider LPSERVICEPROVIDER; interface ISpecifyPropertyPages : IUnknown { HRESULT GetPages( CAUUID *pPages //Pointer to structure ); } alias ISpecifyPropertyPages LPSPECIFYPROPERTYPAGES; /* interface IEnumFORMATETC : IEnumXXXX {} interface IDataObject : IUnknown { int GetData(int pFormatetc, int pmedium); int GetDataHere(FORMATETC* pFormatetc, STGMEDIUM* pmedium); int QueryGetData(FORMATETC* pFormatetc); int GetCanonicalFormatEtc(int pFormatetcIn, int pFormatetcOut); int SetData(int pFormatetc, int pmedium, int fRelease); int EnumFormatEtc(int dwDirection, int ppenumFormatetc); int DAdvise(int pFormatetc, int advf, int pAdvSink, int pdwConnection); int DUnadvise(int dwConnection); int EnumDAdvise(ComObj* ppenumAdvise); } interface IDropSource : IUnknown { int QueryContinueDrag(int fEscapePressed, int grfKeyState); int GiveFeedback(int dwEffect); } interface IDropTarget : IUnknown { // NOTE : POINT* is splited to pt_x, pt_y int DragEnter(ComObj pDataObject, int grfKeyState, int pt_x, int pt_y, int pdwEffect); int DragOver(int grfKeyState, int pt_x, int pt_y, int pdwEffect); int DragLeave(); int Drop(ComObj pDataObject, int grfKeyState, int pt_x, int pt_y, int pdwEffect); } */
D
module hunt.http.codec.websocket.utils.MaskedByteBuffer; import hunt.collection.ByteBuffer; class MaskedByteBuffer { private enum byte[] mask = [0x00, cast(byte) 0xF0, 0x0F, cast(byte) 0xFF]; static void putMask(ByteBuffer buffer) { buffer.put(mask, 0, mask.length); } static void putPayload(ByteBuffer buffer, byte[] payload) { size_t len = payload.length; for (size_t i = 0; i < len; i++) { buffer.put(cast(byte) (payload[i] ^ mask[i % 4])); } } static void putPayload(ByteBuffer buffer, ByteBuffer payload) { int len = payload.remaining(); for (int i = 0; i < len; i++) { buffer.put(cast(byte) (payload.get() ^ mask[i % 4])); } } }
D
/Users/gbonda/Documents/Libraries/RWPickFlavor/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Alamofire.build/Objects-normal/x86_64/Result.o : /Users/gbonda/Documents/Libraries/RWPickFlavor/Pods/Alamofire/Source/MultipartFormData.swift /Users/gbonda/Documents/Libraries/RWPickFlavor/Pods/Alamofire/Source/Timeline.swift /Users/gbonda/Documents/Libraries/RWPickFlavor/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift /Users/gbonda/Documents/Libraries/RWPickFlavor/Pods/Alamofire/Source/Alamofire.swift /Users/gbonda/Documents/Libraries/RWPickFlavor/Pods/Alamofire/Source/Response.swift /Users/gbonda/Documents/Libraries/RWPickFlavor/Pods/Alamofire/Source/TaskDelegate.swift /Users/gbonda/Documents/Libraries/RWPickFlavor/Pods/Alamofire/Source/SessionDelegate.swift /Users/gbonda/Documents/Libraries/RWPickFlavor/Pods/Alamofire/Source/ParameterEncoding.swift /Users/gbonda/Documents/Libraries/RWPickFlavor/Pods/Alamofire/Source/Validation.swift /Users/gbonda/Documents/Libraries/RWPickFlavor/Pods/Alamofire/Source/ResponseSerialization.swift /Users/gbonda/Documents/Libraries/RWPickFlavor/Pods/Alamofire/Source/SessionManager.swift /Users/gbonda/Documents/Libraries/RWPickFlavor/Pods/Alamofire/Source/NetworkReachabilityManager.swift /Users/gbonda/Documents/Libraries/RWPickFlavor/Pods/Alamofire/Source/AFError.swift /Users/gbonda/Documents/Libraries/RWPickFlavor/Pods/Alamofire/Source/Notifications.swift /Users/gbonda/Documents/Libraries/RWPickFlavor/Pods/Alamofire/Source/Result.swift /Users/gbonda/Documents/Libraries/RWPickFlavor/Pods/Alamofire/Source/Request.swift /Users/gbonda/Documents/Libraries/RWPickFlavor/Pods/Alamofire/Source/ServerTrustPolicy.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/gbonda/Documents/Libraries/RWPickFlavor/Pods/Headers/Public/Alamofire/Alamofire-umbrella.h /Users/gbonda/Documents/Libraries/RWPickFlavor/Pods/Headers/Public/Alamofire/Alamofire.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/gbonda/Documents/Libraries/RWPickFlavor/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Alamofire.build/Objects-normal/x86_64/Result~partial.swiftmodule : /Users/gbonda/Documents/Libraries/RWPickFlavor/Pods/Alamofire/Source/MultipartFormData.swift /Users/gbonda/Documents/Libraries/RWPickFlavor/Pods/Alamofire/Source/Timeline.swift /Users/gbonda/Documents/Libraries/RWPickFlavor/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift /Users/gbonda/Documents/Libraries/RWPickFlavor/Pods/Alamofire/Source/Alamofire.swift /Users/gbonda/Documents/Libraries/RWPickFlavor/Pods/Alamofire/Source/Response.swift /Users/gbonda/Documents/Libraries/RWPickFlavor/Pods/Alamofire/Source/TaskDelegate.swift /Users/gbonda/Documents/Libraries/RWPickFlavor/Pods/Alamofire/Source/SessionDelegate.swift /Users/gbonda/Documents/Libraries/RWPickFlavor/Pods/Alamofire/Source/ParameterEncoding.swift /Users/gbonda/Documents/Libraries/RWPickFlavor/Pods/Alamofire/Source/Validation.swift /Users/gbonda/Documents/Libraries/RWPickFlavor/Pods/Alamofire/Source/ResponseSerialization.swift /Users/gbonda/Documents/Libraries/RWPickFlavor/Pods/Alamofire/Source/SessionManager.swift /Users/gbonda/Documents/Libraries/RWPickFlavor/Pods/Alamofire/Source/NetworkReachabilityManager.swift /Users/gbonda/Documents/Libraries/RWPickFlavor/Pods/Alamofire/Source/AFError.swift /Users/gbonda/Documents/Libraries/RWPickFlavor/Pods/Alamofire/Source/Notifications.swift /Users/gbonda/Documents/Libraries/RWPickFlavor/Pods/Alamofire/Source/Result.swift /Users/gbonda/Documents/Libraries/RWPickFlavor/Pods/Alamofire/Source/Request.swift /Users/gbonda/Documents/Libraries/RWPickFlavor/Pods/Alamofire/Source/ServerTrustPolicy.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/gbonda/Documents/Libraries/RWPickFlavor/Pods/Headers/Public/Alamofire/Alamofire-umbrella.h /Users/gbonda/Documents/Libraries/RWPickFlavor/Pods/Headers/Public/Alamofire/Alamofire.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/gbonda/Documents/Libraries/RWPickFlavor/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Alamofire.build/Objects-normal/x86_64/Result~partial.swiftdoc : /Users/gbonda/Documents/Libraries/RWPickFlavor/Pods/Alamofire/Source/MultipartFormData.swift /Users/gbonda/Documents/Libraries/RWPickFlavor/Pods/Alamofire/Source/Timeline.swift /Users/gbonda/Documents/Libraries/RWPickFlavor/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift /Users/gbonda/Documents/Libraries/RWPickFlavor/Pods/Alamofire/Source/Alamofire.swift /Users/gbonda/Documents/Libraries/RWPickFlavor/Pods/Alamofire/Source/Response.swift /Users/gbonda/Documents/Libraries/RWPickFlavor/Pods/Alamofire/Source/TaskDelegate.swift /Users/gbonda/Documents/Libraries/RWPickFlavor/Pods/Alamofire/Source/SessionDelegate.swift /Users/gbonda/Documents/Libraries/RWPickFlavor/Pods/Alamofire/Source/ParameterEncoding.swift /Users/gbonda/Documents/Libraries/RWPickFlavor/Pods/Alamofire/Source/Validation.swift /Users/gbonda/Documents/Libraries/RWPickFlavor/Pods/Alamofire/Source/ResponseSerialization.swift /Users/gbonda/Documents/Libraries/RWPickFlavor/Pods/Alamofire/Source/SessionManager.swift /Users/gbonda/Documents/Libraries/RWPickFlavor/Pods/Alamofire/Source/NetworkReachabilityManager.swift /Users/gbonda/Documents/Libraries/RWPickFlavor/Pods/Alamofire/Source/AFError.swift /Users/gbonda/Documents/Libraries/RWPickFlavor/Pods/Alamofire/Source/Notifications.swift /Users/gbonda/Documents/Libraries/RWPickFlavor/Pods/Alamofire/Source/Result.swift /Users/gbonda/Documents/Libraries/RWPickFlavor/Pods/Alamofire/Source/Request.swift /Users/gbonda/Documents/Libraries/RWPickFlavor/Pods/Alamofire/Source/ServerTrustPolicy.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/gbonda/Documents/Libraries/RWPickFlavor/Pods/Headers/Public/Alamofire/Alamofire-umbrella.h /Users/gbonda/Documents/Libraries/RWPickFlavor/Pods/Headers/Public/Alamofire/Alamofire.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
int main() { int a; int b; a = 20; b = -10; while(a >= b) { a = a - 4; b = b + 2; Print(a, " ", b); } }
D
# FIXED uart.obj: C:/Projects/embedded-software/src/uart.c uart.obj: C:/Projects/embedded-software/include/uart.h uart.obj: C:/ti/ccsv8/tools/compiler/ti-cgt-msp430_18.1.4.LTS/include/stdint.h uart.obj: C:/ti/ccsv8/tools/compiler/ti-cgt-msp430_18.1.4.LTS/include/sys/stdint.h uart.obj: C:/ti/ccsv8/tools/compiler/ti-cgt-msp430_18.1.4.LTS/include/sys/cdefs.h uart.obj: C:/ti/ccsv8/tools/compiler/ti-cgt-msp430_18.1.4.LTS/include/sys/_types.h uart.obj: C:/ti/ccsv8/tools/compiler/ti-cgt-msp430_18.1.4.LTS/include/machine/_types.h uart.obj: C:/ti/ccsv8/tools/compiler/ti-cgt-msp430_18.1.4.LTS/include/machine/_stdint.h uart.obj: C:/ti/ccsv8/tools/compiler/ti-cgt-msp430_18.1.4.LTS/include/sys/_stdint.h uart.obj: C:/ti/ccsv8/tools/compiler/ti-cgt-msp430_18.1.4.LTS/include/stdbool.h uart.obj: C:/ti/ccsv8/tools/compiler/ti-cgt-msp430_18.1.4.LTS/include/stdarg.h uart.obj: C:/Users/sglas/embeddedSoftware/stephenGame/project_settings.h uart.obj: C:/Projects/embedded-software/include/library.h uart.obj: C:/Projects/embedded-software/include/macros.h uart.obj: C:/Projects/embedded-software/include/int_def.h uart.obj: C:/Projects/embedded-software/include/subsystem.h uart.obj: C:/Projects/embedded-software/include/uart.h uart.obj: C:/Projects/embedded-software/include/task.h uart.obj: C:/Projects/embedded-software/include/timing.h uart.obj: C:/Projects/embedded-software/include/buffer_printf.h uart.obj: C:/Projects/embedded-software/include/buffer.h uart.obj: C:/Projects/embedded-software/hal/MSP430/MSP430F5529/hal_uart.h uart.obj: C:/Projects/embedded-software/hal/MSP430/MSP430F5529/hal_general.h uart.obj: C:/ti/ccsv8/ccs_base/msp430/include/msp430.h uart.obj: C:/ti/ccsv8/ccs_base/msp430/include/msp430f5529.h uart.obj: C:/ti/ccsv8/ccs_base/msp430/include/in430.h uart.obj: C:/ti/ccsv8/tools/compiler/ti-cgt-msp430_18.1.4.LTS/include/intrinsics.h uart.obj: C:/ti/ccsv8/tools/compiler/ti-cgt-msp430_18.1.4.LTS/include/intrinsics_legacy_undefs.h C:/Projects/embedded-software/src/uart.c: C:/Projects/embedded-software/include/uart.h: C:/ti/ccsv8/tools/compiler/ti-cgt-msp430_18.1.4.LTS/include/stdint.h: C:/ti/ccsv8/tools/compiler/ti-cgt-msp430_18.1.4.LTS/include/sys/stdint.h: C:/ti/ccsv8/tools/compiler/ti-cgt-msp430_18.1.4.LTS/include/sys/cdefs.h: C:/ti/ccsv8/tools/compiler/ti-cgt-msp430_18.1.4.LTS/include/sys/_types.h: C:/ti/ccsv8/tools/compiler/ti-cgt-msp430_18.1.4.LTS/include/machine/_types.h: C:/ti/ccsv8/tools/compiler/ti-cgt-msp430_18.1.4.LTS/include/machine/_stdint.h: C:/ti/ccsv8/tools/compiler/ti-cgt-msp430_18.1.4.LTS/include/sys/_stdint.h: C:/ti/ccsv8/tools/compiler/ti-cgt-msp430_18.1.4.LTS/include/stdbool.h: C:/ti/ccsv8/tools/compiler/ti-cgt-msp430_18.1.4.LTS/include/stdarg.h: C:/Users/sglas/embeddedSoftware/stephenGame/project_settings.h: C:/Projects/embedded-software/include/library.h: C:/Projects/embedded-software/include/macros.h: C:/Projects/embedded-software/include/int_def.h: C:/Projects/embedded-software/include/subsystem.h: C:/Projects/embedded-software/include/uart.h: C:/Projects/embedded-software/include/task.h: C:/Projects/embedded-software/include/timing.h: C:/Projects/embedded-software/include/buffer_printf.h: C:/Projects/embedded-software/include/buffer.h: C:/Projects/embedded-software/hal/MSP430/MSP430F5529/hal_uart.h: C:/Projects/embedded-software/hal/MSP430/MSP430F5529/hal_general.h: C:/ti/ccsv8/ccs_base/msp430/include/msp430.h: C:/ti/ccsv8/ccs_base/msp430/include/msp430f5529.h: C:/ti/ccsv8/ccs_base/msp430/include/in430.h: C:/ti/ccsv8/tools/compiler/ti-cgt-msp430_18.1.4.LTS/include/intrinsics.h: C:/ti/ccsv8/tools/compiler/ti-cgt-msp430_18.1.4.LTS/include/intrinsics_legacy_undefs.h:
D
package android.app.backup; import android.os.ParcelFileDescriptor; /** * Provides the interface through which a {@link BackupAgent} writes entire files * to a full backup data set, via its {@link BackupAgent#onFullBackup(FullBackupDataOutput)} * method. */ public class FullBackupDataOutput { // Currently a name-scoping shim around BackupDataOutput private final BackupDataOutput mData; private final long mQuota; private final int mTransportFlags; private long mSize; /** * Returns the quota in bytes for the application's current backup operation. The * value can vary for each operation. * * @see BackupDataOutput#getQuota() */ public long getQuota() { return mQuota; } /** * Returns flags with additional information about the backup transport. For supported flags see * {@link android.app.backup.BackupAgent} * * @see BackupDataOutput#getTransportFlags() */ public int getTransportFlags() { return mTransportFlags; } /** @hide - used only in measure operation */ public FullBackupDataOutput(long quota) { mData = null; mQuota = quota; mSize = 0; mTransportFlags = 0; } /** @hide - used only in measure operation */ public FullBackupDataOutput(long quota, int transportFlags) { mData = null; mQuota = quota; mSize = 0; mTransportFlags = transportFlags; } /** @hide */ public FullBackupDataOutput(ParcelFileDescriptor fd, long quota) { mData = new BackupDataOutput(fd.getFileDescriptor(), quota, 0); mQuota = quota; mTransportFlags = 0; } /** @hide */ public FullBackupDataOutput(ParcelFileDescriptor fd, long quota, int transportFlags) { mData = new BackupDataOutput(fd.getFileDescriptor(), quota, transportFlags); mQuota = quota; mTransportFlags = transportFlags; } /** @hide - used only internally to the backup manager service's stream construction */ public FullBackupDataOutput(ParcelFileDescriptor fd) { this(fd, /*quota=*/ -1, /*transportFlags=*/ 0); } /** @hide */ public BackupDataOutput getData() { return mData; } /** @hide - used for measurement pass */ public void addSize(long size) { if (size > 0) { mSize += size; } } /** @hide - used for measurement pass */ public long getSize() { return mSize; } }
D
a person who habitually pretends to be something he is not a person who poses for a photographer or painter or sculptor a particularly difficult or baffling question or problem
D
module crypto.wnaf; /** * This structure allows to do scalar*point multiplication. * * While this multiplier isn't as fast as Generator, but doesn't * require heavy precomputation, so it is well suited to multiply * points which aren't going to be reused often. * * It is hardened against side channel attack so is perfect for * use cases such as ECDH, where the point we need to multiply * won't be reused numerous time. */ struct Wnaf(uint N) { private: static assert(N > 1 && N <= 8, "N must be between 2 and 8"); enum Steps = ((255 - 1) / N) + 1; enum TableSize = 1 << (N - 1); /** * When N is a multiple of 255, we can save one step by negating * the scalar such as it fit on 255 bits and save one step. The * drawback is that we can't negate the scalar to make sure it is * odd anymore. In this case, we skew the value of the scalar by 1 * for even numbers and by 2 for odd ones. * * This require one extra point addition at the end to cancel the * skew, but it is worth it if we can save one step as we save N * point squaring. */ enum NeedSkew = Steps <= (255 / N); /** * If N is not a divisor of 255 or 256, we have some extra bits * in our w-NAF representation. In this case, we can save a few * doubling in the first round. */ enum ExtraBits = (N * Steps) - (256 - NeedSkew); enum HasExtraBits = ExtraBits != 0; /** * Each one these integers contains a bit sign in LSB, plus * an index for the multiplication table is the remaining bits. * * It can interpeted as follow: * Value: 0 1 2 3 4 5 6 7 8 9 10 ... * w-NAF: -1 1 -3 3 -5 5 -7 7 -9 9 -11 ... */ ubyte[Steps] lookup; static if (NeedSkew) { // Just like lookups, the LSB is a sign bit and MSB are an index. // TODO: create a wrapper struct for lookup and skew. ubyte skew; } public: import crypto.scalar; this(Scalar s) { /** * w-NAF require that the scalar is odd so ScalarBuf will * negate even scalars. */ static if (NeedSkew) { auto buf = ScalarBuf(s, skew); auto flipsign = !!(skew & 0x01); } else { bool flipsign; auto buf = ScalarBuf(s, flipsign); } static pack(int u, bool flipsign) { /** * If u is positive, this ia noop. If it is negative, then * all bits are flipped. Because the LSB is known to be 1, * flipping the bits are the same as in the complement. * * The LSB is 0 for negative, 1 for positive, higher bits * are the absolute value and can be used as indices. */ return ubyte(((u ^ flipsign) ^ (u >> 31)) & 0xff); } auto u = buf.extract(); foreach (i; 1 .. Steps - HasExtraBits) { auto bits = buf.extract(); /** * If the current number is even, we need to correct it such as * it is odd, so we create an all ones mask if even, 0 if odd. */ auto even = (bits & 0x01) - 1; /** * To make it odd, we can either add or remove 1. We want * the previous digit to stay in range, so if it is positive, * we produce a 1, or a -1 if it isn't. */ auto sign = (u >> 31) | 0x01; // We add or remove 1 to make this odd. bits += (sign & even); /** * We compensate the addition in the previous digit by adding or * removing 16. We knows it stays in range because we subtract or * add depending on its sign, and because it is odd, so non zero. */ u -= ((sign & even) << N); // We computed one w-NAF digit, pack it. lookup[i - 1] = pack(u, flipsign); // Get ready for the next round. u = bits; } /** * This does an extra round but shift the bits right such as * some point doubling can be saved when multiplying. */ static if (HasExtraBits) { auto bits = (buf.extract() << ExtraBits); auto sign = (u >> 31) | 0x01; bits += sign; u -= (sign << (N - ExtraBits)); lookup[Steps - 2] = pack(u, flipsign); u = bits; } // Last digit, already corrected. lookup[Steps - 1] = pack(u, flipsign); } import crypto.point; auto select(ref CartesianPoint[TableSize] table, uint i) const { return selectImpl(table, lookup[Steps - 1 - i]); } auto select(ref Point[TableSize] table, uint i) const { return CartesianPoint(selectImpl(table, lookup[Steps - 1 - i])); } static fillTable(ref CartesianPoint[TableSize] table, CartesianPoint p) { /** * To speedup computation, we drop the z value for pdbl and scale p by * the same amount. The end result is that all jacobian points will * essentially be correct, except the the z value which we will fixup. * * We exploit the fact that: * (ax, ay, az) + (bx, by, 1/globalz) = * (ax, ay, az*globalz) + (bx, by, 1) * and that * (ax, ay, az/globalz) + (bx, by, 1/globalz) = (rx, ry, rz/globalz) * for (rx, ry, rz) = (ax, ay, az) + (bx, by, 1) */ auto jdbl = p.pdouble(); auto pdbl = CartesianPoint(jdbl.x, jdbl.y, jdbl.infinity); // We save our z value so we can fixup later on. import crypto.element; ComputeElement[TableSize - 1] zratios = void; // And we scale our p value by the same z. table[0] = p.scale(jdbl.z); // First iterration, we use cartesian addition. auto jp = table[0].addWithRatio(pdbl, zratios[0]); auto lastZ = jp.z; table[1] = CartesianPoint(jp.x, jp.y, jp.infinity); foreach (i; 2 .. TableSize) { auto lp = table[i - 1]; jp = JacobianPoint(lp.x, lp.y, lastZ, lp.infinity); jp = jp.addWithRatio(pdbl, zratios[i - 1]); lastZ = jp.z; table[i] = CartesianPoint(jp.x, jp.y, jp.infinity); } /** * All z values are off by a factor of jdbl.z . * We fix the last one and then normalize all entries in the table * so that we don't really need to care of individual z, only globalz. */ auto globalz = lastZ.mul(jdbl.z); // Now we got all our values, we need to fixup the z values. auto pz = zratios[TableSize - 2]; // Straightforward for the penultimate element. table[TableSize - 2] = table[TableSize - 2].scale(pz); // Then we work our way backward to the first one. foreach (i; 2 .. TableSize) { auto n = TableSize - 1 - i; pz = pz.mul(zratios[n]); table[n] = table[n].scale(pz); } static if (NeedSkew) { pdbl = pdbl.scale(pz); return JacobianPoint(pdbl.x, pdbl.y, globalz, pdbl.infinity); } else { return globalz; } } static fillNormalizedTable(ref Point[TableSize] table, CartesianPoint p) { CartesianPoint[TableSize] ctable = void; auto fillRet = fillTable(ctable, p); static if (NeedSkew) { auto globalz = fillRet.z; } else { auto globalz = fillRet; } /** * All entries in the table are at the wrong z coordinate. * We need to scale them all to the right coordinates. * * NB: We could do this instead of normalizing z, but it * doesn't matter for now. */ auto gzinv = globalz.inverse(); foreach (i; 0 .. 128) { auto p = ctable[i].scale(gzinv); table[i] = p.normalize(); } } auto mul(CartesianPoint p) const { // Build a table of odd multiples of p. CartesianPoint[TableSize] table = void; static if (NeedSkew) { auto jdbl = fillTable(table, p); } else { auto globalz = fillTable(table, p); } // For the initial value, we can just look it up in the table. auto first = select(table, 0); /** * We special case the first iterration to be able to use * cartesian addition instead of jacobian. * * If we have some extra bits in our w-NAF representation, we * special case the first round to save a few point doubling. */ auto r = first.pdoublen!(N - ExtraBits)(); r = r.add(select(table, 1)); /** * The core multiplication routine. We double by N and add * the value looked up from the table each round. */ foreach (i; 2 .. Steps) { r = r.pdoublen!N(); r = r.add(select(table, i)); } /** * If we can take advantage of the scalar being smaller, we can't rely * simply on negating it to make sure it is odd. Instead, we skew the * value by 1 for even numbers and 2 for odd ones and need to fixup. */ static if (NeedSkew) { /** * jdbl contains the cartesian coordiantes of our double point off * by the right z factor. The z coordinate contains the globalz for * the ultimate fixup. We can get the value for 1 in the table. */ auto globalz = jdbl.z; auto pdbl = CartesianPoint(jdbl.x, jdbl.y, jdbl.infinity); auto fixup = CartesianPoint.select(!!(skew & 0x02), pdbl, table[0]); fixup = CartesianPoint.select(!!(skew & 0x01), fixup, fixup.negate()); r = r.add(fixup); } /** * We computed our multiplication such as all element are z * are equal to globalz and we can use cartesian addition for * speed. Now we fixup z by multiplying b the missing factor. */ r.z = r.z.mul(globalz); return r; } private: struct ScalarBuf { ulong[4] parts; this(Scalar s, ref bool negated) { parts = s.getParts(); // Negate if s is even, to make sure it is odd. auto m = (parts[0] & 0x01) - 1; ulong[4] order; order[0] = 0xBFD25E8CD0364141; order[1] = 0xBAAEDCE6AF48A03B; order[2] = 0xFFFFFFFFFFFFFFFE; order[3] = 0xFFFFFFFFFFFFFFFF; // Make sure we complement, not just bitflip. ucent acc = m & 0x01; foreach (i; 0 .. 4) { acc += (order[i] & m); acc += (parts[i] ^ m); parts[i] = cast(ulong) acc; acc >>= 64; } negated = m != 0; } this(Scalar s, ref ubyte skew) { parts = s.getParts(); // Mask from the sign. auto m = long(parts[3]) >> 63; auto odd = (parts[0] ^ m) & 0x01; ulong[4] order; order[0] = 0xBFD25E8CD0364141; order[1] = 0xBAAEDCE6AF48A03B; order[2] = 0xFFFFFFFFFFFFFFFE; order[3] = 0xFFFFFFFFFFFFFFFF; // We add 1 for even number, 2 for odds. // plus one for the complement if apropriate. ucent acc = odd + (m & 0x01) + 1; foreach (i; 0 .. 4) { acc += (order[i] & m); acc += (parts[i] ^ m); parts[i] = cast(ulong) acc; acc >>= 64; } // Forward infos about transformations done. skew = cast(ubyte) ((m & 0x01) | (odd << 1)); } auto extract() { enum Mask = (ulong(1) << N) - 1; int bits = parts[0] & Mask; parts[0] = (parts[0] >> N) | (parts[1] << (64 - N)); parts[1] = (parts[1] >> N) | (parts[2] << (64 - N)); parts[2] = (parts[2] >> N) | (parts[3] << (64 - N)); parts[3] = parts[3] >> N; return bits; } } static selectImpl(P)(ref P[TableSize] table, ubyte n) { // The least significant bit is the sign. We get rid of it // to get the index we are interested in in the table auto idx = n >> 1; /** * We want to avoid side channels attacks. One of the most common * side channel is memory access, as it impact the cache. To avoid * leaking the secret, we make sure no memory access depends on the * secret. This is achieved by accessing all elements in the table. */ auto p = table[0]; foreach (i; 1 .. TableSize) { p = P.select(i == idx, table[i], p); } // If P is already a CartesianPoint, this ia noop. auto c = CartesianPoint(p); // Finaly we negate the point if the sign is negative. auto positive = (n & 0x01) != 0; return CartesianPoint.select(positive, c, c.negate()); } } unittest { test!2(); test!3(); test!4(); test!5(); test!6(); test!7(); test!8(); import core.stdc.stdio; printf("OK\n".ptr); } void test(uint N)() { import crypto.point; auto g = CartesianPoint(Point.getG()); import crypto.scalar; auto zero = Scalar(0); auto mulzero = Wnaf!N(zero); auto zerog = mulzero.mul(g); auto jinf = g.add(g.negate()); auto inf = jinf.asCartesian(); assert(zerog.opEquals(inf), "0*G == O"); auto one = Scalar(1); auto mulone = Wnaf!N(one); auto oneg = mulone.mul(g); assert(oneg.opEquals(g), "1*G = G"); auto negone = one.negate(); auto mulnegone = Wnaf!N(negone); auto negoneg = mulnegone.mul(g); assert(negoneg.opEquals(g.negate()), "-1*G == -G"); auto two = Scalar(2); auto multwo = Wnaf!N(two); auto twog = multwo.mul(g); auto jdblg = g.pdouble(); auto dblg = jdblg.asCartesian(); assert(twog.opEquals(dblg), "2*G = G + G"); auto negtwo = two.negate(); auto mulnegtwo = Wnaf!N(negtwo); auto negtwog = mulnegtwo.mul(g); assert(negtwog.opEquals(dblg.negate()), "-2*G = -(G + G)"); import crypto.element; auto beta = ComputeElement(Beta); auto beta2 = beta.square(); // If P = (x, y), Lambda*P = (Beta*x, y) auto lambda = Lambda; auto mullambda = Wnaf!N(lambda); auto lambdag = mullambda.mul(g); auto betaxg = CartesianPoint(g.x.mul(beta), g.y, g.infinity); assert(lambdag.opEquals(betaxg), "Lambda*G == (Beta*G.x, G.y)"); auto neglambda = lambda.negate(); auto mulneglambda = Wnaf!N(neglambda); auto neglambdag = mulneglambda.mul(g); auto negbetaxg = CartesianPoint(g.x.mul(beta), g.y.negate(), g.infinity); assert(neglambdag.opEquals(negbetaxg), "-Lambda*G == (Beta*G.x, -G.y)"); auto lambda2 = lambda.square(); auto mullambda2 = Wnaf!N(lambda2); auto lambda2g = mullambda2.mul(g); auto beta2xg = CartesianPoint(g.x.mul(beta2), g.y, g.infinity); assert(lambda2g.opEquals(beta2xg), "Lambda^2*G == (Beta^2*G.x, G.y)"); auto neglambda2 = lambda2.negate(); auto mulneglambda2 = Wnaf!N(neglambda2); auto neglambda2g = mulneglambda2.mul(g); auto negbeta2xg = CartesianPoint(g.x.mul(beta2), g.y.negate(), g.infinity); assert( neglambda2g.opEquals(negbeta2xg), "-Lambda^2*G == (Beta^2*G.x, -G.y)", ); }
D
module grain.cl.allocator; import grain.tensor : Opt; import grain.cl.testing; import grain.cl.device : ClDevice; import grain.dpp.cl; struct ClMem { @nogc nothrow: cl_mem ptr; size_t length; alias ptr this; } struct ClMallocator { Opt opt; alias opt this; /// device indicator enum deviceof = "cl"; enum pinned = false; /// @trusted @nogc nothrow ClMem allocate()(size_t bytes) { // import grain.dpp.cuda_driver : cuMemAlloc_v2, CUdeviceptr; if (!bytes) return ClMem(null, 0); auto id = ClDevice.get(opt.deviceId, opt.platformId); auto context = checkClFun!clCreateContext(null, 1, &id, null, null); auto da = checkClFun!clCreateBuffer(context, CL_MEM_READ_WRITE, bytes, null); return ClMem(da, bytes); } /// @system @nogc nothrow bool deallocate()(ClMem b) { checkCl(clReleaseMemObject(b.ptr)); return true; } enum instance = ClMallocator(); }
D
// ********************************************** // B_GiveTradeInventory // -------------------- // Verteiler. Aufruf aller B_GiveTradeInv-Befehle // ********************************************** func void B_GiveTradeInv (var C_NPC slf) { //******************************************************************** // Hier auch!!! //******************************************************************** B_ClearRuneInv (slf); //////////////////////////////////////////////////////////////////////////////////////////////////// // Handelsware Clearen und Ambientstuff in die Tasche, wenn Trader Unconscious oder Dead //////////////////////////////////////////////////////////////////////////////////////////////////// };
D
/home/gunk/Documents/therustbook/guessing_game/target/debug/build/libc-a1fcfd5405a3b144/build_script_build-a1fcfd5405a3b144: /home/gunk/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.62/build.rs /home/gunk/Documents/therustbook/guessing_game/target/debug/build/libc-a1fcfd5405a3b144/build_script_build-a1fcfd5405a3b144.d: /home/gunk/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.62/build.rs /home/gunk/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.62/build.rs:
D
/** * Poodinis Dependency Injection Framework * Copyright 2014-2016 Mike Bierlee * This software is licensed under the terms of the MIT license. * The full terms of the license can be found in the LICENSE file. */ import poodinis; import std.exception; version(unittest) { interface Fruit { string getShape(); } interface Animal { string getYell(); } class Banana { public string color; this(string color) { this.color = color; } } class Apple {} class Pear : Fruit { public override string getShape() { return "Pear shaped"; } } class Rabbit : Animal { public override string getYell() { return "Squeeeeeel"; } } class Wolf : Animal { public override string getYell() { return "Wooooooooooo"; } } class PieChart {} class TestContext : ApplicationContext { @Component public Banana banana() { return new Banana("Yellow"); } public Apple apple() { return new Apple(); } @Component @RegisterByType!Fruit public Pear pear() { return new Pear(); } @Component @RegisterByType!Animal public Rabbit rabbit() { return new Rabbit(); } @Component @RegisterByType!Animal public Wolf wolf() { return new Wolf(); } @Component @Prototype public PieChart pieChart() { return new PieChart(); } } //Test register component registrations from context unittest { auto container = new shared DependencyContainer(); auto context = new TestContext(); context.registerContextComponents(container); auto bananaInstance = container.resolve!Banana; assert(bananaInstance.color == "Yellow"); } //Test non-annotated methods are not registered unittest { auto container = new shared DependencyContainer(); auto context = new TestContext(); context.registerContextComponents(container); assertThrown!ResolveException(container.resolve!Apple); } //Test register component by base type unittest { auto container = new shared DependencyContainer(); auto context = new TestContext(); context.registerContextComponents(container); auto instance = container.resolve!Fruit; assert(instance.getShape() == "Pear shaped"); } //Test register components with multiple candidates unittest { auto container = new shared DependencyContainer(); auto context = new TestContext(); context.registerContextComponents(container); auto rabbit = container.resolve!(Animal, Rabbit); assert(rabbit.getYell() == "Squeeeeeel"); auto wolf = container.resolve!(Animal, Wolf); assert(wolf.getYell() == "Wooooooooooo"); } //Test register component as prototype unittest { auto container = new shared DependencyContainer(); auto context = new TestContext(); context.registerContextComponents(container); auto firstInstance = container.resolve!PieChart; auto secondInstance = container.resolve!PieChart; assert(firstInstance !is null && secondInstance !is null); assert(firstInstance !is secondInstance); } }
D
/home/zbf/workspace/git/RTAP/target/debug/build/nom-92039a9651ed75fc/build_script_build-92039a9651ed75fc: /home/zbf/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/nom-4.2.3/build.rs /home/zbf/workspace/git/RTAP/target/debug/build/nom-92039a9651ed75fc/build_script_build-92039a9651ed75fc.d: /home/zbf/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/nom-4.2.3/build.rs /home/zbf/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/nom-4.2.3/build.rs:
D
#!/usr/bin/env dub /+dub.sdl: dependency "dmd" path="../.." +/ import std.stdio; // test frontend void main() { import dmd.frontend; import std.algorithm : canFind, each; import std.file : remove, tempDir, fwrite = write; import std.format : format; import std.path : buildPath; initDMD; findImportPaths.each!addImport; auto fileName = tempDir.buildPath("d_frontend_test.d"); scope(exit) fileName.remove; auto sourceCode = q{ module foo; double average(int[] array) { immutable initialLength = array.length; double accumulator = 0.0; while (array.length) { // this could be also done with .front // with import std.array : front; accumulator += array[0]; array = array[1 .. $]; } return accumulator / initialLength; } }; fileName.fwrite(sourceCode); auto t = fileName.parseModule; assert(!t.diagnostics.hasErrors); assert(!t.diagnostics.hasWarnings); t.module_.fullSemantic; auto generated = t.module_.prettyPrint.toUnixLineEndings(); // For some reason the floating point number in the pretty printed code is // different on Windows and on Posix. It might be due to different C // standard libraries that are most likely used to convert the floating // point number to a string. version (Windows) enum accumulator = "0.000000"; else enum accumulator = "0.00000"; enum expected =q{module foo; import object; double average(int[] array) { immutable immutable(uint) initialLength = array.length; double accumulator = %s; for (; array.length;) { { accumulator += cast(double)array[0]; array = array[1..__dollar]; } } return accumulator / cast(double)initialLength; } }.format(accumulator); assert(generated.canFind(expected)); } /** Converts Windows line endings (`\r\n`) to Unix line endings (`\n`). This is required because this file is stored with Unix line endings but the `prettyPrint` function outputs Windows line endings on Windows. */ string toUnixLineEndings(string str) { import std.string : replace; return str.replace("\r\n", "\n"); }
D
import std.stdio; uint getFour () { auto getTwo () { return 1 + 1; } return getTwo () + getTwo (); } void main () { import core.stdc.stdlib : exit; writeln ("Four: ", getFour ()); exit (4); } unittest { writeln ("TEST"); import core.stdc.stdlib : exit; import second_unit; assert (getFour () > 2); assert (getFour () == 4); // this is a regression test for https://github.com/mesonbuild/meson/issues/3337 secondModuleTestFunc (); // we explicitly terminate here to give the unittest program a different exit // code than the main application has. // (this prevents the regular main() from being executed) exit (0); }
D
// This file lists D routines required for coding UVM // //------------------------------------------------------------------------------ // Copyright 2012-2014 Coverify Systems Technology // All Rights Reserved Worldwide // // Licensed under the Apache License, Version 2.0 (the // "License"); you may not use this file except in // compliance with the License. You may obtain a copy of // the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in // writing, software distributed under the License is // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR // CONDITIONS OF ANY KIND, either express or implied. See // the License for the specific language governing // permissions and limitations under the License. //------------------------------------------------------------------------------ module uvm.meta.mailbox; private import esdl.base.core: Event; // Mimics the SystemVerilog mailbox behaviour class mailbox(T) { private T[] _buffer; private size_t _free; private size_t _readIndex; private size_t _writeIndex; // _bound is effectively immutable -- set only in the constructor private size_t _bound; private size_t bound() { return _bound; } private Event _readEvent; private Event _writeEvent; private void GrowBuffer() { synchronized(this) { size_t size = _buffer.length; _buffer.length = 2 * size; _free += size; for(size_t i = 0; i != _writeIndex; ++i) { _buffer[size+i] = _buffer[i]; } _writeIndex += size; } } public this(size_t bound = 0) { synchronized(this) { _bound = bound; _readEvent.init("readEvent"); _writeEvent.init("writeEvent"); if(bound is 0) { // no bound, start with 4 _buffer.length = 4; } else { _buffer.length = bound; } _free = _buffer.length; } } size_t numFilled() { synchronized(this) { return _buffer.length - _free; // _numReadable - _numRead; } } alias num = numFilled; // static if(N != 0) { size_t numFree() { synchronized(this) { return _free; // _buffer.length - _numReadable - _numWritten; } } // } private void readBuffer(ref T val) { synchronized(this) { if(numFilled is 0) { // this should never happen assert(false, "readBuffer called when numFilled is 0"); } val = _buffer[_readIndex]; _free += 1; _readIndex =(1 + _readIndex) % _buffer.length; } } private void peekBuffer(ref T val) { synchronized(this) { if(numFilled is 0) { // this should never happen assert(false, "peekBuffer called when numFilled is 0"); } val = _buffer[_readIndex]; } } private void writeBuffer(T val) { synchronized(this) { if(numFree is 0) { // this should never happen assert(false, "writeBuffer called when numFree is 0"); } _buffer[_writeIndex] = val; _free -= 1; _writeIndex =(1 + _writeIndex) % _buffer.length; } } void get(ref T val) { while(true) { if(numFilled is 0) { _writeEvent.wait(); } synchronized(this) { if(numFilled !is 0) { readBuffer(val); _readEvent.notify(); break; } } } } void peek(ref T val) { while(true) { if(numFilled is 0) { _writeEvent.wait(); } synchronized(this) { if(numFilled !is 0) { peekBuffer(val); break; } } } } void put(T val) { while(true) { if(bound is 0) { synchronized(this) { if(numFree is 0) { GrowBuffer(); } } } else { if(numFree is 0) { _readEvent.wait(); } } synchronized(this) { if(numFree !is 0) { writeBuffer(val); _writeEvent.notify(); break; } } } } bool try_get(ref T val) { synchronized(this) { if(numFilled is 0) return false; readBuffer(val); _readEvent.notify(); return true; } } bool try_peek(ref T val) { synchronized(this) { if(numFilled is 0) return false; peekBuffer(val); return true; } } bool try_put(T val) { synchronized(this) { if(bound is 0) { if(numFree is 0) { GrowBuffer(); } } else { if(numFree is 0) { return false; } } writeBuffer(val); _writeEvent.notify(); return true; } } }
D
instance DIA_Sarah_EXIT(C_Info) { npc = VLK_470_Sarah; nr = 999; condition = DIA_Sarah_EXIT_Condition; information = DIA_Sarah_EXIT_Info; permanent = TRUE; description = Dialog_Ende; }; func int DIA_Sarah_EXIT_Condition() { return TRUE; }; func void DIA_Sarah_EXIT_Info() { B_EquipTrader(self); AI_StopProcessInfos(self); }; instance DIA_Sarah_Greet(C_Info) { npc = VLK_470_Sarah; nr = 1; condition = DIA_Sarah_Greet_Condition; information = DIA_Sarah_Greet_Info; permanent = TRUE; important = TRUE; }; func int DIA_Sarah_Greet_Condition() { if(Npc_IsInState(self,ZS_Talk) && Npc_KnowsInfo(other,DIA_Sarah_HALLO) && !Npc_KnowsInfo(other,DIA_Sarah_Success)) { return TRUE; }; }; func void DIA_Sarah_Greet_Info() { AI_Output(self,other,"DIA_Sarah_Add_16_07"); //Ах! Опять ты! }; instance DIA_Sarah_HALLO(C_Info) { npc = VLK_470_Sarah; condition = DIA_Sarah_HALLO_Condition; information = DIA_Sarah_HALLO_Info; permanent = FALSE; description = "Как торговля?"; }; func int DIA_Sarah_HALLO_Condition() { return TRUE; }; func void DIA_Sarah_HALLO_Info() { AI_Output(other,self,"DIA_Sarah_HALLO_15_00"); //Как торговля? AI_Output(self,other,"DIA_Sarah_HALLO_16_01"); //Когда пришли паладины, я сначала думала, что это хорошо для бизнеса. AI_Output(self,other,"DIA_Sarah_HALLO_16_02"); //Но теперь Гарад делает для них оружие, а ни я, ни Хакон еще не получили от них ни одной монеты. AI_Output(self,other,"DIA_Sarah_HALLO_16_03"); //И, что еще хуже, фермеры больше не поставляют нам продовольствие, и цены на все взлетели до небес. AI_Output(self,other,"DIA_Sarah_Add_16_00"); //Одно маленькое утешение - паладины оплачивают мою комнату в отеле. Log_CreateTopic(TOPIC_CityTrader,LOG_NOTE); B_LogEntry(TOPIC_CityTrader,"Сара торгует оружием на рыночной площади."); }; var int SarahToldAboutAkilsProblem; instance DIA_Sarah_Bauern(C_Info) { npc = VLK_470_Sarah; nr = 2; condition = DIA_Sarah_Bauern_Condition; information = DIA_Sarah_Bauern_Info; permanent = FALSE; description = "А что за проблема с фермерами?"; }; func int DIA_Sarah_Bauern_Condition() { if(Npc_KnowsInfo(other,DIA_Sarah_HALLO)) { return TRUE; }; }; func void DIA_Sarah_Bauern_Info() { AI_Output(other,self,"DIA_Sarah_Bauern_15_00"); //А что за проблема с фермерами? AI_Output(self,other,"DIA_Sarah_Bauern_16_01"); //Они отказываются поставлять нам продовольствие. AI_Output(self,other,"DIA_Sarah_Bauern_16_02"); //Теперь, когда корабли больше не заходят в наш порт, город полностью зависит от продуктов, производимых нашими фермерами. AI_Output(self,other,"DIA_Sarah_Bauern_16_03"); //А Онар, самый крупный фермер, нанял наемников, чтобы защищать свою ферму от городской стражи. До этого они забирали у него все подчистую. AI_Output(self,other,"DIA_Sarah_Add_16_01"); //Но наемники не просто охраняют ферму Онара. AI_Output(self,other,"DIA_Sarah_Add_16_02"); //Они добрались даже до маленьких ферм у города, и запугивают их владельцев. if(!C_AkilFarmIsFree()) { AI_Output(self,other,"DIA_Sarah_Add_16_03"); //Я видела их, когда ходила на ферму Акила. Не хотела бы я сейчас оказаться на его месте. SarahToldAboutAkilsProblem = TRUE; if(Akils_SLDStillthere == FALSE) { Log_CreateTopic(TOPIC_AkilsSLDStillthere,LOG_MISSION); Log_SetTopicStatus(TOPIC_AkilsSLDStillthere,LOG_Running); B_LogEntry(TOPIC_AkilsSLDStillthere,"Фермеру Акилу угрожают наемники."); Akils_SLDStillthere = TRUE; }; }; }; instance DIA_Sarah_AkilsHof(C_Info) { npc = VLK_470_Sarah; nr = 3; condition = DIA_Sarah_AkilsHof_Condition; information = DIA_Sarah_AkilsHof_Info; permanent = FALSE; description = "Где мне найти ферму Акила?"; }; func int DIA_Sarah_AkilsHof_Condition() { if(SarahToldAboutAkilsProblem == TRUE) { return TRUE; }; }; func void DIA_Sarah_AkilsHof_Info() { AI_Output(other,self,"DIA_Sarah_AkilsHof_15_00"); //Где мне найти ферму Акила? AI_Output(self,other,"DIA_Sarah_Add_16_04"); //Если выйдешь из восточных ворот и пойдешь по дороге направо, скоро ты увидишь каменную лестницу. AI_Output(self,other,"DIA_Sarah_Add_16_05"); //Она ведет прямо к ферме Акила. if(Kapitel < 4) { AI_Output(self,other,"DIA_Sarah_Add_16_06"); //Но я бы сейчас туда не совалась - эти наемники наверняка все еще там. }; }; instance DIA_Sarah_Trade(C_Info) { npc = VLK_470_Sarah; nr = 99; condition = DIA_Sarah_Trade_Condition; information = DIA_Sarah_Trade_Info; trade = TRUE; permanent = TRUE; description = DIALOG_TRADE_v4; }; func int DIA_Sarah_Trade_Condition() { if(Npc_KnowsInfo(other,DIA_Sarah_HALLO) && (MIS_Canthars_KomproBrief != LOG_SUCCESS)) { return TRUE; }; }; func void DIA_Sarah_Trade_Info() { AI_Output(other,self,"DIA_Sarah_Trade_15_00"); //Покажи мне свои товары. B_GiveTradeInv(self); Trade_IsActive = TRUE; }; instance DIA_Sarah_IMKNAST(C_Info) { npc = VLK_470_Sarah; nr = 99; condition = DIA_Sarah_IMKNAST_Condition; information = DIA_Sarah_IMKNAST_Info; permanent = TRUE; important = TRUE; }; func int DIA_Sarah_IMKNAST_Condition() { if((MIS_Canthars_KomproBrief == LOG_SUCCESS) && Npc_IsInState(self,ZS_Talk)) { return TRUE; }; }; func void DIA_Sarah_IMKNAST_Info() { AI_Output(self,other,"DIA_Sarah_IMKNAST_16_00"); //Ты! Ты осмелился появиться здесь! Я, конечно не могу доказать этого, но я готова поклясться, что это твоих рук дело! AI_Output(self,other,"DIA_Sarah_IMKNAST_16_01"); //Это ты виноват, что я здесь. Ты и этот проклятый Кантар - да накажет вас Иннос! AI_StopProcessInfos(self); }; instance DIA_Sarah_Success(C_Info) { npc = VLK_470_Sarah; nr = 4; condition = DIA_Sarah_Success_Condition; information = DIA_Sarah_Success_Info; permanent = FALSE; description = "Кантар пытался подставить тебя и заполучить твой прилавок."; }; func int DIA_Sarah_Success_Condition() { if(Canthar_Ausgeliefert == TRUE) { return TRUE; }; }; func void DIA_Sarah_Success_Info() { AI_Output(other,self,"DIA_Sarah_Success_15_00"); //Кантар пытался подставить тебя и заполучить твой прилавок. Но я сдал его городской страже. AI_Output(self,other,"DIA_Sarah_Success_16_01"); //Ты этим нажил себе очень опасного врага. Я давно знаю этого ублюдка. И он всегда хотел заполучить мой прилавок. AI_Output(self,other,"DIA_Sarah_Success_16_02"); //Возьми это оружие в знак моей благодарности. B_GivePlayerXP(XP_CantharImKnast); B_GiveInvItems(self,other,ItMw_Piratensaebel,1); };
D
/** * Authors: Szabo Bogdan <szabobogdan@yahoo.com> * Date: 3 29, 2015 * License: Subject to the terms of the MIT license, as written in the included LICENSE.txt file. * Copyright: Public Domain */ module vibedav.davresource; import vibedav.prop; import vibe.core.log; import vibe.core.file; import vibe.inet.mimetypes; import vibe.inet.message; import vibe.http.server; import vibe.http.fileserver; import vibe.http.router : URLRouter; import vibe.stream.operations; import vibe.internal.meta.uda; import std.stdio; import std.datetime; import std.string; import std.file; import std.path; struct ResourcePropertyValue { enum Mode { none, attribute, tagName, tagAttributes, tag, levelTag } string name; string name2; string ns; string attr; Mode mode; DavProp create(string val) { if(mode == Mode.attribute) return createAttribute(val); if(mode == Mode.tagName) return createTagName(val); if(mode == Mode.tag) return createTagText(val); if(mode == Mode.levelTag) return createLevelTag(val); return new DavProp(val); } DavProp create(string[string] val) { if(mode == Mode.tagAttributes) return createTagList(val); throw new DavException(HTTPStatus.internalServerError, "Can't parse value."); } DavProp createAttribute(string val) { DavProp p = new DavProp(ns, name); p.attribute[attr] = val; return p; } DavProp createTagName(string val) { return DavProp.FromKey(val, ""); } DavProp createTagList(string[string] val) { DavProp p = new DavProp(ns, name); foreach(k, v; val) p.attribute[k] = v; return p; } DavProp createLevelTag(string val) { DavProp level1 = new DavProp(ns, name); DavProp level2 = new DavProp(ns, name2); level2.addChild(DavProp.FromKey(val, "")); level1.addChild(level2); return level1; } DavProp createTagText(string val) { return new DavProp(ns, name, val); } } /// Make the returned value to be rendered like this: <[name] xmlns="[ns]" [attr]=[value]/> ResourcePropertyValue ResourcePropertyValueAttr(string name, string ns, string attr) { ResourcePropertyValue v; v.name = name; v.ns = ns; v.attr = attr; v.mode = ResourcePropertyValue.Mode.attribute; return v; } /// Make the returned value to be a <collection> tag or not ResourcePropertyValue ResourcePropertyTagName() { ResourcePropertyValue v; v.mode = ResourcePropertyValue.Mode.tagName; return v; } /// Make the returned value to be <[name] xmlns=[ns] [attribute list]/> ResourcePropertyValue ResourcePropertyTagAttributes(string name, string ns) { ResourcePropertyValue v; v.name = name; v.ns = ns; v.mode = ResourcePropertyValue.Mode.tagAttributes; return v; } /// Make the returned value to be: <[name] xmlns=[ns]>[value]</[name]> ResourcePropertyValue ResourcePropertyTagText(string name, string ns) { ResourcePropertyValue v; v.name = name; v.ns = ns; v.mode = ResourcePropertyValue.Mode.tag; return v; } /// Make the returned value to be: <[level1Name] xmlns=[ns]><[level2Name] xmlns=[ns]><value></[level2Name]></[level1Name]> ResourcePropertyValue ResourcePropertyLevelTagText(string level1Name, string level2Name, string ns) { ResourcePropertyValue v; v.name = level1Name; v.name2 = level2Name; v.ns = ns; v.mode = ResourcePropertyValue.Mode.levelTag; return v; } struct ResourceProperty { string name; string ns; } ResourceProperty getResourceProperty(T...)() { static if(T.length == 0) static assert(false, "There is no `@ResourceProperty` attribute."); else static if( is(typeof(T[0]) == ResourceProperty) ) return T[0]; else return getResourceProperty!(T[1..$]); } ResourcePropertyValue getResourceTagProperty(T...)() { static if(T.length == 0) { ResourcePropertyValue v; return v; } else static if( is(typeof(T[0]) == ResourcePropertyValue) ) return T[0]; else return getResourceTagProperty!(T[1..$]); } pure bool hasDavInterfaceProperty(I)(string key) { bool result = false; void keyExist(T...)() { static if(T.length > 0) { enum val = getResourceProperty!(__traits(getAttributes, __traits(getMember, I, T[0]))); enum staticKey = val.name ~ ":" ~ val.ns; if(staticKey == key) result = true; keyExist!(T[1..$])(); } } keyExist!(__traits(allMembers, I))(); return result; } DavProp propFrom(T, U)(string name, string ns, T value, U tagVal) { string v; auto p = new DavProp(ns, name); static if( is(T == SysTime) ) { auto elm = tagVal.create(toRFC822DateTimeString(value)); p.addChild(elm); } else static if( is(T == string[]) ) { foreach(item; value) { auto tag = tagVal.create(item); try p.addChild(tag); catch(Exception e) writeln(e); } } else static if( is(T == string[][string]) ) { foreach(item; value) { auto tag = tagVal.create(item); p.addChild(tag); } } else { auto elm = tagVal.create(value.to!string); p.addChild(elm); } return p; } DavProp getDavInterfaceProperty(I, T)(string key, T plugin, DavResource resource) { DavProp result; void getProp(T...)() { static if(T.length > 0) { enum val = getResourceProperty!(__traits(getAttributes, __traits(getMember, I, T[0]))); enum tagVal = getResourceTagProperty!(__traits(getAttributes, __traits(getMember, I, T[0]))); enum staticKey = val.name ~ ":" ~ val.ns; if(staticKey == key) { auto value = __traits(getMember, plugin, T[0])(resource); result = propFrom(val.name, val.ns, value, tagVal); } getProp!(T[1..$])(); } } getProp!(__traits(allMembers, I))(); return result; } enum DavDepth : int { zero = 0, one = 1, infinity = 99 }; interface IDavBindingProperties { @property { @ResourceProperty("resource-id", "DAV:") string resourceId(DavResource resource); } } interface IDavReportSetProperties { @property { @ResourcePropertyLevelTagText("supported-report", "report", "DAV:") @ResourceProperty("supported-report-set", "DAV:") string[] supportedReportSet(DavResource resource); } } interface IDavResourceProperties { @ResourceProperty("creationdate", "DAV:") SysTime creationDate(DavResource resource); @ResourceProperty("getlastmodified", "DAV:") SysTime lastModified(DavResource resource); @ResourceProperty("getetag", "DAV:") string eTag(DavResource resource); @ResourceProperty("getcontenttype", "DAV:") string contentType(DavResource resource); @ResourceProperty("getcontentlength", "DAV:") ulong contentLength(DavResource resource); @ResourceProperty("resourcetype", "DAV:") @ResourcePropertyTagName() string[] resourceType(DavResource resource); @ResourceProperty("displayname", "DAV:") string displayName(DavResource resource); } interface IDavResourceExtendedProperties { @ResourceProperty("add-member", "DAV:") @ResourcePropertyTagText("href", "DAV:") string[] addMember(); @ResourceProperty("owner", "DAV:") @ResourcePropertyTagText("href", "DAV:") string owner(); } interface IDavResourcePlugin { bool canSetContent(DavResource resource); bool canGetStream(DavResource resource); bool canGetProperty(DavResource resource, string name); bool canSetProperty(DavResource resource, string name); bool canRemoveProperty(DavResource resource, string name); bool[string] getChildren(DavResource resource); void setContent(DavResource resource, const ubyte[] content); void setContent(DavResource resource, InputStream content, ulong size); InputStream stream(DavResource resource); void copyPropertiesTo(URL source, URL destination); DavProp property(DavResource resource, string name); HTTPStatus setProperty(DavResource resource, string name, DavProp prop); HTTPStatus removeProperty(DavResource resource, string name); @property { string name(); } } abstract class BaseDavResourcePlugin : IDavResourcePlugin { bool canSetContent(DavResource resource) { return false; } bool canGetStream(DavResource resource) { return false; } bool canSetProperty(DavResource resource, string name) { return false; } bool canRemoveProperty(DavResource resource, string name) { return false; } bool canGetProperty(DavResource resource, string name) { return false; } bool[string] getChildren(DavResource resource) { bool[string] list; return list; } void setContent(DavResource resource, const ubyte[] content) { throw new DavException(HTTPStatus.internalServerError, "Can't set content."); } void setContent(DavResource resource, InputStream content, ulong size) { throw new DavException(HTTPStatus.internalServerError, "Can't set content."); } InputStream stream(DavResource resource) { throw new DavException(HTTPStatus.internalServerError, "Can't get stream."); } void copyPropertiesTo(URL source, URL destination) { } DavProp property(DavResource resource, string name) { throw new DavException(HTTPStatus.internalServerError, "Can't get property."); } HTTPStatus setProperty(DavResource resource, string name, DavProp prop) { throw new DavException(HTTPStatus.internalServerError, "Can't set property."); } HTTPStatus removeProperty(DavResource resource, string name) { throw new DavException(HTTPStatus.internalServerError, "Can't remove property."); } } interface IDavResourcePluginHub { void registerPlugin(IDavResourcePlugin plugin); bool hasPlugin(string name); } class ResourceBasicProperties : BaseDavResourcePlugin, IDavResourceProperties { SysTime creationDate(DavResource resource) { return resource.creationDate; } SysTime lastModified(DavResource resource) { return resource.lastModified; } string eTag(DavResource resource) { return resource.eTag; } string contentType(DavResource resource) { return resource.contentType; } ulong contentLength(DavResource resource) { return resource.contentLength; } string[] resourceType(DavResource resource) { return resource.resourceType; } string displayName(DavResource resource) { return resource.name; } override { bool canGetProperty(DavResource resource, string name) { if(hasDavInterfaceProperty!IDavResourceProperties(name)) return true; return false; } DavProp property(DavResource resource, string name) { if(canGetProperty(resource, name)) return getDavInterfaceProperty!IDavResourceProperties(name, this, resource); throw new DavException(HTTPStatus.internalServerError, "Can't get property."); } } @property { string name() { return "ResourceBasicProperties"; } } } class ResourceCustomProperties : BaseDavResourcePlugin { private static DavProp[string][string] properties; override { bool canGetProperty(DavResource resource, string name) { string u = resource.url.toString; if(u !in properties) return false; if(name !in properties[u]) return false; return true; } bool canSetProperty(DavResource resource, string name) { return true; } bool canRemoveProperty(DavResource resource, string name) { return canGetProperty(resource, name); } void copyPropertiesTo(URL source, URL destination) { if(source.toString in properties) properties[destination.toString] = properties[source.toString]; } DavProp property(DavResource resource, string name) { if(canGetProperty(resource, name)) return properties[resource.url.toString][name]; throw new DavException(HTTPStatus.internalServerError, "Can't get property."); } HTTPStatus setProperty(DavResource resource, string name, DavProp prop) { if(resource.url.toString !in properties) { DavProp[string] list; properties[resource.url.toString] = list; } properties[resource.url.toString][name] = prop; return HTTPStatus.ok; } HTTPStatus removeProperty(DavResource resource, string name) { if(canGetProperty(resource, name)) properties[resource.url.toString].remove(name); return HTTPStatus.notFound; } } @property { string name() { return "ResourceCustomProperties"; } } } /// Represents a DAV resource class DavResource : IDavResourcePluginHub { string href; URL url; string username; SysTime creationDate; SysTime lastModified; string eTag; string contentType; ulong contentLength; string[] resourceType; string name; protected { IDavResourcePlugin[] plugins; IDav dav; } this(IDav dav, URL url) { this.dav = dav; this.url = url; resourceType = []; string strUrl = url.toString; } private { HTTPStatus removeProperty(string key) { HTTPStatus result = HTTPStatus.notFound; foreach_reverse(plugin; plugins) if(plugin.canRemoveProperty(this, key)) try plugin.removeProperty(this, key); catch (DavException e) result = e.status; foreach_reverse(plugin; plugins) if(plugin.canGetProperty(this, key)) result = HTTPStatus.ok; return result; } HTTPStatus setProperty(string key, DavProp prop) { HTTPStatus result = HTTPStatus.notFound; foreach_reverse(plugin; plugins) if(plugin.canSetProperty(this, key)) try plugin.setProperty(this, key, prop); catch (DavException e) result = e.status; foreach_reverse(plugin; plugins) if(plugin.canGetProperty(this, key)) result = HTTPStatus.ok; return result; } } void registerPlugin(IDavResourcePlugin plugin) { assert(!hasPlugin(plugin.name), plugin.name ~ " already added."); plugins ~= plugin; } bool hasPlugin(string name) { foreach_reverse(plugin; plugins) if(plugin.name == name) return true; return false; } @property { string fullURL() { return url.toString; } nothrow pure string type() { return "DavResource"; } } DavProp property(string key) { DavProp p; foreach_reverse(plugin; plugins) { if(plugin.canGetProperty(this, key)) { auto t = plugin.property(this, key); if(p is null) p = t; else if(p.isGroup && t.isGroup) foreach(string k, DavProp child; t) p.addChild(child); } } if(p !is null) return p; throw new DavException(HTTPStatus.notFound, "Not Found"); } void filterProps(DavProp parent, bool[string] props) { DavProp item = new DavProp; item.parent = parent; item.name = "d:response"; DavProp[][int] result; item[`d:href`] = urlToString(url); foreach_reverse(key; props.keys) { DavProp p; auto splitPos = key.indexOf(":"); auto tagName = key[0..splitPos]; auto tagNameSpace = key[splitPos+1..$]; try { p = property(key); result[200] ~= p; } catch (DavException e) { p = new DavProp; p.name = tagName; p.namespaceAttr = tagNameSpace; result[e.status] ~= p; } } /// Add the properties by status foreach_reverse(code; result.keys) { auto propStat = new DavProp; propStat.parent = item; propStat.name = "d:propstat"; propStat["d:prop"] = ""; foreach(p; result[code]) { propStat["d:prop"].addChild(p); } propStat["d:status"] = `HTTP/1.1 ` ~ code.to!string ~ ` ` ~ httpStatusText(code); item.addChild(propStat); } item["d:status"] = `HTTP/1.1 200 OK`; parent.addChild(item); } bool hasChild(Path path) { auto childList = getChildren; if(path.to!string in childList) return true; return false; } string propPatch(DavProp document) { string description; string result = `<?xml version="1.0" encoding="utf-8" ?><d:multistatus xmlns:d="DAV:"><d:response>`; result ~= `<d:href>` ~ urlToString(url) ~ `</d:href>`; auto updateList = [document].getTagChilds("propertyupdate"); foreach(string key, item; updateList[0]) { if(item.tagName == "remove") { //remove properties auto removeList = [item].getTagChilds("prop"); foreach(prop; removeList) foreach(string key, p; prop) { auto status = removeProperty(key); result ~= `<d:propstat><d:prop>` ~ p.toString ~ `</d:prop>`; result ~= `<d:status>HTTP/1.1 ` ~ status.to!int.to!string ~ ` ` ~ status.to!string ~ `</d:status></d:propstat>`; } } else if(item.tagName == "set") { //set properties auto setList = [item].getTagChilds("prop"); foreach(prop; setList) { foreach(string key, p; prop) { auto status = setProperty(key, p); result ~= `<d:propstat><d:prop>` ~ p.toString ~ `</d:prop>`; result ~= `<d:status>HTTP/1.1 ` ~ status.to!int.to!string ~ ` ` ~ status.to!string ~ `</d:status></d:propstat>`; } } } } if(description != "") result ~= `<d:responsedescription>` ~ description ~ `</d:responsedescription>`; result ~= `</d:response></d:multistatus>`; return result; } bool[string] getChildren() { bool[string] list; foreach_reverse(plugin; plugins) { auto tmpList = plugin.getChildren(this); foreach(string key, bool value; tmpList) list[key] = value; } return list; } void copyPropertiesTo(URL destination) { foreach_reverse(plugin; plugins) plugin.copyPropertiesTo(url, destination); } void setContent(const ubyte[] content) { foreach_reverse(plugin; plugins) if(plugin.canSetContent(this)) { plugin.setContent(this, content); return; } throw new DavException(HTTPStatus.methodNotAllowed, "setContent No plugin support."); } void setContent(InputStream content, ulong size) { foreach_reverse(plugin; plugins) if(plugin.canSetContent(this)) { plugin.setContent(this, content, size); return; } throw new DavException(HTTPStatus.methodNotAllowed, "setContent No plugin support."); } @property { InputStream stream() { foreach_reverse(plugin; plugins) if(plugin.canGetStream(this)) return plugin.stream(this); throw new DavException(HTTPStatus.methodNotAllowed, "stream No plugin support."); } pure nothrow bool isCollection() { foreach_reverse(type; resourceType) if(type == "collection:DAV:") return true; return false; } } }
D
instance Mod_7059_DMR_Daemonenritter_MT (Npc_Default) { // ------ NSC ------ name = "Dämonenritter"; guild = GIL_KDF; id = 7059; voice = 13; flags = 0; npctype = NPCTYPE_MAIN; // ------ Attribute ------ B_SetAttributesToChapter (self, 5); // ------ Kampf-Taktik ------ fight_tactic = FAI_HUMAN_MASTER; // ------ Equippte Waffen ------ EquipItem (self, ItMw_1h_Mil_Sword); // ------ Inventory ------ B_CreateAmbientInv (self); // ------ visuals ------ B_SetNpcVisual (self, MALE, "Hum_Head_FatBald", Face_N_Normal06, BodyTex_N,ITAR_Raven_Addon); Mdl_SetModelFatness (self,2); Mdl_ApplyOverlayMds (self, "Humans_Relaxed.mds"); // ------ NSC-relevante Talente vergeben ------ B_GiveNpcTalents (self); // ------ Kampf-Talente ------ B_SetFightSkills (self, 80); // ------ TA anmelden ------ daily_routine = Rtn_Start_7059; }; FUNC VOID Rtn_Start_7059() { TA_Stand_WP (08,00,23,00,"WP_INTRO_FALL3"); TA_Stand_WP (23,00,08,00,"WP_INTRO_FALL3"); };
D
module org.eclipse.swt.accessibility.all; public import org.eclipse.swt.accessibility.ACC; public import org.eclipse.swt.accessibility.Accessible; public import org.eclipse.swt.accessibility.AccessibleActionAdapter; public import org.eclipse.swt.accessibility.AccessibleActionEvent; public import org.eclipse.swt.accessibility.AccessibleActionListener; public import org.eclipse.swt.accessibility.AccessibleAdapter; public import org.eclipse.swt.accessibility.AccessibleAttributeAdapter; public import org.eclipse.swt.accessibility.AccessibleAttributeEvent; public import org.eclipse.swt.accessibility.AccessibleAttributeListener; public import org.eclipse.swt.accessibility.AccessibleControlAdapter; public import org.eclipse.swt.accessibility.AccessibleControlEvent; public import org.eclipse.swt.accessibility.AccessibleControlListener; public import org.eclipse.swt.accessibility.AccessibleEditableTextAdapter; public import org.eclipse.swt.accessibility.AccessibleEditableTextEvent; public import org.eclipse.swt.accessibility.AccessibleEditableTextListener; public import org.eclipse.swt.accessibility.AccessibleEvent; public import org.eclipse.swt.accessibility.AccessibleFactory; public import org.eclipse.swt.accessibility.AccessibleListener; public import org.eclipse.swt.accessibility.AccessibleObject; public import org.eclipse.swt.accessibility.AccessibleTextAdapter; public import org.eclipse.swt.accessibility.AccessibleTextAttributeEvent; public import org.eclipse.swt.accessibility.AccessibleTextEvent; public import org.eclipse.swt.accessibility.AccessibleTextListener;
D
/Users/kirstenrichard/Desktop/substrate-moloch-dao/target/release/build/num-bigint-49fcda9088b9dadb/build_script_build-49fcda9088b9dadb: /Users/kirstenrichard/.cargo/registry/src/github.com-1ecc6299db9ec823/num-bigint-0.2.6/build.rs /Users/kirstenrichard/Desktop/substrate-moloch-dao/target/release/build/num-bigint-49fcda9088b9dadb/build_script_build-49fcda9088b9dadb.d: /Users/kirstenrichard/.cargo/registry/src/github.com-1ecc6299db9ec823/num-bigint-0.2.6/build.rs /Users/kirstenrichard/.cargo/registry/src/github.com-1ecc6299db9ec823/num-bigint-0.2.6/build.rs:
D
/* * DSFML - The Simple and Fast Multimedia Library for D * * Copyright (c) 2013 - 2017 Jeremy DeHaan (dehaan.jeremiah@gmail.com) * * This software is provided 'as-is', without any express or implied warranty. * In no event will the authors be held liable for any damages arising from the * use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not claim * that you wrote the original software. If you use this software in a product, * an acknowledgment in the product documentation would be appreciated but is * not required. * * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * * 3. This notice may not be removed or altered from any source distribution */ /** * $(U Mutex) stands for "MUTual EXclusion". A mutex is a synchronization * object, used when multiple threads are involved. * * When you want to protect a part of the code from being accessed * simultaneously by multiple threads, you typically use a mutex. When a thread * is locked by a mutex, any other thread trying to lock it will be blocked * until the mutex is released by the thread that locked it. This way, you can * allow only one thread at a time to access a critical region of your code. * * Example: * --- * // this is a critical resource that needs some protection * Database database; * auto mutex = Mutex(); * * void thread1() * { * // this call will block the thread if the mutex is already locked by thread2 * mutex.lock(); * database.write(...); * // if thread2 was waiting, it will now be unblocked * mutex.unlock(); * } * * void thread2() * { * // this call will block the thread if the mutex is already locked by thread1 * mutex.lock(); * database.write(...); * mutex.unlock(); // if thread1 was waiting, it will now be unblocked * } * --- * * $(PARA Be very careful with mutexes. A bad usage can lead to bad problems, * like deadlocks (two threads are waiting for each other and the application is * globally stuck). * * To make the usage of mutexes more robust, particularly in environments where * exceptions can be thrown, you should use the helper class $(LOCK_LINK) to * lock/unlock mutexes. * * DSFML mutexes are recursive, which means that you can lock a mutex multiple * times in the same thread without creating a deadlock. In this case, the first * call to `lock()` behaves as usual, and the following ones have no effect. * However, you must call `unlock()` exactly as many times as you called * `lock()`. If you don't, the mutex won't be released. * * Note that the $(U Mutex) class is added for convenience, and is nothing more * than a simnple wrapper around the existing core.sync.mutex.Mutex class.) * * See_Also: * $(LOCK_LINK) */ module dsfml.system.mutex; import core = core.sync.mutex; /** * Blocks concurrent access to shared resources from multiple threads. */ class Mutex { private core.Mutex m_mutex; /// Default Constructor this() { m_mutex = new core.Mutex(); } /// Destructor ~this() { import dsfml.system.config; mixin(destructorOutput); } /** * Lock the mutex * * If the mutex is already locked in another thread, this call will block * the execution until the mutex is released. */ void lock() { m_mutex.lock(); } /// Unlock the mutex void unlock() { m_mutex.unlock(); } } unittest { version(DSFML_Unittest_System) { import dsfml.system.thread; import dsfml.system.sleep; import core.time; import std.stdio; auto mutex = new Mutex(); void secondThreadHello() { mutex.lock(); for(int i = 0; i < 10; ++i) { writeln("Hello from the second thread!"); } mutex.unlock(); } writeln("Unit test for Mutex class"); writeln(); writeln("Locking a mutex and then unlocking it later."); auto secondThread = new Thread(&secondThreadHello); secondThread.launch(); mutex.lock(); for(int i = 0; i < 10; ++i) { writeln("Hello from the main thread!"); } mutex.unlock(); sleep(seconds(1));//let's this unit test finish before moving on to the next one. writeln(); } }
D
module ast.loops; import ast.base, ast.scopes, ast.vardecl, ast.conditionals, ast.parse, ast.fun; import ast.iterator, ast.int_literal, ast.fold, ast.tuples, ast.tuple_access; // TODO: come up with a way to emit guards for a jump. this is necessary for continue/break to work correctly. interface Breakable { Stuple!(string, int) getContinueLabel(); Stuple!(string, int) getBreakLabel(); Statement[] getOutsideGuards(); // guards at the point of exit; ie. break Statement[] getInsideGuards(); // guards at the point of loop end; ie. continue } TLS!(Stuple!(Breakable, Function)) breakable_context; static this() { New(breakable_context); } template DefaultBreakableImpl() { string chosenContinueLabel, chosenBreakLabel; int continueDepth, breakDepth; Statement[] outsideGuards, insideGuards; override { Stuple!(string, int) getContinueLabel() { return stuple(chosenContinueLabel, continueDepth); } Stuple!(string, int) getBreakLabel() { return stuple(chosenBreakLabel, breakDepth); } Statement[] getOutsideGuards() { return outsideGuards; } Statement[] getInsideGuards() { return insideGuards; } } } class WhileStatement : Statement, Breakable { Scope _body; Cond cond; Scope sup; override WhileStatement dup() { auto res = new WhileStatement; res._body = _body.dup; res.cond = cond.dup; res.sup = sup; // goes upwards - don't dup! return res; } mixin defaultIterate!(cond, _body); mixin DefaultBreakableImpl!(); override { void emitAsm(AsmFile af) { auto start = af.genLabel(), done = af.genLabel(); continueDepth = breakDepth = af.currentStackDepth; chosenContinueLabel = start; chosenBreakLabel = done; af.emitLabel(start, !keepRegs, !isForward); cond.jumpOn(af, false, done); _body.emitAsm(af); // TODO: rerun cond? check complexity? af.jump(start); af.emitLabel(done, !keepRegs, isForward); } string toString() { return Format("while(", cond, ") { ", _body._body, "}"); } } } import ast.aggregate; Object gotWhileStmt(ref string text, ParseCb cont, ParseCb rest) { auto t2 = text; bool isStatic; if (t2.accept("static")) isStatic = true; bool forMode; if (!t2.accept("while")) { if (!t2.accept("for")) return null; forMode = true; assert(!isStatic); } auto ws = new WhileStatement; auto sc = new Scope; ws.outsideGuards = sc.getGuards(); sc.configPosition (t2); ws.sup = sc; namespace.set(sc); scope(exit) namespace.set(sc.sup); if (!rest(t2, "cond", &ws.cond)) { if (forMode) return null; t2.failparse("Couldn't parse while cond"); } configure(ws.cond); ws.insideGuards = sc.getGuards(); auto brbackup = *breakable_context.ptr(); *breakable_context.ptr() = stuple(fastcast!(Breakable)(ws), sc.get!(Function)); scope(exit) *breakable_context.ptr() = brbackup; if (isStatic) { auto aggr = fastcast!(AggrStatement)(sc._body); if (!aggr) fail(Format("Malformed static while: ", sc._body)); if (!fastcast!(VarDecl) (aggr.stmts[0])) fail(Format("Malformed static while (2): ", aggr.stmts)); aggr.stmts = null; // remove loop variable declaration/s auto backupfield = sc.field; Expr iter_expr; if (auto ilc = fastcast!(IterLetCond!(LValue)) (ws.cond)) iter_expr = ilc.iter; if (auto imc = fastcast!(IterLetCond!(MValue)) (ws.cond)) iter_expr = imc.iter; if (!iter_expr) fail("Could not interpret static-loop expression"); auto iter = fastcast!(RichIterator) (iter_expr.valueType()); if (!iter) fail("static-loop expression not an iteratr! "); auto len = fastcast!(IntExpr)~ foldex(iter.length(iter_expr)); // logln("foldex length is ", foldex(iter.length(iter_expr))); if (!len) fail("static-loop iterator length is not constant int! "); string t3; for (int i = 0; i < len.num; ++i) { auto ival = foldex(iter.index(iter_expr, mkInt(i))); string t4 = t2; sc.field = backupfield.dup; string name; foreach (entry; sc.field) if (entry._0.length) if (auto v = fastcast!(Variable) (entry._1)) { name = entry._0; break; } sc.field = [stuple(name, fastcast!(Object) (ival))]; sc.rebuildCache; pushCache; // same code is parsed multiple times - do not cache! scope(exit) popCache; Scope sc2; if (!rest(t4, "tree.scope", &sc2)) { t4.failparse("Couldn't parse during static-while expansion! "); } if (!t3) t3 = t4; else assert(t3 is t4); sc.field = backupfield; sc.addStatement(sc2); } t2 = t3; } else { if (!rest(t2, "tree.scope", &ws._body)) { if (forMode) return null; t2.failparse("Couldn't parse while body"); } sc.addStatement(ws); } text = t2; sc.rebuildCache; return sc; } mixin DefaultParser!(gotWhileStmt, "tree.stmt.while", "141"); import tools.log; class ForStatement : Statement, Breakable { Statement decl; Cond cond; Statement step; Scope _body; mixin DefaultDup!(); mixin DefaultBreakableImpl!(); mixin defaultIterate!(decl, cond, step, _body); override void emitAsm(AsmFile af) { auto backup = af.checkptStack(); scope(exit) af.restoreCheckptStack(backup); // logln("start depth is ", af.currentStackDepth); decl.emitAsm(af); continueDepth = breakDepth = af.currentStackDepth; auto start = af.genLabel(), done = af.genLabel(), cont = af.genLabel(); chosenContinueLabel = cont; chosenBreakLabel = done; af.emitLabel(start, !keepRegs, !isForward); cond.jumpOn(af, false, done); _body.emitAsm(af); af.emitLabel(cont, !keepRegs, isForward); step.emitAsm(af); af.jump(start); af.emitLabel(done, !keepRegs, isForward); } } import ast.namespace; Object gotForStmt(ref string text, ParseCb cont, ParseCb rest) { auto t2 = text; if (!t2.accept("(")) return null; auto fs = new ForStatement, check = namespace().getCheckpt(); auto sl = namespace().get!(ScopeLike); fs.outsideGuards = sl.getGuards(); if (rest(t2, "tree.stmt.vardecl", &fs.decl) && rest(t2, "cond", &fs.cond) && (configure(fs.cond), true) && t2.accept(";") && rest(t2, "tree.semicol_stmt", &fs.step) && t2.accept(")") ) { fs.insideGuards = sl.getGuards(); auto brbackup = *breakable_context.ptr(); *breakable_context.ptr() = stuple(fastcast!(Breakable)(fs), namespace().get!(Function)); scope(exit) *breakable_context.ptr() = brbackup; if (!rest(t2, "tree.scope", &fs._body)) t2.failparse("Failed to parse 'for' body"); text = t2; namespace().setCheckpt(check); return fs; } else t2.failparse("Failed to parse 'for' statement"); } mixin DefaultParser!(gotForStmt, "tree.stmt.for", "142", "for"); class DoWhileExt : Statement { Scope first, second; Cond cond; mixin DefaultDup!(); mixin defaultIterate!(first, second, cond); override void emitAsm(AsmFile af) { mixin(mustOffset("0")); first.needEntryLabel = true; auto fdg = first.open(af)(); // open and body auto atJump = af.checkptStack(); cond.jumpOn(af, false, first.exit()); second.emitAsm(af); fdg(true); // close before jump! variables must be cleaned up .. don't set the label though af.jump(first.entry()); af.restoreCheckptStack(atJump, true); fdg(); // close for real } } Object gotDoWhileExtStmt(ref string text, ParseCb cont, ParseCb rest) { auto t2 = text; auto dw = new DoWhileExt; auto sc = new Scope; sc.configPosition(t2); namespace.set(sc); scope(exit) namespace.set(sc.sup); if (!rest(t2, "tree.scope", &dw.first)) t2.failparse("Couldn't parse scope after do"); auto backup = namespace(); namespace.set(dw.first); scope(exit) namespace.set(backup); if (!t2.accept("while")) return null; // not a do/while extloop if (!rest(t2, "cond", &dw.cond)) t2.failparse("Could not match do/while cond"); configure(dw.cond); if (!rest(t2, "tree.scope", &dw.second)) t2.failparse("do/while extended second scope not matched"); text = t2; sc.addStatement(dw); return sc; } mixin DefaultParser!(gotDoWhileExtStmt, "tree.stmt.do_while_ext", "143", "do"); class ExecGuardsAndJump : Statement { Statement[] guards; int[] offsets; bool modeContinue; Breakable brk; mixin defaultIterate!(); mixin MyThis!("guards, offsets, modeContinue, brk"); override { ExecGuardsAndJump dup() { return this; // no mutable parts, no iteration } void emitAsm(AsmFile af) { auto depth = af.checkptStack(); // reset the stack so we can emit regular scope guards after us; // despite the utter pointlessness of cleaning up after an unconditional jump, // appearances must be honoured. // the optimizer can remove all that crud anyway. scope(success) af.restoreCheckptStack(depth, true); string targetlabel; int targetdepth; ptuple(targetlabel, targetdepth) = modeContinue?brk.getContinueLabel():brk.getBreakLabel(); foreach_reverse (i, stmt; guards) { auto delta = af.currentStackDepth - offsets[i]; if (delta) { af.restoreCheckptStack(offsets[i]); } // justification for dup see class ReturnStmt in ast.returns stmt.dup().emitAsm(af); } af.restoreCheckptStack(targetdepth); af.jump(targetlabel); } } } Object gotContinueOrBreak(bool gotContinue)(ref string text, ParseCb cont, ParseCb rest) { auto brc = *breakable_context.ptr(); auto fun = namespace().get!(Function); if (fun !is brc._1 || !brc._0) text.failparse("No continue-capable context found!"); auto sl = namespace().get!(ScopeLike); auto guards = sl.getGuards(); auto guards2 = gotContinue?brc._0.getInsideGuards():brc._0.getOutsideGuards(); if (guards2.length > guards.length) text.failparse("Invalid guard structure: ", guards, " vs. ", guards2); foreach (i, guard; guards2) if (guard !is guards2[i]) text.failparse("Invalid guard structure: ", guards, " vs. ", guards2, " at ", i); auto gos = sl.getGuardOffsets(); return new ExecGuardsAndJump(guards[guards2.length .. $], gos[guards2.length .. $], gotContinue, brc._0); } mixin DefaultParser!(gotContinueOrBreak!(true), "tree.semicol_stmt.continue", "341", "continue"); mixin DefaultParser!(gotContinueOrBreak!(false), "tree.semicol_stmt.break", "342", "break");
D
module irc.irc; public import irc.utils; public import irc.config; public import irc.events; import std.regex; import std.string; import irc.exceptions; /** * Primary class for interacting with an IRC server * Standards: Conforms to RFC 2812 * See_Also: <href>http://tools.ietf.org/html/rfc2812</href> * Authors: samrg472 */ public class IRCBot { private enum pattern = regex(`^(?:[:](\S+) )?(\S+)(?: (?!:)(.+?))?(?: [:](.+))?$`); @property public bool isConnected() { return connected && socket !is null; } @property public string nick() { return currentNick; } public { // Returning null signifies the event was already posted @property EventHandler!ReadyEvent readyEventHandler() { return _readyEventHandler; } @property EventHandler!RawEvent rawEventHandler() { return _rawEventHandler; } @property EventHandler!MessageEvent messageEventHandler() { return _messageEventHandler; } @property EventHandler!JoinChanEvent joinChanEventHandler() { return _joinChanEventHandler; } @property EventHandler!PartChanEvent partChanEventHandler() { return _partChanEventHandler; } @property EventHandler!KickEvent kickEventHandler() { return _kickEventHandler; } @property EventHandler!NickChangeEvent nickChangeEventHandler() { return _nickChangeEventHandler; } } private { IRCConfig config; // Socket data TcpSocket socket; char[] chars = null; bool connected = false; } private { // Events EventHandler!RawEvent _rawEventHandler; EventHandler!MessageEvent _messageEventHandler; EventHandler!ReadyEvent _readyEventHandler; EventHandler!JoinChanEvent _joinChanEventHandler; EventHandler!PartChanEvent _partChanEventHandler; EventHandler!KickEvent _kickEventHandler; EventHandler!NickChangeEvent _nickChangeEventHandler; } private { // NickServ char[] authNick = null; char[] authCommand = null; char[] authPassword = null; } private { // Cache Channel[string] channels; string currentNick; } /** * Constructs thie bot based on the configuration */ public this(IRCConfig config) { assert(config, "config parameter is null"); this.config = config; this.currentNick = config.nickname; _rawEventHandler = new BotEventHandler!RawEvent(this); _messageEventHandler = new BotEventHandler!MessageEvent(this); _readyEventHandler = new BotEventHandler!ReadyEvent(this, false); _joinChanEventHandler = new BotEventHandler!JoinChanEvent(this); _partChanEventHandler = new BotEventHandler!PartChanEvent(this); _kickEventHandler = new BotEventHandler!KickEvent(this); _nickChangeEventHandler = new BotEventHandler!NickChangeEvent(this); } /** * This should be called before the bot connects */ public void authenticateNick(char[] password, char[] authNick = "NickServ".dup, char[] command = "identify".dup) { if (isConnected) throw new IllegalStateException("Attempted to setup automated nick auth when the bot is already connected"); this.authPassword = password; this.authNick = authNick; this.authCommand = command; } public void connect(char[] serverPassword = null) { if (isConnected) return; socket = new TcpSocket(config.address); socket.blocking = false; connected = true; if (serverPassword) send(format("PASS %s", serverPassword)); send(format("USER %s 0 0: %s", config.username, config.realname)); send(format("NICK %s", config.nickname)); } public bool isInChannel(string chan) { return getChannel(chan) !is null; } public Channel getChannel(string chan) { return channels[chan]; } /** * Completely close the connection from the IRC server rendering the instance useless for further use * An optional quit message can be provided */ public void disconnect(string msg = "") { if (!isConnected) return; send(format("QUIT %s", msg)); socket.shutdown(SocketShutdown.BOTH); socket.close(); connected = false; destroy(socket); socket = null; destroy(_readyEventHandler); _readyEventHandler = new BotEventHandler!ReadyEvent(this, false); } /** * Joins the specified channel */ public void join(string channel) { send(format("JOIN %s", channel)); } /** * Parts the specified channel */ public void part(string channel) { send(format("PART %s", channel)); } /** * Processes all the bot events and read data. This *MUST* be used in your application main loop in * order for the bot to function properly. This can be offloaded into another thread to automatically * read all the data. * Examples: * ------------------- * while (loop()) {} * ------------------- * Returns: Whether the loop processing was successful; * if false, you are (most likely) disconnected from the server */ public bool loop() { if (!isConnected) throw new IllegalStateException("Attempted to process bot data in an unconnected state"); if (chars is null) chars = new char[0]; { char[] _char = new char[1]; long status = socket.receive(_char); // No data was returned from the receive queue if (status == -1) return true; // Connection closed from server else if (status == 0) return false; if (_char[0] != '\n') { chars ~= _char; return true; } } string line = chars.length ? chop(cast(string) chars) : null; chars = null; if (line) { auto m = line.match(IRCBot.pattern).captures; string[] s = new string[m.length]; for (int i = 0; i < m.length; i++) s[i] = m[i]; auto temp = s.idup; rawEventHandler.post(new RawEvent(this, line, temp)); handleLine(temp); } return line !is null; } /** * Send raw data to the IRC server */ public void send(immutable(char[]) data) { if (!isConnected) throw new IllegalStateException("Attempted to write from an unconnected bot"); if (data is null) throw new NullPointerException("data is null"); void[] buf = data.dup ~ "\r\n"; socket.send(buf); } private void handleLine(immutable(char[][]) captures) { string command = captures[2]; switch (command) { case "471": // ERR_CHANNELISFULL case "473": // ERR_INVITEONLYCHAN case "474": // ERR_BANNEDFROMCHAN case "475": // ERR_BADCHANNELKEY case "477": // ERR_NEEDREGGEDNICK channels[captures[3].split()[1]] = null; // TODO: Post an UnableToJoinChan event break; default: } switch (command) { case "PING": send("PONG " ~ captures[4]); break; case "PRIVMSG": messageEventHandler.post(new MessageEvent(this, captures[1], captures[3], captures[4])); break; case "376": // RPL_ENDMOTD if (readyEventHandler) { if (authNick && authCommand && authPassword) { send(format("PRIVMSG %s :%s %s", authNick, authCommand, authPassword)); authNick = authCommand = authPassword = null; } readyEventHandler.post(new ReadyEvent(this), true); // Unregister everything destroy(_readyEventHandler); _readyEventHandler = null; } break; case "JOIN": if ((new User(this, captures[1])).user == currentNick) channels[captures[3]] = new Channel(this, captures[3]); _joinChanEventHandler.post(new JoinChanEvent(this, captures[3], captures[1])); break; case "PART": if ((new User(this, captures[1])).user == currentNick) channels[captures[3]] = null; _partChanEventHandler.post(new PartChanEvent(this, captures[3], captures[1])); break; case "KICK": auto data = captures[3].split(); if (data[1] == currentNick) channels[data[0]] = null; _kickEventHandler.post(new KickEvent(this, captures[3], captures[1])); break; case "NICK": auto user = new User(this, captures[1]); if (user.user == currentNick) currentNick = captures[4]; auto builtHostMask = captures[4] ~ "!" ~ user.realname ~ "@" ~ user.hostmask; _nickChangeEventHandler.post(new NickChangeEvent(this, builtHostMask, user.user)); break; default: } } }
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_28_MobileMedia-2165393987.notation#_copSALmGEeKQQp7P9cQvNQ"/> </availablePage> </pageList> <sashModel currentSelection="//@sashModel/@windows.0/@children.0"> <windows> <children xsi:type="di:TabFolder"> <children> <emfPageIdentifier href="VAR_28_MobileMedia-2165393987.notation#_copSALmGEeKQQp7P9cQvNQ"/> </children> </children> </windows> </sashModel> </di:SashWindowsMngr>
D
/** * CodeView 4 symbolic debug info generation * * Compiler implementation of the * $(LINK2 http://www.dlang.org, D programming language). * * Copyright: Copyright (C) 1984-1995 by Symantec * Copyright (C) 2000-2021 by The D Language Foundation, All Rights Reserved * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/backend/dcgcv.d, backend/dcgcv.d) * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/backend/dcgcv.d */ module dmd.backend.dcgcv; version (SCPP) version = COMPILE; version (MARS) version = COMPILE; version (COMPILE) { import core.stdc.stdio; import core.stdc.stdlib; import core.stdc.string; import dmd.backend.cc; import dmd.backend.cdef; import dmd.backend.cgcv; import dmd.backend.code; import dmd.backend.code_x86; import dmd.backend.cv4; import dmd.backend.dlist; import dmd.backend.dvec; import dmd.backend.el; import dmd.backend.global; import dmd.backend.mem; import dmd.backend.obj; import dmd.backend.outbuf; import dmd.backend.symtab; import dmd.backend.ty; import dmd.backend.type; import dmd.backend.barray; version (SCPP) { import cpp; import msgs2; import parser; } version (MARS) { import dmd.backend.dvarstats; } extern (C++): nothrow: @safe: enum SYMDEB_TDB = false; @trusted extern (C) void TOOFFSET(void* p, targ_size_t value) { switch (_tysize[TYnptr]) { case 2: *cast(ushort*)p = cast(ushort)value; break; case 4: *cast(uint*) p = cast(uint) value; break; case 8: *cast(ulong*) p = cast(ulong) value; break; default: assert(0); } } extern __gshared char* ftdbname; // Convert from SFL visibilities to CV4 protections uint SFLtoATTR(uint sfl) { return 4 - ((sfl & SFLpmask) >> 5); } __gshared { /* Dynamic array of debtyp_t's */ private Barray!(debtyp_t*) debtyp; private vec_t debtypvec; // vector of used entries enum DEBTYPVECDIM = 16_001; //8009 //3001 // dimension of debtypvec (should be prime) enum DEBTYPHASHDIM = 1009; private uint[DEBTYPHASHDIM] debtyphash; private Outbuffer *reset_symbuf; // Keep pointers to reset symbols @trusted idx_t DEB_NULL() { return cgcv.deb_offset; } // index of null debug type record /* This limitation is because of 4K page sizes * in optlink/cv/cvhashes.asm */ enum CVIDMAX = (0xFF0-20); // the -20 is picked by trial and error enum LOCATsegrel = 0xC000; /* Unfortunately, the fixup stuff is different for EASY OMF and Microsoft */ enum EASY_LCFDoffset = (LOCATsegrel | 0x1404); enum EASY_LCFDpointer = (LOCATsegrel | 0x1800); enum LCFD32offset = (LOCATsegrel | 0x2404); enum LCFD32pointer = (LOCATsegrel | 0x2C00); enum LCFD16pointer = (LOCATsegrel | 0x0C00); version (MARS) extern Cgcv cgcv; // already declared in cgcv.d else Cgcv cgcv; } version (MARS) enum MARS = true; else enum MARS = false; /****************************************** * Return number of bytes consumed in OBJ file by a name. */ @trusted int cv_stringbytes(const(char)* name) { int len = cast(int)strlen(name); if (config.fulltypes == CV8) return len + 1; if (len > CVIDMAX) len = CVIDMAX; return len + ((len > 255) ? 4 : 1); } /****************************************** * Stuff a namestring into p. * Returns: * number of bytes consumed */ @trusted int cv_namestring(ubyte *p, const(char)* name, int length = -1) { size_t len = (length >= 0) ? length : strlen(name); if (config.fulltypes == CV8) { size_t numBytesWritten = len + ((length < 0) ? 1 : 0); memcpy(p, name, numBytesWritten); if(config.flags2 & CFG2gms) { for(int i = 0; i < len; i++) { if(p[i] == '.') p[i] = '@'; } } return cast(int)numBytesWritten; } if (len > 255) { p[0] = 0xFF; p[1] = 0; if (len > CVIDMAX) len = CVIDMAX; TOWORD(p + 2,cast(uint)len); memcpy(p + 4,name,len); len += 4; } else { p[0] = cast(ubyte)len; memcpy(p + 1,name,len); len++; } return cast(int)len; } /*********************************** * Compute debug register number for symbol s. * Returns: * 0..7 byte registers * 8..15 word registers * 16..23 dword registers */ @trusted private int cv_regnum(Symbol *s) { uint reg = s.Sreglsw; if (s.Sclass == SCpseudo) { version (SCPP) reg = pseudoreg[reg]; } else { assert(reg < 8); assert(s.Sfl == FLreg); switch (type_size(s.Stype)) { case LONGSIZE: case 3: reg += 8; goto case; case SHORTSIZE: reg += 8; goto case; case CHARSIZE: break; case LLONGSIZE: reg += (s.Sregmsw << 8) + (16 << 8) + 16; if (config.fulltypes == CV4) reg += (1 << 8); break; default: static if (0) { symbol_print(s); type_print(s.Stype); printf("size = %d\n",type_size(s.Stype)); } assert(0); } } if (config.fulltypes == CV4) reg++; return reg; } /*********************************** * Allocate a debtyp_t. */ @trusted debtyp_t * debtyp_alloc(uint length) { debtyp_t *d; uint pad = 0; //printf("len = %u, x%x\n", length, length); if (config.fulltypes == CV8) { // length+2 must lie on 4 byte boundary pad = ((length + 2 + 3) & ~3) - (length + 2); length += pad; } length < 0x10000 || assert(0); const len = debtyp_t.sizeof - (d.data).sizeof + length; debug { d = cast(debtyp_t *) mem_malloc(len /*+ 1*/); memset(d, 0xAA, len); // (cast(char*)d)[len] = 0x2E; } else { d = cast(debtyp_t *) malloc(debtyp_t.sizeof - (d.data).sizeof + length); } d.length = cast(ushort)length; if (pad) { __gshared const ubyte[3] padx = [0xF3, 0xF2, 0xF1]; memcpy(d.data.ptr + length - pad, padx.ptr + 3 - pad, pad); } //printf("debtyp_alloc(%d) = %p\n", length, d); return d; } /*********************************** * Free a debtyp_t. */ @trusted private void debtyp_free(debtyp_t *d) { //printf("debtyp_free(length = %d, %p)\n", d.length, d); //fflush(stdout); debug { assert(d.length < 0x10000); uint len = debtyp_t.sizeof - (d.data).sizeof + d.length; // assert((cast(char*)d)[len] == 0x2E); memset(d, 0x55, len); mem_free(d); } else { free(d); } } static if (0) { void debtyp_check(debtyp_t *d,int linnum) { int i; __gshared char c; //printf("linnum = %d\n",linnum); //printf(" length = %d\n",d.length); for (i = 0; i < d.length; i++) c = d.data.ptr[i]; } void debtyp_check(debtyp_t* d) { debtyp_check(d,__LINE__); } } else { void debtyp_check(debtyp_t* d) { } } /*********************************** * Search for debtyp_t in debtyp[]. If it is there, return the index * of it, and free d. Otherwise, add it. * Returns: * index in debtyp[] */ @trusted idx_t cv_debtyp(debtyp_t *d) { ushort length; uint hashi; assert(d); length = d.length; //printf("length = %3d\n",length); static if (SYMDEB_TDB) { if (config.fulltypes == CVTDB) { idx_t result; static if (1) { assert(length); debtyp_check(d); result = tdb_typidx(&d.length); } else { ubyte *buf; // Allocate buffer buf = malloc(6 + length); if (!buf) err_nomem(); // out of memory // Fill the buffer TOLONG(buf,cgcv.signature); memcpy(buf + 4,cast(char *)d + uint.sizeof,2 + length); static if (0) { {int i; for (i=0;i<length;i++) printf("%02x ",buf[6+i]); printf("\n"); } } result = tdb_typidx(buf,6 + length); } //printf("result = x%x\n",result); debtyp_free(d); return result; } } if (length) { uint hash; hash = length; if (length >= uint.sizeof) { // Hash consists of the sum of the first 4 bytes with the last 4 bytes union U { ubyte* cp; uint* up; } U un = void; un.cp = d.data.ptr; hash += *un.up; un.cp += length - uint.sizeof; hash += *un.up; } hashi = hash % DEBTYPHASHDIM; hash %= DEBTYPVECDIM; //printf(" hashi = %d", hashi); if (vec_testbit(hash,debtypvec)) { //printf(" test"); // Threaded list is much faster for (uint u = debtyphash[hashi]; u; u = debtyp[u].prev) //for (uint u = debtyp.length; u--; ) { if (length == debtyp[u].length && memcmp(d.data.ptr,debtyp[u].data.ptr,length) == 0) { debtyp_free(d); //printf(" match %d\n",u); return u + cgcv.deb_offset; } } } else vec_setbit(hash,debtypvec); } else hashi = 1; //printf(" add %d\n",debtyp.length); d.prev = debtyphash[hashi]; debtyphash[hashi] = cast(uint)debtyp.length; /* It's not already in the array, so add it */ debtyp.push(d); version (SCPP) { if (debtyp.length >= 0xE000) err_fatal(EM_2manytypes,0xE000); // too many types } return cast(uint)debtyp.length - 1 + cgcv.deb_offset; } @trusted idx_t cv_numdebtypes() { return cast(idx_t)debtyp.length; } /**************************** * Store a null record at DEB_NULL. */ @trusted void cv_init() { debtyp_t *d; //printf("cv_init()\n"); // Initialize statics debtyp.setLength(0); if (!ftdbname) ftdbname = cast(char *)"symc.tdb".ptr; memset(&cgcv,0,cgcv.sizeof); cgcv.sz_idx = 2; cgcv.LCFDoffset = LCFD32offset; cgcv.LCFDpointer = LCFD16pointer; debtypvec = vec_calloc(DEBTYPVECDIM); memset(debtyphash.ptr,0,debtyphash.sizeof); if (reset_symbuf) { Symbol **p = cast(Symbol **)reset_symbuf.buf; const size_t n = reset_symbuf.length() / (Symbol *).sizeof; for (size_t i = 0; i < n; ++i) symbol_reset(p[i]); reset_symbuf.reset(); } else { reset_symbuf = cast(Outbuffer*) calloc(1, Outbuffer.sizeof); assert(reset_symbuf); reset_symbuf.reserve(10 * (Symbol*).sizeof); } /* Reset for different OBJ file formats */ if (I32 || I64) { // Adjust values in old CV tables for 32 bit ints dttab[TYenum] = dttab[TYlong]; dttab[TYint] = dttab[TYlong]; dttab[TYuint] = dttab[TYulong]; // Adjust Codeview 4 values for 32 bit ints and 32 bit pointer offsets dttab4[TYenum] = 0x74; dttab4[TYint] = 0x74; dttab4[TYuint] = 0x75; if (I64) { dttab4[TYptr] = 0x600; dttab4[TYnptr] = 0x600; dttab4[TYsptr] = 0x600; dttab4[TYimmutPtr] = 0x600; dttab4[TYsharePtr] = 0x600; dttab4[TYrestrictPtr] = 0x600; dttab4[TYfgPtr] = 0x600; } else { dttab4[TYptr] = 0x400; dttab4[TYsptr] = 0x400; dttab4[TYnptr] = 0x400; dttab4[TYimmutPtr] = 0x400; dttab4[TYsharePtr] = 0x400; dttab4[TYrestrictPtr] = 0x400; dttab4[TYfgPtr] = 0x400; } dttab4[TYcptr] = 0x400; dttab4[TYfptr] = 0x500; if (config.flags & CFGeasyomf) { cgcv.LCFDoffset = EASY_LCFDoffset; cgcv.LCFDpointer = EASY_LCFDpointer; assert(config.fulltypes == CVOLD); } else cgcv.LCFDpointer = LCFD32pointer; if (config.exe & EX_flat) cgcv.FD_code = 0x10; } if (config.fulltypes >= CV4) { int flags; __gshared ushort[5] memmodel = [0,0x100,0x20,0x120,0x120]; char[1 + (VERSION).sizeof] version_; ubyte[8 + (version_).sizeof] debsym; // Put out signature indicating CV4 format switch (config.fulltypes) { case CV4: cgcv.signature = 1; break; case CV8: cgcv.signature = 4; break; default: { const(char)* x = "1MYS"; cgcv.signature = *cast(int *) x; break; } } cgcv.deb_offset = 0x1000; if (config.fulltypes == CV8) { cgcv.sz_idx = 4; return; // figure out rest later } if (config.fulltypes >= CVSYM) { cgcv.sz_idx = 4; if (!(config.flags2 & CFG2phgen)) cgcv.deb_offset = 0x80000000; } objmod.write_bytes(SegData[DEBSYM],4,&cgcv.signature); // Allocate an LF_ARGLIST with no arguments if (config.fulltypes == CV4) { d = debtyp_alloc(4); TOWORD(d.data.ptr,LF_ARGLIST); TOWORD(d.data.ptr + 2,0); } else { d = debtyp_alloc(6); TOWORD(d.data.ptr,LF_ARGLIST); TOLONG(d.data.ptr + 2,0); } // Put out S_COMPILE record TOWORD(debsym.ptr + 2,S_COMPILE); switch (config.target_cpu) { case TARGET_8086: debsym[4] = 0; break; case TARGET_80286: debsym[4] = 2; break; case TARGET_80386: debsym[4] = 3; break; case TARGET_80486: debsym[4] = 4; break; case TARGET_Pentium: case TARGET_PentiumMMX: debsym[4] = 5; break; case TARGET_PentiumPro: case TARGET_PentiumII: debsym[4] = 6; break; default: assert(0); } debsym[5] = (CPP != 0); // 0==C, 1==C++ flags = (config.inline8087) ? (0<<3) : (1<<3); if (I32) flags |= 0x80; // 32 bit addresses flags |= memmodel[config.memmodel]; TOWORD(debsym.ptr + 6,flags); version_[0] = 'Z'; strcpy(version_.ptr + 1,VERSION); cv_namestring(debsym.ptr + 8,version_.ptr); TOWORD(debsym.ptr,6 + (version_).sizeof); objmod.write_bytes(SegData[DEBSYM],8 + (version_).sizeof,debsym.ptr); static if (SYMDEB_TDB) { // Put out S_TDBNAME record if (config.fulltypes == CVTDB) { ubyte[50] buf = void; pstate.STtdbtimestamp = tdb_gettimestamp(); size_t len = cv_stringbytes(ftdbname); ubyte *ds = (8 + len <= buf.sizeof) ? buf : cast(ubyte *) malloc(8 + len); assert(ds); TOWORD(ds,6 + len); TOWORD(ds + 2,S_TDBNAME); TOLONG(ds + 4,pstate.STtdbtimestamp); cv_namestring(ds + 8,ftdbname); objmod.write_bytes(SegData[DEBSYM],8 + len,ds); if (ds != buf) free(ds); } } } else { assert(0); } if (config.fulltypes == CVTDB) cgcv.deb_offset = cv_debtyp(d); else cv_debtyp(d); } /////////////////////////// CodeView 4 /////////////////////////////// /*********************************** * Return number of bytes required to store a numeric leaf. */ uint cv4_numericbytes(uint value) { uint u; if (value < 0x8000) u = 2; else if (value < 0x10000) u = 4; else u = 6; return u; } /******************************** * Store numeric leaf. * Must use exact same number of bytes as cv4_numericbytes(). */ @trusted void cv4_storenumeric(ubyte *p, uint value) { if (value < 0x8000) TOWORD(p,value); else if (value < 0x10000) { TOWORD(p,LF_USHORT); p += 2; TOWORD(p,value); } else { TOWORD(p,LF_ULONG); *cast(targ_ulong *)(p + 2) = cast(uint) value; } } /*********************************** * Return number of bytes required to store a signed numeric leaf. * Params: * value = value to store * Returns: * number of bytes required for storing value */ uint cv4_signednumericbytes(int value) { uint u; if (value >= 0 && value < 0x8000) u = 2; else if (value == cast(short)value) u = 4; else u = 6; return u; } /******************************** * Store signed numeric leaf. * Must use exact same number of bytes as cv4_signednumericbytes(). * Params: * p = address where to store value * value = value to store */ @trusted void cv4_storesignednumeric(ubyte *p, int value) { if (value >= 0 && value < 0x8000) TOWORD(p, value); else if (value == cast(short)value) { TOWORD(p, LF_SHORT); TOWORD(p + 2, value); } else { TOWORD(p,LF_LONG); TOLONG(p + 2, value); } } /********************************* * Generate a type index for a parameter list. */ @trusted idx_t cv4_arglist(type *t,uint *pnparam) { uint u; uint nparam; idx_t paramidx; debtyp_t *d; param_t *p; // Compute nparam, number of parameters nparam = 0; for (p = t.Tparamtypes; p; p = p.Pnext) nparam++; *pnparam = nparam; // Construct an LF_ARGLIST of those parameters if (nparam == 0) { if (config.fulltypes == CV8) { d = debtyp_alloc(2 + 4 + 4); TOWORD(d.data.ptr,LF_ARGLIST_V2); TOLONG(d.data.ptr + 2,1); TOLONG(d.data.ptr + 6,0); paramidx = cv_debtyp(d); } else paramidx = DEB_NULL; } else { switch (config.fulltypes) { case CV8: d = debtyp_alloc(2 + 4 + nparam * 4); TOWORD(d.data.ptr,LF_ARGLIST_V2); TOLONG(d.data.ptr + 2,nparam); p = t.Tparamtypes; for (u = 0; u < nparam; u++) { TOLONG(d.data.ptr + 6 + u * 4,cv4_typidx(p.Ptype)); p = p.Pnext; } break; case CV4: d = debtyp_alloc(2 + 2 + nparam * 2); TOWORD(d.data.ptr,LF_ARGLIST); TOWORD(d.data.ptr + 2,nparam); p = t.Tparamtypes; for (u = 0; u < nparam; u++) { TOWORD(d.data.ptr + 4 + u * 2,cv4_typidx(p.Ptype)); p = p.Pnext; } break; default: d = debtyp_alloc(2 + 4 + nparam * 4); TOWORD(d.data.ptr,LF_ARGLIST); TOLONG(d.data.ptr + 2,nparam); p = t.Tparamtypes; for (u = 0; u < nparam; u++) { TOLONG(d.data.ptr + 6 + u * 4,cv4_typidx(p.Ptype)); p = p.Pnext; } break; } paramidx = cv_debtyp(d); } return paramidx; } /***************************** * Build LF_METHODLIST for overloaded member function. * Output: * *pcount # of entries in method list * Returns: * type index of method list * 0 don't do this one */ version (SCPP) { private int cv4_methodlist(Symbol *sf,int *pcount) { int count; int mlen; Symbol *s; debtyp_t *d; ubyte *p; ushort attribute; symbol_debug(sf); // First, compute how big the method list is count = 0; mlen = 2; for (s = sf; s; s = s.Sfunc.Foversym) { if (s.Sclass == SCtypedef || s.Sclass == SCfunctempl) continue; if (s.Sfunc.Fflags & Fnodebug) continue; if (s.Sfunc.Fflags & Fintro) mlen += 4; mlen += cgcv.sz_idx * 2; count++; } if (!count) return 0; // Allocate and fill it in d = debtyp_alloc(mlen); p = d.data.ptr; TOWORD(p,LF_METHODLIST); p += 2; for (s = sf; s; s = s.Sfunc.Foversym) { if (s.Sclass == SCtypedef || s.Sclass == SCfunctempl) continue; if (s.Sfunc.Fflags & Fnodebug) continue; attribute = cast(ushort)SFLtoATTR(s.Sflags); // Make sure no overlapping bits assert((Fvirtual | Fpure | Fintro | Fstatic) == (Fvirtual ^ Fpure ^ Fintro ^ Fstatic)); switch ((s.Sfunc.Fflags & (Fvirtual | Fstatic)) | (s.Sfunc.Fflags & (Fpure | Fintro))) { // BUG: should we have 0x0C, friend functions? case Fstatic: attribute |= 0x08; break; case Fvirtual: attribute |= 0x04; break; case Fvirtual | Fintro: attribute |= 0x10; break; case Fvirtual | Fpure: attribute |= 0x14; break; case Fvirtual | Fintro | Fpure: attribute |= 0x18; break; case 0: break; default: symbol_print(s); assert(0); } TOIDX(p,attribute); p += cgcv.sz_idx; TOIDX(p,cv4_symtypidx(s)); p += cgcv.sz_idx; if (s.Sfunc.Fflags & Fintro) { TOLONG(p,cpp_vtbloffset(cast(Classsym *)s.Sscope,s)); p += 4; } } assert(p - d.data.ptr == mlen); *pcount = count; return cv_debtyp(d); } } /********************************** * Pretty-print indentifier for CV4 types. */ version (SCPP) { private const(char)* cv4_prettyident(Symbol *s) { Symbol *stmp; stmp = s.Sscope; s.Sscope = null; // trick cpp_prettyident into leaving off :: const p = cpp_prettyident(s); s.Sscope = cast(Classsym *)stmp; return p; } } /**************************** * Return type index of struct. * Input: * s struct tag symbol * flags * 0 generate a reference to s * 1 just saw the definition of s * 2 saw key function for class s * 3 no longer have a key function for class s */ @trusted idx_t cv4_struct(Classsym *s,int flags) { targ_size_t size; debtyp_t* d,dt; uint len; uint nfields,fnamelen; idx_t typidx; type *t; struct_t *st; const(char)* id; version (SCPP) { baseclass_t *b; } uint numidx; uint leaf; uint property; uint attribute; ubyte *p; int refonly; int i; int count; // COUNT field in LF_CLASS symbol_debug(s); assert(config.fulltypes >= CV4); st = s.Sstruct; if (st.Sflags & STRanonymous) // if anonymous class/union return 0; //printf("cv4_struct(%s,%d)\n",s.Sident.ptr,flags); t = s.Stype; //printf("t = %p, Tflags = x%x\n", t, t.Tflags); type_debug(t); // Determine if we should do a reference or a definition refonly = 1; // assume reference only if (MARS || t.Tflags & TFsizeunknown || st.Sflags & STRoutdef) { //printf("ref only\n"); } else { // We have a definition that we have not put out yet switch (flags) { case 0: // reference to s version (SCPP) { if (!CPP || config.flags2 & (CFG2fulltypes | CFG2hdrdebug) || !(st.Sflags & STRvtblext)) refonly = 0; } else { refonly = 0; } break; case 1: // saw def of s if (!s.Stypidx) // if not forward referenced return 0; version (SCPP) { if (!CPP || config.flags2 & CFG2fulltypes || !(st.Sflags & STRvtblext)) refonly = 0; } break; version (SCPP) { case 2: // saw key func for s if (config.flags2 & CFG2fulltypes) return 0; refonly = 0; break; case 3: // no longer have key func for s if (!s.Stypidx || config.flags2 & CFG2fulltypes) return 0; refonly = 0; break; } default: assert(0); } } if (MARS || refonly) { if (s.Stypidx) // if reference already generated { //assert(s.Stypidx - cgcv.deb_offset < debtyp.length); return s.Stypidx; // use already existing reference } size = 0; property = 0x80; // class is forward referenced } else { size = type_size(t); st.Sflags |= STRoutdef; property = 0; } version (SCPP) { if (CPP) { if (s.Sscope) // if class is nested property |= 8; if (st.Sctor || st.Sdtor) property |= 2; // class has ctors and/or dtors if (st.Sopoverload) property |= 4; // class has overloaded operators if (st.Scastoverload) property |= 0x40; // class has casting methods if (st.Sopeq && !(st.Sopeq.Sfunc.Fflags & Fnodebug)) property |= 0x20; // class has overloaded assignment } } id = prettyident(s); if (config.fulltypes == CV4) { numidx = (st.Sflags & STRunion) ? 8 : 12; len = numidx + cv4_numericbytes(cast(uint)size); d = debtyp_alloc(len + cv_stringbytes(id)); cv4_storenumeric(d.data.ptr + numidx,cast(uint)size); } else { numidx = (st.Sflags & STRunion) ? 10 : 18; len = numidx + 4; d = debtyp_alloc(len + cv_stringbytes(id)); TOLONG(d.data.ptr + numidx,cast(uint)size); } len += cv_namestring(d.data.ptr + len,id); switch (s.Sclass) { case SCstruct: leaf = LF_STRUCTURE; if (st.Sflags & STRunion) { leaf = LF_UNION; break; } if (st.Sflags & STRclass) leaf = LF_CLASS; goto L1; L1: if (config.fulltypes == CV4) TOWORD(d.data.ptr + 8,0); // dList else TOLONG(d.data.ptr + 10,0); // dList if (CPP) { version (SCPP) { debtyp_t *vshape; ubyte descriptor; const n = list_nitems(st.Svirtual); if (n == 0) // if no virtual functions { if (config.fulltypes == CV4) TOWORD(d.data.ptr + 10,0); // vshape is 0 else TOLONG(d.data.ptr + 14,0); // vshape is 0 } else { vshape = debtyp_alloc(4 + (n + 1) / 2); TOWORD(vshape.data.ptr,LF_VTSHAPE); TOWORD(vshape.data.ptr + 2,1); uint n2 = 0; descriptor = 0; foreach (vl; ListRange(st.Svirtual)) { mptr_t *m; tym_t ty; m = list_mptr(vl); symbol_debug(m.MPf); ty = tybasic(m.MPf.ty()); assert(tyfunc(ty)); if (_tysize[TYint] == 4) descriptor |= 5; if (tyfarfunc(ty)) descriptor++; vshape.data.ptr[4 + n2 / 2] = descriptor; descriptor <<= 4; n2++; } if (config.fulltypes == CV4) TOWORD(d.data.ptr + 10,cv_debtyp(vshape)); // vshape else TOLONG(d.data.ptr + 14,cv_debtyp(vshape)); // vshape } } } else { if (config.fulltypes == CV4) TOWORD(d.data.ptr + 10,0); // vshape else TOLONG(d.data.ptr + 14,0); // vshape } break; default: symbol_print(s); assert(0); } TOWORD(d.data.ptr,leaf); // Assign a number to prevent infinite recursion if a struct member // references the same struct. if (config.fulltypes == CVTDB) { static if (SYMDEB_TDB) { TOWORD(d.data.ptr + 2,0); // number of fields TOLONG(d.data.ptr + 6,0); // field list is 0 TOWORD(d.data.ptr + 4,property | 0x80); // set fwd ref bit static if (0) { printf("fwd struct ref\n"); {int i; printf("len = %d, length = %d\n",len,d.length); for (i=0;i<d.length;i++) printf("%02x ",d.data.ptr[i]); printf("\n"); } } debtyp_check(d); s.Stypidx = tdb_typidx(&d.length); // forward reference it } } else { d.length = 0; // so cv_debtyp() will allocate new s.Stypidx = cv_debtyp(d); d.length = cast(ushort)len; // restore length } reset_symbuf.write((&s)[0 .. 1]); if (refonly) // if reference only { //printf("refonly\n"); TOWORD(d.data.ptr + 2,0); // count: number of fields is 0 if (config.fulltypes == CV4) { TOWORD(d.data.ptr + 4,0); // field list is 0 TOWORD(d.data.ptr + 6,property); } else { TOLONG(d.data.ptr + 6,0); // field list is 0 TOWORD(d.data.ptr + 4,property); } return s.Stypidx; } version (MARS) util_progress(); else file_progress(); // Compute the number of fields, and the length of the fieldlist record nfields = 0; fnamelen = 2; version (SCPP) { if (CPP) { // Base classes come first for (b = st.Sbase; b; b = b.BCnext) { if (b.BCflags & BCFvirtual) // skip virtual base classes continue; nfields++; fnamelen += ((config.fulltypes == CV4) ? 6 : 8) + cv4_numericbytes(b.BCoffset); } // Now virtual base classes (direct and indirect) for (b = st.Svirtbase; b; b = b.BCnext) { nfields++; fnamelen += ((config.fulltypes == CV4) ? 8 : 12) + cv4_numericbytes(st.Svbptr_off) + cv4_numericbytes(b.BCvbtbloff / _tysize[TYint]); } // Now friend classes i = list_nitems(st.Sfriendclass); nfields += i; fnamelen += i * ((config.fulltypes == CV4) ? 4 : 8); // Now friend functions foreach (sl; ListRange(st.Sfriendfuncs)) { Symbol *sf = list_symbol(sl); symbol_debug(sf); if (sf.Sclass == SCfunctempl) continue; nfields++; fnamelen += ((config.fulltypes == CV4) ? 4 : 6) + cv_stringbytes(cpp_unmangleident(sf.Sident.ptr)); } } } count = nfields; foreach (sl; ListRange(st.Sfldlst)) { Symbol *sf = list_symbol(sl); targ_size_t offset; symbol_debug(sf); const(char)* sfid = sf.Sident.ptr; switch (sf.Sclass) { case SCmember: case SCfield: if (CPP && sf == s.Sstruct.Svptr) fnamelen += ((config.fulltypes == CV4) ? 4 : 8); else { offset = sf.Smemoff; fnamelen += ((config.fulltypes == CV4) ? 6 : 8) + cv4_numericbytes(cast(uint)offset) + cv_stringbytes(sfid); } break; version (SCPP) { case SCstruct: if (sf.Sstruct.Sflags & STRanonymous) continue; if (sf.Sstruct.Sflags & STRnotagname) sfid = cpp_name_none.ptr; property |= 0x10; // class contains nested classes goto Lnest2; case SCenum: if (sf.Senum.SEflags & SENnotagname) sfid = cpp_name_none.ptr; goto Lnest2; case SCtypedef: Lnest2: fnamelen += ((config.fulltypes == CV4) ? 4 : 8) + cv_stringbytes(sfid); break; case SCextern: case SCcomdef: case SCglobal: case SCstatic: case SCinline: case SCsinline: case SCeinline: case SCcomdat: if (tyfunc(sf.ty())) { Symbol *so; int nfuncs; nfuncs = 0; for (so = sf; so; so = so.Sfunc.Foversym) { if (so.Sclass == SCtypedef || so.Sclass == SCfunctempl || so.Sfunc.Fflags & Fnodebug) // if compiler generated continue; // skip it nfuncs++; } if (nfuncs == 0) continue; if (nfuncs > 1) count += nfuncs - 1; sfid = cv4_prettyident(sf); } fnamelen += ((config.fulltypes == CV4) ? 6 : 8) + cv_stringbytes(sfid); break; } default: continue; } nfields++; count++; } TOWORD(d.data.ptr + 2,count); if (config.fulltypes == CV4) TOWORD(d.data.ptr + 6,property); else TOWORD(d.data.ptr + 4,property); // Generate fieldlist type record dt = debtyp_alloc(fnamelen); p = dt.data.ptr; TOWORD(p,LF_FIELDLIST); // And fill it in p += 2; version (SCPP) { if (CPP) { // Put out real base classes for (b = st.Sbase; b; b = b.BCnext) { targ_size_t offset; if (b.BCflags & BCFvirtual) // skip virtual base classes continue; offset = b.BCoffset; typidx = cv4_symtypidx(b.BCbase); attribute = (b.BCflags & BCFpmask); if (attribute & 4) attribute = 1; else attribute = 4 - attribute; TOWORD(p,LF_BCLASS); if (config.fulltypes == CV4) { TOWORD(p + 2,typidx); TOWORD(p + 4,attribute); p += 6; } else { TOLONG(p + 4,typidx); TOWORD(p + 2,attribute); p += 8; } cv4_storenumeric(p,offset); p += cv4_numericbytes(offset); } // Now direct followed by indirect virtual base classes i = LF_VBCLASS; do { for (b = st.Svirtbase; b; b = b.BCnext) { targ_size_t vbpoff,vboff; type *vbptype; // type of virtual base pointer idx_t vbpidx; if (baseclass_find(st.Sbase,b.BCbase)) // if direct vbase { if (i == LF_IVBCLASS) continue; } else { if (i == LF_VBCLASS) continue; } typidx = cv4_symtypidx(b.BCbase); vbptype = type_allocn(TYarray,tstypes[TYint]); vbptype.Tflags |= TFsizeunknown; vbptype = newpointer(vbptype); vbptype.Tcount++; vbpidx = cv4_typidx(vbptype); type_free(vbptype); attribute = (b.BCflags & BCFpmask); if (attribute & 4) attribute = 1; else attribute = 4 - attribute; vbpoff = st.Svbptr_off; vboff = b.BCvbtbloff / _tysize[TYint]; if (config.fulltypes == CV4) { TOWORD(p,i); TOWORD(p + 2,typidx); TOWORD(p + 4,vbpidx); TOWORD(p + 6,attribute); p += 8; } else { TOWORD(p,i); TOLONG(p + 4,typidx); // btype TOLONG(p + 8,vbpidx); // vbtype TOWORD(p + 2,attribute); p += 12; } cv4_storenumeric(p,vbpoff); p += cv4_numericbytes(vbpoff); cv4_storenumeric(p,vboff); p += cv4_numericbytes(vboff); } i ^= LF_VBCLASS ^ LF_IVBCLASS; // toggle between them } while (i != LF_VBCLASS); // Now friend classes foreach (sl; ListRange(s.Sstruct.Sfriendclass)) { Symbol *sf = list_symbol(sl); symbol_debug(sf); typidx = cv4_symtypidx(sf); if (config.fulltypes == CV4) { TOWORD(p,LF_FRIENDCLS); TOWORD(p + 2,typidx); p += 4; } else { TOLONG(p,LF_FRIENDCLS); TOLONG(p + 4,typidx); p += 8; } } // Now friend functions foreach (sl; ListRange(s.Sstruct.Sfriendfuncs)) { Symbol *sf = list_symbol(sl); symbol_debug(sf); if (sf.Sclass == SCfunctempl) continue; typidx = cv4_symtypidx(sf); TOWORD(p,LF_FRIENDFCN); if (config.fulltypes == CV4) { TOWORD(p + 2,typidx); p += 4; } else { TOLONG(p + 2,typidx); p += 6; } p += cv_namestring(p,cpp_unmangleident(sf.Sident.ptr)); } } } foreach (sl; ListRange(s.Sstruct.Sfldlst)) { Symbol *sf = list_symbol(sl); targ_size_t offset; symbol_debug(sf); const(char)* sfid = sf.Sident.ptr; switch (sf.Sclass) { case SCfield: { debtyp_t *db; if (config.fulltypes == CV4) { db = debtyp_alloc(6); TOWORD(db.data.ptr,LF_BITFIELD); db.data.ptr[2] = sf.Swidth; db.data.ptr[3] = sf.Sbit; TOWORD(db.data.ptr + 4,cv4_symtypidx(sf)); } else { db = debtyp_alloc(8); TOWORD(db.data.ptr,LF_BITFIELD); db.data.ptr[6] = sf.Swidth; db.data.ptr[7] = sf.Sbit; TOLONG(db.data.ptr + 2,cv4_symtypidx(sf)); } typidx = cv_debtyp(db); goto L3; } case SCmember: typidx = cv4_symtypidx(sf); L3: version (SCPP) { if (CPP && sf == s.Sstruct.Svptr) { if (config.fulltypes == CV4) { TOWORD(p,LF_VFUNCTAB); TOWORD(p + 2,typidx); p += 4; } else { TOLONG(p,LF_VFUNCTAB); // 0 fill 2 bytes TOLONG(p + 4,typidx); p += 8; } break; } } offset = sf.Smemoff; TOWORD(p,LF_MEMBER); version (SCPP) { attribute = CPP ? SFLtoATTR(sf.Sflags) : 0; assert((attribute & ~3) == 0); } else { attribute = 0; } if (config.fulltypes == CV4) { TOWORD(p + 2,typidx); TOWORD(p + 4,attribute); p += 6; } else { TOLONG(p + 4,typidx); TOWORD(p + 2,attribute); p += 8; } cv4_storenumeric(p,cast(uint)offset); p += cv4_numericbytes(cast(uint)offset); p += cv_namestring(p,sfid); break; version (SCPP) { case SCstruct: if (sf.Sstruct.Sflags & STRanonymous) continue; if (sf.Sstruct.Sflags & STRnotagname) sfid = cpp_name_none.ptr; goto Lnest; case SCenum: if (sf.Senum.SEflags & SENnotagname) sfid = cpp_name_none.ptr; goto Lnest; case SCtypedef: Lnest: TOWORD(p,LF_NESTTYPE); typidx = cv4_symtypidx(sf); if (config.fulltypes == CV4) { TOWORD(p + 2,typidx); p += 4; } else { TOLONG(p + 4,typidx); p += 8; } L2: p += cv_namestring(p,sfid); break; case SCextern: case SCcomdef: case SCglobal: case SCstatic: case SCinline: case SCsinline: case SCeinline: case SCcomdat: if (tyfunc(sf.ty())) { int count2; typidx = cv4_methodlist(sf,&count2); if (!typidx) break; sfid = cv4_prettyident(sf); TOWORD(p,LF_METHOD); TOWORD(p + 2,count2); p += 4; TOIDX(p,typidx); p += cgcv.sz_idx; goto L2; } else { TOWORD(p,LF_STMEMBER); typidx = cv4_symtypidx(sf); attribute = SFLtoATTR(sf.Sflags); if (config.fulltypes == CV4) { TOWORD(p + 2,typidx); TOWORD(p + 4,attribute); p += 6; } else { TOLONG(p + 4,typidx); TOWORD(p + 2,attribute); p += 8; } goto L2; } break; } default: continue; } } //printf("fnamelen = %d, p-dt.data = %d\n",fnamelen,p-dt.data); assert(p - dt.data.ptr == fnamelen); if (config.fulltypes == CV4) TOWORD(d.data.ptr + 4,cv_debtyp(dt)); else TOLONG(d.data.ptr + 6,cv_debtyp(dt)); static if (SYMDEB_TDB) { if (config.fulltypes == CVTDB) { s.Stypidx = cv_debtyp(d); reset_symbuf.write(&s, (s).sizeof); } } version (SCPP) { if (CPP) { symbol_debug(s); if (st.Sflags & STRglobal) list_prepend(&cgcv.list,s); else cv4_outsym(s); } } return s.Stypidx; } /**************************** * Return type index of enum. */ version (SCPP) { @trusted private uint cv4_enum(Symbol *s) { debtyp_t* d,dt; uint nfields,fnamelen; uint len; type *t; type *tbase; uint property; uint attribute; int i; char *id; symbol_debug(s); if (s.Stypidx) // if already converted { //assert(s.Stypidx - cgcv.deb_offset < debtyp.length); return s.Stypidx; } //printf("cv4_enum(%s)\n",s.Sident.ptr); t = s.Stype; type_debug(t); tbase = t.Tnext; property = 0; if (s.Senum.SEflags & SENforward) property |= 0x80; // enum is forward referenced id = s.Sident.ptr; if (s.Senum.SEflags & SENnotagname) id = cpp_name_none.ptr; if (config.fulltypes == CV4) { len = 10; d = debtyp_alloc(len + cv_stringbytes(id)); TOWORD(d.data.ptr,LF_ENUM); TOWORD(d.data.ptr + 4,cv4_typidx(tbase)); TOWORD(d.data.ptr + 8,property); } else { len = 14; d = debtyp_alloc(len + cv_stringbytes(id)); TOWORD(d.data.ptr,LF_ENUM); TOLONG(d.data.ptr + 6,cv4_typidx(tbase)); TOWORD(d.data.ptr + 4,property); } len += cv_namestring(d.data.ptr + len,id); // Assign a number to prevent infinite recursion if an enum member // references the same enum. if (config.fulltypes == CVTDB) { static if (SYMDEB_TDB) { debtyp_t *df; TOWORD(d.data.ptr + 2,0); TOWORD(d.data.ptr + 6,0); debtyp_check(d); s.Stypidx = tdb_typidx(&d.length); // forward reference it } } else { d.length = 0; // so cv_debtyp() will allocate new s.Stypidx = cv_debtyp(d); d.length = cast(ushort)len; // restore length } reset_symbuf.write((&s)[0 .. 1]); // Compute the number of fields, and the length of the fieldlist record nfields = 0; fnamelen = 2; foreach (sl; ListRange(s.Senum.SEenumlist)) { Symbol *sf = list_symbol(sl); uint value; symbol_debug(sf); value = cast(uint)el_tolongt(sf.Svalue); nfields++; fnamelen += 4 + cv4_numericbytes(value) + cv_stringbytes(sf.Sident.ptr); } TOWORD(d.data.ptr + 2,nfields); // If forward reference, then field list is 0 if (s.Senum.SEflags & SENforward) { TOWORD(d.data.ptr + 6,0); return s.Stypidx; } // Generate fieldlist type record dt = debtyp_alloc(fnamelen); TOWORD(dt.data.ptr,LF_FIELDLIST); // And fill it in i = 2; foreach (sl; ListRange(s.Senum.SEenumlist)) { Symbol *sf = list_symbol(sl); uint value; symbol_debug(sf); value = cast(uint)el_tolongt(sf.Svalue); TOWORD(dt.data.ptr + i,LF_ENUMERATE); attribute = SFLtoATTR(sf.Sflags); TOWORD(dt.data.ptr + i + 2,attribute); cv4_storenumeric(dt.data.ptr + i + 4,value); i += 4 + cv4_numericbytes(value); i += cv_namestring(dt.data.ptr + i,sf.Sident.ptr); // If enum is not a member of a class, output enum members as constants if (!isclassmember(s)) { symbol_debug(sf); cv4_outsym(sf); } } assert(i == fnamelen); if (config.fulltypes == CV4) TOWORD(d.data.ptr + 6,cv_debtyp(dt)); else TOLONG(d.data.ptr + 10,cv_debtyp(dt)); symbol_debug(s); if (CPP) cv4_outsym(s); return s.Stypidx; } } else { @trusted private uint cv4_fwdenum(type* t) { Symbol* s = t.Ttag; // write a forward reference enum record that is enough for the linker to // fold with original definition from EnumDeclaration uint bty = dttab4[tybasic(t.Tnext.Tty)]; const id = prettyident(s); uint len = config.fulltypes == CV8 ? 14 : 10; debtyp_t* d = debtyp_alloc(len + cv_stringbytes(id)); switch (config.fulltypes) { case CV8: TOWORD(d.data.ptr, LF_ENUM_V3); TOLONG(d.data.ptr + 2, 0); // count TOWORD(d.data.ptr + 4, 0x80); // property : forward reference TOLONG(d.data.ptr + 6, bty); // memtype TOLONG(d.data.ptr + 10, 0); // fieldlist break; case CV4: TOWORD(d.data.ptr,LF_ENUM); TOWORD(d.data.ptr + 2, 0); // count TOWORD(d.data.ptr + 4, bty); // memtype TOLONG(d.data.ptr + 6, 0); // fieldlist TOWORD(d.data.ptr + 8, 0x80); // property : forward reference break; default: assert(0); } cv_namestring(d.data.ptr + len, id); s.Stypidx = cv_debtyp(d); return s.Stypidx; } } /************************************************ * Return 'calling convention' type of function. */ ubyte cv4_callconv(type *t) { ubyte call; switch (tybasic(t.Tty)) { case TYffunc: call = 1; break; case TYfpfunc: call = 3; break; case TYf16func: call = 3; break; case TYfsfunc: call = 8; break; case TYnsysfunc: call = 9; break; case TYfsysfunc: call = 10; break; case TYnfunc: call = 0; break; case TYnpfunc: call = 2; break; case TYnsfunc: call = 7; break; case TYifunc: call = 1; break; case TYjfunc: call = 2; break; case TYmfunc: call = 11; break; // this call default: assert(0); } return call; } /********************************************** * Return type index for the type of a symbol. */ version (MARS) { private uint cv4_symtypidx(Symbol *s) { return cv4_typidx(s.Stype); } } version (SCPP) { @trusted private uint cv4_symtypidx(Symbol *s) { type *t; debtyp_t *d; ubyte *p; if (!CPP) return cv4_typidx(s.Stype); symbol_debug(s); if (isclassmember(s)) { t = s.Stype; if (tyfunc(t.Tty)) { param_t *pa; uint nparam; idx_t paramidx; idx_t thisidx; uint u; func_t *f; ubyte call; // It's a member function, which gets a special type record f = s.Sfunc; if (f.Fflags & Fstatic) thisidx = dttab4[TYvoid]; else { type *tthis = cpp_thistype(s.Stype,cast(Classsym *)s.Sscope); thisidx = cv4_typidx(tthis); type_free(tthis); } paramidx = cv4_arglist(t,&nparam); call = cv4_callconv(t); if (config.fulltypes == CV4) { d = debtyp_alloc(18); p = d.data.ptr; TOWORD(p,LF_MFUNCTION); TOWORD(p + 2,cv4_typidx(t.Tnext)); TOWORD(p + 4,cv4_symtypidx(s.Sscope)); TOWORD(p + 6,thisidx); p[8] = call; p[9] = 0; // reserved TOWORD(p + 10,nparam); TOWORD(p + 12,paramidx); TOLONG(p + 14,0); // thisadjust } else { d = debtyp_alloc(26); p = d.data.ptr; TOWORD(p,LF_MFUNCTION); TOLONG(p + 2,cv4_typidx(t.Tnext)); TOLONG(p + 6,cv4_symtypidx(s.Sscope)); TOLONG(p + 10,thisidx); p[14] = call; p[15] = 0; // reserved TOWORD(p + 16,nparam); TOLONG(p + 18,paramidx); TOLONG(p + 22,0); // thisadjust } return cv_debtyp(d); } } return cv4_typidx(s.Stype); } } /*********************************** * Return CV4 type index for a type. */ @trusted uint cv4_typidx(type *t) { uint typidx; uint u; uint next; uint key; debtyp_t *d; targ_size_t size; tym_t tym; tym_t tycv; tym_t tymnext; type *tv; uint dt; uint attribute; ubyte call; //printf("cv4_typidx(%p)\n",t); if (!t) return dttab4[TYint]; // assume int type_debug(t); next = cv4_typidx(t.Tnext); tycv = t.Tty; tym = tybasic(tycv); tycv &= mTYconst | mTYvolatile | mTYimmutable; attribute = 0; L1: dt = dttab4[tym]; switch (tym) { case TYllong: if (t.Tnext) goto Ldelegate; assert(dt); typidx = dt; break; case TYullong: if (t.Tnext) goto Ldarray; assert(dt); typidx = dt; break; case TYvoid: case TYnoreturn: case TYchar: case TYschar: case TYuchar: case TYchar16: case TYshort: case TYushort: case TYint: case TYuint: case TYulong: case TYlong: case TYfloat: case TYdouble: case TYdouble_alias: case TYldouble: case TYifloat: case TYidouble: case TYildouble: case TYcfloat: case TYcdouble: case TYcldouble: case TYbool: case TYwchar_t: case TYdchar: assert(dt); typidx = dt; break; case TYnptr: case TYimmutPtr: case TYsharePtr: case TYrestrictPtr: version (MARS) { if (t.Tkey) goto Laarray; } goto Lptr; case TYsptr: case TYcptr: case TYfgPtr: Lptr: attribute |= I32 ? 10 : 0; goto L2; case TYfptr: case TYvptr: attribute |= I32 ? 11 : 1; goto L2; case TYhptr: attribute |= 2; goto L2; L2: if (config.fulltypes == CV4) { // This is a hack to duplicate bugs in VC, so that the VC // debugger will work. tymnext = t.Tnext ? t.Tnext.Tty : TYint; if (tymnext & (mTYconst | mTYimmutable | mTYvolatile) && !tycv && tyarithmetic(tymnext) && !(attribute & 0xE0) ) { typidx = dt | dttab4[tybasic(tymnext)]; break; } } if ((next & 0xFF00) == 0 && !(attribute & 0xE0)) typidx = next | dt; else { if (tycv & (mTYconst | mTYimmutable)) attribute |= 0x400; if (tycv & mTYvolatile) attribute |= 0x200; tycv = 0; switch (config.fulltypes) { case CV4: d = debtyp_alloc(6); TOWORD(d.data.ptr,LF_POINTER); TOWORD(d.data.ptr + 2,attribute); TOWORD(d.data.ptr + 4,next); break; case CV8: d = debtyp_alloc(10); TOWORD(d.data.ptr,0x1002); TOLONG(d.data.ptr + 2,next); // see https://github.com/Microsoft/microsoft-pdb/blob/master/include/cvinfo.h#L1514 // add size and pointer type (PTR_64 or PTR_NEAR32) attribute |= (I64 ? (8 << 13) | 0xC : (4 << 13) | 0xA); // convert reference to r-value reference to remove & from type display in debugger if (attribute & 0x20) attribute |= 0x80; TOLONG(d.data.ptr + 6,attribute); break; default: d = debtyp_alloc(10); TOWORD(d.data.ptr,LF_POINTER); TOLONG(d.data.ptr + 2,attribute); TOLONG(d.data.ptr + 6,next); break; } typidx = cv_debtyp(d); } break; Ldarray: switch (config.fulltypes) { version (MARS) { case CV8: { typidx = cv8_darray(t, next); break; } } case CV4: static if (1) { d = debtyp_alloc(12); TOWORD(d.data.ptr, LF_OEM); TOWORD(d.data.ptr + 2, OEM); TOWORD(d.data.ptr + 4, 1); // 1 = dynamic array TOWORD(d.data.ptr + 6, 2); // count of type indices to follow TOWORD(d.data.ptr + 8, 0x12); // index type, T_LONG TOWORD(d.data.ptr + 10, next); // element type } else { d = debtyp_alloc(6); TOWORD(d.data.ptr,LF_DYN_ARRAY); TOWORD(d.data.ptr + 2, 0x12); // T_LONG TOWORD(d.data.ptr + 4, next); } typidx = cv_debtyp(d); break; default: assert(0); } break; Laarray: version (MARS) { key = cv4_typidx(t.Tkey); switch (config.fulltypes) { case CV8: typidx = cv8_daarray(t, key, next); break; case CV4: static if (1) { d = debtyp_alloc(12); TOWORD(d.data.ptr, LF_OEM); TOWORD(d.data.ptr + 2, OEM); TOWORD(d.data.ptr + 4, 2); // 2 = associative array TOWORD(d.data.ptr + 6, 2); // count of type indices to follow TOWORD(d.data.ptr + 8, key); // key type TOWORD(d.data.ptr + 10, next); // element type } else { d = debtyp_alloc(6); TOWORD(d.data.ptr,LF_ASSOC_ARRAY); TOWORD(d.data.ptr + 2, key); // key type TOWORD(d.data.ptr + 4, next); // element type } typidx = cv_debtyp(d); break; default: assert(0); } } break; Ldelegate: switch (config.fulltypes) { version (MARS) { case CV8: typidx = cv8_ddelegate(t, next); break; } case CV4: tv = type_fake(TYnptr); tv.Tcount++; key = cv4_typidx(tv); type_free(tv); static if (1) { d = debtyp_alloc(12); TOWORD(d.data.ptr, LF_OEM); TOWORD(d.data.ptr + 2, OEM); TOWORD(d.data.ptr + 4, 3); // 3 = delegate TOWORD(d.data.ptr + 6, 2); // count of type indices to follow TOWORD(d.data.ptr + 8, key); // type of 'this', which is void* TOWORD(d.data.ptr + 10, next); // function type } else { d = debtyp_alloc(6); TOWORD(d.data.ptr,LF_DELEGATE); TOWORD(d.data.ptr + 2, key); // type of 'this', which is void* TOWORD(d.data.ptr + 4, next); // function type } typidx = cv_debtyp(d); break; default: assert(0); } break; case TYcent: if (t.Tnext) goto Ldelegate; assert(dt); typidx = dt; break; case TYucent: if (t.Tnext) goto Ldarray; assert(dt); typidx = dt; break; case TYarray: { if (t.Tflags & TFsizeunknown) size = 0; // don't complain if don't know size else size = type_size(t); Larray: u = cv4_numericbytes(cast(uint)size); uint idxtype = I32 ? 0x12 : 0x11; // T_LONG : T_SHORT if (I64) idxtype = 0x23; // T_UQUAD if(next == dttab4[TYvoid]) // do not encode void[n], this confuses the debugger next = dttab4[TYuchar]; // use ubyte instead switch (config.fulltypes) { case CV8: d = debtyp_alloc(10 + u + 1); TOWORD(d.data.ptr,0x1503); TOLONG(d.data.ptr + 2,next); TOLONG(d.data.ptr + 6,idxtype); d.data.ptr[10 + u] = 0; // no name cv4_storenumeric(d.data.ptr + 10,cast(uint)size); break; case CV4: d = debtyp_alloc(6 + u + 1); TOWORD(d.data.ptr,LF_ARRAY); TOWORD(d.data.ptr + 2,next); TOWORD(d.data.ptr + 4,idxtype); d.data.ptr[6 + u] = 0; // no name cv4_storenumeric(d.data.ptr + 6,cast(uint)size); break; default: d = debtyp_alloc(10 + u + 1); TOWORD(d.data.ptr,LF_ARRAY); TOLONG(d.data.ptr + 2,next); TOLONG(d.data.ptr + 6,idxtype); d.data.ptr[10 + u] = 0; // no name cv4_storenumeric(d.data.ptr + 10,cast(uint)size); break; } typidx = cv_debtyp(d); break; } case TYffunc: case TYfpfunc: case TYf16func: case TYfsfunc: case TYnsysfunc: case TYfsysfunc: case TYnfunc: case TYnpfunc: case TYnsfunc: case TYmfunc: case TYjfunc: case TYifunc: { param_t *p; uint nparam; idx_t paramidx; call = cv4_callconv(t); paramidx = cv4_arglist(t,&nparam); // Construct an LF_PROCEDURE switch (config.fulltypes) { case CV8: d = debtyp_alloc(2 + 4 + 1 + 1 + 2 + 4); TOWORD(d.data.ptr,LF_PROCEDURE_V2); TOLONG(d.data.ptr + 2,next); // return type d.data.ptr[6] = call; d.data.ptr[7] = 0; // reserved TOWORD(d.data.ptr + 8,nparam); TOLONG(d.data.ptr + 10,paramidx); break; case CV4: d = debtyp_alloc(2 + 2 + 1 + 1 + 2 + 2); TOWORD(d.data.ptr,LF_PROCEDURE); TOWORD(d.data.ptr + 2,next); // return type d.data.ptr[4] = call; d.data.ptr[5] = 0; // reserved TOWORD(d.data.ptr + 6,nparam); TOWORD(d.data.ptr + 8,paramidx); break; default: d = debtyp_alloc(2 + 4 + 1 + 1 + 2 + 4); TOWORD(d.data.ptr,LF_PROCEDURE); TOLONG(d.data.ptr + 2,next); // return type d.data.ptr[6] = call; d.data.ptr[7] = 0; // reserved TOWORD(d.data.ptr + 8,nparam); TOLONG(d.data.ptr + 10,paramidx); break; } typidx = cv_debtyp(d); break; } case TYstruct: { if (config.fulltypes == CV8) { version (MARS) { typidx = cv8_fwdref(t.Ttag); } } else { int foo = t.Ttag.Stypidx; typidx = cv4_struct(t.Ttag,0); //printf("struct '%s' %x %x\n", t.Ttag.Sident.ptr, foo, typidx); } break; } case TYenum: if (CPP) { version (SCPP) { typidx = cv4_enum(t.Ttag); } } else typidx = cv4_fwdenum(t); break; version (SCPP) { case TYvtshape: { uint count; ubyte *p; ubyte descriptor; count = 1 + list_nitems(t.Ttag.Sstruct.Svirtual); d = debtyp_alloc(4 + ((count + 1) >> 1)); p = d.data.ptr; TOWORD(p,LF_VTSHAPE); TOWORD(p + 2,count); descriptor = I32 ? 0x55 : (LARGECODE ? 0x11 : 0); memset(p + 4,descriptor,(count + 1) >> 1); typidx = cv_debtyp(d); break; } case TYref: case TYnref: case TYfref: attribute |= 0x20; // indicate reference pointer goto case; case TYmemptr: tym = tybasic(tym_conv(t)); // convert to C data type goto L1; // and try again } version (MARS) { case TYref: case TYnref: attribute |= 0x20; // indicate reference pointer tym = TYnptr; // convert to C data type goto L1; // and try again } case TYnullptr: tym = TYnptr; next = cv4_typidx(tstypes[TYvoid]); // rewrite as void* t = tspvoid; goto L1; // vector types case TYfloat4: size = 16; next = dttab4[TYfloat]; goto Larray; case TYdouble2: size = 16; next = dttab4[TYdouble]; goto Larray; case TYschar16: size = 16; next = dttab4[TYschar]; goto Larray; case TYuchar16: size = 16; next = dttab4[TYuchar]; goto Larray; case TYshort8: size = 16; next = dttab4[TYshort]; goto Larray; case TYushort8: size = 16; next = dttab4[TYushort]; goto Larray; case TYlong4: size = 16; next = dttab4[TYlong]; goto Larray; case TYulong4: size = 16; next = dttab4[TYulong]; goto Larray; case TYllong2: size = 16; next = dttab4[TYllong]; goto Larray; case TYullong2: size = 16; next = dttab4[TYullong]; goto Larray; case TYfloat8: size = 32; next = dttab4[TYfloat]; goto Larray; case TYdouble4: size = 32; next = dttab4[TYdouble]; goto Larray; case TYschar32: size = 32; next = dttab4[TYschar]; goto Larray; case TYuchar32: size = 32; next = dttab4[TYuchar]; goto Larray; case TYshort16: size = 32; next = dttab4[TYshort]; goto Larray; case TYushort16: size = 32; next = dttab4[TYushort]; goto Larray; case TYlong8: size = 32; next = dttab4[TYlong]; goto Larray; case TYulong8: size = 32; next = dttab4[TYulong]; goto Larray; case TYllong4: size = 32; next = dttab4[TYllong]; goto Larray; case TYullong4: size = 32; next = dttab4[TYullong]; goto Larray; case TYfloat16: size = 64; next = dttab4[TYfloat]; goto Larray; case TYdouble8: size = 64; next = dttab4[TYdouble]; goto Larray; case TYschar64: size = 64; next = dttab4[TYschar]; goto Larray; case TYuchar64: size = 64; next = dttab4[TYuchar]; goto Larray; case TYshort32: size = 64; next = dttab4[TYshort]; goto Larray; case TYushort32: size = 64; next = dttab4[TYushort]; goto Larray; case TYlong16: size = 64; next = dttab4[TYlong]; goto Larray; case TYulong16: size = 64; next = dttab4[TYulong]; goto Larray; case TYllong8: size = 64; next = dttab4[TYllong]; goto Larray; case TYullong8: size = 64; next = dttab4[TYullong]; goto Larray; default: debug WRTYxx(tym); assert(0); } // Add in const and/or volatile modifiers if (tycv & (mTYconst | mTYimmutable | mTYvolatile)) { uint modifier; modifier = (tycv & (mTYconst | mTYimmutable)) ? 1 : 0; modifier |= (tycv & mTYvolatile) ? 2 : 0; switch (config.fulltypes) { case CV8: d = debtyp_alloc(8); TOWORD(d.data.ptr,0x1001); TOLONG(d.data.ptr + 2,typidx); TOWORD(d.data.ptr + 6,modifier); break; case CV4: d = debtyp_alloc(6); TOWORD(d.data.ptr,LF_MODIFIER); TOWORD(d.data.ptr + 2,modifier); TOWORD(d.data.ptr + 4,typidx); break; default: d = debtyp_alloc(10); TOWORD(d.data.ptr,LF_MODIFIER); TOLONG(d.data.ptr + 2,modifier); TOLONG(d.data.ptr + 6,typidx); break; } typidx = cv_debtyp(d); } assert(typidx); return typidx; } /****************************************** * Write out symbol s. */ @trusted private void cv4_outsym(Symbol *s) { uint len; type *t; uint length; uint u; tym_t tym; const(char)* id; ubyte *debsym = null; ubyte[64] buf = void; //printf("cv4_outsym(%s)\n",s.Sident.ptr); symbol_debug(s); version (MARS) { if (s.Sflags & SFLnodebug) return; } t = s.Stype; type_debug(t); tym = tybasic(t.Tty); if (tyfunc(tym) && s.Sclass != SCtypedef) { int framedatum,targetdatum,fd; char idfree; idx_t typidx; if (s != funcsym_p) return; version (SCPP) { if (CPP && isclassmember(s)) // if method { Outbuffer buf2; param_tostring(&buf2,s.Stype); buf2.prependBytes(cpp_prettyident(s)); char* s2 = buf2.toString(); const len2 = strlen(s2); id = cast(char*)alloca(len2 + 1); assert(id); memcpy(cast(void*)id, s2, len2 + 1); } else { id = prettyident(s); } } else { id = s.prettyIdent ? s.prettyIdent : s.Sident.ptr; } len = cv_stringbytes(id); // Length of record length = 2 + 2 + 4 * 3 + _tysize[TYint] * 4 + 2 + cgcv.sz_idx + 1; debsym = (length + len <= (buf).sizeof) ? buf.ptr : cast(ubyte *) malloc(length + len); assert(debsym); memset(debsym,0,length + len); // Symbol type u = (s.Sclass == SCstatic) ? S_LPROC16 : S_GPROC16; if (I32) u += S_GPROC32 - S_GPROC16; TOWORD(debsym + 2,u); if (config.fulltypes == CV4) { // Offsets if (I32) { TOLONG(debsym + 16,cast(uint)s.Ssize); // proc length TOLONG(debsym + 20,cast(uint)startoffset); // debug start TOLONG(debsym + 24,cast(uint)retoffset); // debug end u = 28; // offset to fixup } else { TOWORD(debsym + 16,cast(uint)s.Ssize); // proc length TOWORD(debsym + 18,cast(uint)startoffset); // debug start TOWORD(debsym + 20,cast(uint)retoffset); // debug end u = 22; // offset to fixup } length += cv_namestring(debsym + u + _tysize[TYint] + 2 + cgcv.sz_idx + 1,id); typidx = cv4_symtypidx(s); TOIDX(debsym + u + _tysize[TYint] + 2,typidx); // proc type debsym[u + _tysize[TYint] + 2 + cgcv.sz_idx] = tyfarfunc(tym) ? 4 : 0; TOWORD(debsym,length - 2); } else { // Offsets if (I32) { TOLONG(debsym + 16 + cgcv.sz_idx,cast(uint)s.Ssize); // proc length TOLONG(debsym + 20 + cgcv.sz_idx,cast(uint)startoffset); // debug start TOLONG(debsym + 24 + cgcv.sz_idx,cast(uint)retoffset); // debug end u = 28; // offset to fixup } else { TOWORD(debsym + 16 + cgcv.sz_idx,cast(uint)s.Ssize); // proc length TOWORD(debsym + 18 + cgcv.sz_idx,cast(uint)startoffset); // debug start TOWORD(debsym + 20 + cgcv.sz_idx,cast(uint)retoffset); // debug end u = 22; // offset to fixup } u += cgcv.sz_idx; length += cv_namestring(debsym + u + _tysize[TYint] + 2 + 1,id); typidx = cv4_symtypidx(s); TOIDX(debsym + 16,typidx); // proc type debsym[u + _tysize[TYint] + 2] = tyfarfunc(tym) ? 4 : 0; TOWORD(debsym,length - 2); } uint soffset = cast(uint)Offset(DEBSYM); objmod.write_bytes(SegData[DEBSYM],length,debsym); // Put out fixup for function start offset objmod.reftoident(DEBSYM,soffset + u,s,0,CFseg | CFoff); } else { targ_size_t base; int reg; uint fd; uint idx1,idx2; uint value; uint fixoff; idx_t typidx; typidx = cv4_typidx(t); version (MARS) { id = s.prettyIdent ? s.prettyIdent : prettyident(s); } else { id = prettyident(s); } len = cast(uint)strlen(id); debsym = (39 + IDOHD + len <= (buf).sizeof) ? buf.ptr : cast(ubyte *) malloc(39 + IDOHD + len); assert(debsym); switch (s.Sclass) { case SCparameter: case SCregpar: if (s.Sfl == FLreg) { s.Sfl = FLpara; cv4_outsym(s); s.Sfl = FLreg; goto case_register; } base = Para.size - BPoff; // cancel out add of BPoff goto L1; case SCauto: if (s.Sfl == FLreg) goto case_register; case_auto: base = Auto.size; L1: if (s.Sscope) // local variables moved into the closure cannot be emitted directly goto Lret; TOWORD(debsym + 2,I32 ? S_BPREL32 : S_BPREL16); if (config.fulltypes == CV4) { TOOFFSET(debsym + 4,s.Soffset + base + BPoff); TOIDX(debsym + 4 + _tysize[TYint],typidx); } else { TOOFFSET(debsym + 4 + cgcv.sz_idx,s.Soffset + base + BPoff); TOIDX(debsym + 4,typidx); } length = 2 + 2 + _tysize[TYint] + cgcv.sz_idx; length += cv_namestring(debsym + length,id); TOWORD(debsym,length - 2); break; case SCbprel: base = -BPoff; goto L1; case SCfastpar: if (s.Sfl != FLreg) { base = Fast.size; goto L1; } goto case_register; case SCregister: if (s.Sfl != FLreg) goto case_auto; goto case_register; case SCpseudo: case_register: TOWORD(debsym + 2,S_REGISTER); reg = cv_regnum(s); TOIDX(debsym + 4,typidx); TOWORD(debsym + 4 + cgcv.sz_idx,reg); length = 2 * 3 + cgcv.sz_idx; length += 1 + cv_namestring(debsym + length,id); TOWORD(debsym,length - 2); break; case SCextern: case SCcomdef: // Common blocks have a non-zero Sxtrnnum and an UNKNOWN seg if (!(s.Sxtrnnum && s.Sseg == UNKNOWN)) // if it's not really a common block { goto Lret; } goto case; case SCglobal: case SCcomdat: u = S_GDATA16; goto L2; case SCstatic: case SClocstat: u = S_LDATA16; L2: if (I32) u += S_GDATA32 - S_GDATA16; TOWORD(debsym + 2,u); if (config.fulltypes == CV4) { fixoff = 4; length = 2 + 2 + _tysize[TYint] + 2; TOOFFSET(debsym + fixoff,s.Soffset); TOWORD(debsym + fixoff + _tysize[TYint],0); TOIDX(debsym + length,typidx); } else { fixoff = 8; length = 2 + 2 + _tysize[TYint] + 2; TOOFFSET(debsym + fixoff,s.Soffset); TOWORD(debsym + fixoff + _tysize[TYint],0); // segment TOIDX(debsym + 4,typidx); } length += cgcv.sz_idx; length += cv_namestring(debsym + length,id); TOWORD(debsym,length - 2); assert(length <= 40 + len); if (s.Sseg == UNKNOWN || s.Sclass == SCcomdat) // if common block { if (config.exe & EX_flat) { fd = 0x16; idx1 = DGROUPIDX; idx2 = s.Sxtrnnum; } else { fd = 0x26; idx1 = idx2 = s.Sxtrnnum; } } else if (s.ty() & (mTYfar | mTYcs)) { fd = 0x04; idx1 = idx2 = SegData[s.Sseg].segidx; } else { fd = 0x14; idx1 = DGROUPIDX; idx2 = SegData[s.Sseg].segidx; } /* Because of the linker limitations, the length cannot * exceed 0x1000. * See optlink\cv\cvhashes.asm */ assert(length <= 0x1000); if (idx2 != 0) { uint offset = cast(uint)Offset(DEBSYM); objmod.write_bytes(SegData[DEBSYM],length,debsym); objmod.write_long(DEBSYM,offset + fixoff,cast(uint)s.Soffset, cgcv.LCFDpointer + fd,idx1,idx2); } goto Lret; static if (1) { case SCtypedef: s.Stypidx = typidx; reset_symbuf.write((&s)[0 .. 1]); goto L4; case SCstruct: if (s.Sstruct.Sflags & STRnotagname) goto Lret; goto L4; case SCenum: version (SCPP) { if (CPP && s.Senum.SEflags & SENnotagname) goto Lret; } L4: // Output a 'user-defined type' for the tag name TOWORD(debsym + 2,S_UDT); TOIDX(debsym + 4,typidx); length = 2 + 2 + cgcv.sz_idx; length += cv_namestring(debsym + length,id); TOWORD(debsym,length - 2); list_subtract(&cgcv.list,s); break; case SCconst: // The only constants are enum members value = cast(uint)el_tolongt(s.Svalue); TOWORD(debsym + 2,S_CONST); TOIDX(debsym + 4,typidx); length = 4 + cgcv.sz_idx; cv4_storenumeric(debsym + length,value); length += cv4_numericbytes(value); length += cv_namestring(debsym + length,id); TOWORD(debsym,length - 2); break; } default: goto Lret; } assert(length <= 40 + len); objmod.write_bytes(SegData[DEBSYM],length,debsym); } Lret: if (debsym != buf.ptr) free(debsym); } /****************************************** * Write out any deferred symbols. */ @trusted private void cv_outlist() { while (cgcv.list) cv_outsym(cast(Symbol *) list_pop(&cgcv.list)); } /****************************************** * Write out symbol table for current function. */ @trusted private void cv4_func(Funcsym *s, ref symtab_t symtab) { int endarg; cv4_outsym(s); // put out function symbol version (MARS) { __gshared Funcsym* sfunc; __gshared int cntOpenBlocks; sfunc = s; cntOpenBlocks = 0; struct cv4 { nothrow: // record for CV record S_BLOCK32 struct block32_data { ushort len; ushort id; uint pParent; uint pEnd; uint length; uint offset; ushort seg; ubyte[2] name; } extern (C++): static void endArgs() { __gshared ushort[2] endargs = [ 2, S_ENDARG ]; objmod.write_bytes(SegData[DEBSYM],(endargs).sizeof,endargs.ptr); } static void beginBlock(int offset, int length) { if (++cntOpenBlocks >= 255) return; // optlink does not like more than 255 scope blocks uint soffset = cast(uint)Offset(DEBSYM); // parent and end to be filled by linker block32_data block32 = { (block32_data).sizeof - 2, S_BLOCK32, 0, 0, length, 0, 0, [ 0, '\0' ] }; objmod.write_bytes(SegData[DEBSYM], (block32).sizeof, &block32); size_t offOffset = cast(char*)&block32.offset - cast(char*)&block32; objmod.reftoident(DEBSYM, soffset + offOffset, sfunc, offset + sfunc.Soffset, CFseg | CFoff); } static void endBlock() { if (cntOpenBlocks-- >= 255) return; // optlink does not like more than 255 scope blocks __gshared ushort[2] endargs = [ 2, S_END ]; objmod.write_bytes(SegData[DEBSYM],(endargs).sizeof,endargs.ptr); } } varStats_writeSymbolTable(symtab, &cv4_outsym, &cv4.endArgs, &cv4.beginBlock, &cv4.endBlock); } else { // Put out local symbols endarg = 0; foreach (sa; symtab[]) { //printf("symtab[%d] = %p\n",si,symtab[si]); cv4_outsym(sa); } } // Put out function return record if (1) { ubyte[2+2+2+1+1+4] sreturn = void; ushort flags; ubyte style; tym_t ty; tym_t tyret; uint u; u = 2+2+1; ty = tybasic(s.ty()); flags = tyrevfunc(ty) ? 0 : 1; flags |= typfunc(ty) ? 0 : 2; TOWORD(sreturn.ptr + 4,flags); tyret = tybasic(s.Stype.Tnext.Tty); switch (tyret) { case TYvoid: default: style = 0; break; case TYbool: case TYchar: case TYschar: case TYuchar: sreturn[7] = 1; sreturn[8] = 1; // AL goto L1; case TYwchar_t: case TYchar16: case TYshort: case TYushort: goto case_ax; case TYint: case TYuint: case TYsptr: case TYcptr: case TYnullptr: case TYnptr: case TYnref: if (I32) goto case_eax; else goto case_ax; case TYfloat: case TYifloat: if (config.exe & EX_flat) goto case_st0; goto case; case TYlong: case TYulong: case TYdchar: if (I32) goto case_eax; else goto case_dxax; case TYfptr: case TYhptr: if (I32) goto case_edxeax; else goto case_dxax; case TYvptr: if (I32) goto case_edxebx; else goto case_dxbx; case TYdouble: case TYidouble: case TYdouble_alias: if (config.exe & EX_flat) goto case_st0; if (I32) goto case_edxeax; else goto case_axbxcxdx; case TYllong: case TYullong: assert(I32); goto case_edxeax; case TYldouble: case TYildouble: goto case_st0; case TYcfloat: case TYcdouble: case TYcldouble: goto case_st01; case_ax: sreturn[7] = 1; sreturn[8] = 9; // AX goto L1; case_eax: sreturn[7] = 1; sreturn[8] = 17; // EAX goto L1; case_dxax: sreturn[7] = 2; sreturn[8] = 11; // DX sreturn[9] = 9; // AX goto L1; case_dxbx: sreturn[7] = 2; sreturn[8] = 11; // DX sreturn[9] = 12; // BX goto L1; case_axbxcxdx: sreturn[7] = 4; sreturn[8] = 9; // AX sreturn[9] = 12; // BX sreturn[10] = 10; // CX sreturn[11] = 11; // DX goto L1; case_edxeax: sreturn[7] = 2; sreturn[8] = 19; // EDX sreturn[9] = 17; // EAX goto L1; case_edxebx: sreturn[7] = 2; sreturn[8] = 19; // EDX sreturn[9] = 20; // EBX goto L1; case_st0: sreturn[7] = 1; sreturn[8] = 128; // ST0 goto L1; case_st01: sreturn[7] = 2; sreturn[8] = 128; // ST0 (imaginary) sreturn[9] = 129; // ST1 (real) goto L1; L1: style = 1; u += sreturn[7] + 1; break; } sreturn[6] = style; TOWORD(sreturn.ptr,u); TOWORD(sreturn.ptr + 2,S_RETURN); objmod.write_bytes(SegData[DEBSYM],u + 2,sreturn.ptr); } // Put out end scope { __gshared ushort[2] endproc = [ 2,S_END ]; objmod.write_bytes(SegData[DEBSYM],(endproc).sizeof,endproc.ptr); } cv_outlist(); } ////////////////////////////////////////////////////////// /****************************************** * Write out data to .OBJ file. */ @trusted void cv_term() { //printf("cv_term(): debtyp.length = %d\n",debtyp.length); segidx_t typeseg = objmod.seg_debugT(); switch (config.fulltypes) { case CV4: case CVSYM: cv_outlist(); goto case; case CV8: objmod.write_bytes(SegData[typeseg],4,&cgcv.signature); if (debtyp.length != 1 || config.fulltypes == CV8) { for (uint u = 0; u < debtyp.length; u++) { debtyp_t *d = debtyp[u]; objmod.write_bytes(SegData[typeseg],2 + d.length,cast(char *)d + uint.sizeof); debtyp_free(d); } } else if (debtyp.length) { debtyp_free(debtyp[0]); } break; static if (SYMDEB_TDB) { case CVTDB: cv_outlist(); static if (1) { tdb_term(); } else { { ubyte *buf; ubyte *p; size_t len; // Calculate size of buffer len = 4; for (uint u = 0; u < debtyp.length; u++) { debtyp_t *d = debtyp[u]; len += 2 + d.length; } // Allocate buffer buf = malloc(len); if (!buf) err_nomem(); // out of memory // Fill the buffer TOLONG(buf,cgcv.signature); p = buf + 4; for (uint u = 0; u < debtyp.length; u++) { debtyp_t *d = debtyp[u]; len = 2 + d.length; memcpy(p,cast(char *)d + uint.sizeof,len); p += len; } tdb_write(buf,len,debtyp.length); } } break; } default: assert(0); } // debtyp.dtor(); // save for later vec_free(debtypvec); debtypvec = null; } /****************************************** * Write out symbol table for current function. */ @trusted void cv_func(Funcsym *s) { version (SCPP) { if (errcnt) // if we had any errors return; // don't bother putting stuff in .OBJ file } //printf("cv_func('%s')\n",s.Sident.ptr); version (MARS) { if (s.Sflags & SFLnodebug) return; } else { if (CPP && s.Sfunc.Fflags & Fnodebug) // if don't generate debug info return; } switch (config.fulltypes) { case CV4: case CVSYM: case CVTDB: cv4_func(s, globsym); break; default: assert(0); } } /****************************************** * Write out symbol table for current function. */ @trusted void cv_outsym(Symbol *s) { //printf("cv_outsym('%s')\n",s.Sident.ptr); symbol_debug(s); version (MARS) { if (s.Sflags & SFLnodebug) return; } switch (config.fulltypes) { case CV4: case CVSYM: case CVTDB: cv4_outsym(s); break; version (MARS) { case CV8: cv8_outsym(s); break; } default: assert(0); } } /****************************************** * Return cv type index for a type. */ @trusted uint cv_typidx(type *t) { uint ti; //printf("cv_typidx(%p)\n",t); switch (config.fulltypes) { case CV4: case CVTDB: case CVSYM: case CV8: ti = cv4_typidx(t); break; default: debug printf("fulltypes = %d\n",config.fulltypes); assert(0); } return ti; } }
D
/Users/sanshitsagar/Desktop/RustOS/target/x86_64-blog_os/debug/deps/rlibc-056c24a6fc68b2a1.rmeta: /Users/sanshitsagar/.cargo/registry/src/github.com-1ecc6299db9ec823/rlibc-1.0.0/src/lib.rs /Users/sanshitsagar/Desktop/RustOS/target/x86_64-blog_os/debug/deps/librlibc-056c24a6fc68b2a1.rlib: /Users/sanshitsagar/.cargo/registry/src/github.com-1ecc6299db9ec823/rlibc-1.0.0/src/lib.rs /Users/sanshitsagar/Desktop/RustOS/target/x86_64-blog_os/debug/deps/rlibc-056c24a6fc68b2a1.d: /Users/sanshitsagar/.cargo/registry/src/github.com-1ecc6299db9ec823/rlibc-1.0.0/src/lib.rs /Users/sanshitsagar/.cargo/registry/src/github.com-1ecc6299db9ec823/rlibc-1.0.0/src/lib.rs:
D
module os.windows; version (Windows){public import rt.core.os.windows;} else{ static assert(0);} // Windows only
D
/Users/endotsuyoshi/Documents/ios/shoanaorigin2/shoana/Build/Intermediates/Charts.build/Debug/Charts.build/Objects-normal/x86_64/HorizontalBarChartView.o : /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/LineScatterCandleRadarRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Utils/TransformerHorizontalBarChart.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Charts/CombinedChartView.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Charts/LineChartView.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/RadarChartRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Interfaces/ICandleChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Components/AxisBase.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Jobs/MoveViewJob.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Jobs/AnimatedMoveViewJob.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Highlight/ChartHighlighter.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Interfaces/LineChartDataProvider.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Components/MarkerImage.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Interfaces/ILineChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Interfaces/IPieChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Utils/Transformer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/LineChartData.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Highlight/IHighlighter.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Components/Description.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Highlight/RadarHighlighter.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/ScatterChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Interfaces/IBarLineScatterCandleBubbleChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Components/YAxis.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/CandleChartDataEntry.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Highlight/PieRadarHighlighter.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Interfaces/IBubbleChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Formatters/DefaultAxisValueFormatter.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/PieChartDataEntry.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Utils/ViewPortHandler.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Formatters/IFillFormatter.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Charts/RadarChartView.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/BubbleChartData.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Animation/ChartAnimationEasing.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/ScatterChartData.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/ChartDataEntryBase.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Formatters/IValueFormatter.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Interfaces/IRadarChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Components/MarkerView.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/RadarChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/Scatter/ChevronDownShapeRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Charts/ScatterChartView.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Components/Legend.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/BarLineScatterCandleBubbleChartData.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/BubbleChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/BarChartDataEntry.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Charts/CandleStickChartView.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/Scatter/XShapeRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/Scatter/ChevronUpShapeRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Components/XAxis.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/ChartDataEntry.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/ChartDataRendererBase.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Interfaces/ScatterChartDataProvider.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Charts/PieChartView.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Components/ChartLimitLine.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/Scatter/CircleShapeRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/ChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Animation/Animator.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/Renderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Formatters/DefaultFillFormatter.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/HorizontalBarChartRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/XAxisRendererHorizontalBarChart.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/ChartBaseDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Charts/BubbleChartView.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/YAxisRendererHorizontalBarChart.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/Scatter/IShapeRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/Scatter/TriangleShapeRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Interfaces/CandleChartDataProvider.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Utils/ChartUtils.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/YAxisRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/LineScatterCandleRadarChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/XAxisRendererRadarChart.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Charts/BarLineChartViewBase.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/CandleStickChartRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Charts/ChartViewBase.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Components/IMarker.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/YAxisRendererRadarChart.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Interfaces/IChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Interfaces/BarChartDataProvider.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/BarChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/BarChartRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Interfaces/IBarChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/BarLineScatterCandleBubbleChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Highlight/Highlight.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Interfaces/IScatterChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Interfaces/BarLineScatterCandleBubbleChartDataProvider.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/CombinedChartRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Interfaces/ChartDataProvider.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Charts/HorizontalBarChartView.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Formatters/IAxisValueFormatter.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Highlight/BarHighlighter.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Jobs/ZoomViewJob.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/RadarChartData.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Highlight/CombinedHighlighter.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Charts/PieRadarChartViewBase.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Highlight/PieHighlighter.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/LineRadarRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Components/LegendEntry.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/PieChartData.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Utils/ChartColorTemplates.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/Scatter/SquareShapeRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/CandleChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/PieChartRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Interfaces/ILineScatterCandleRadarChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Jobs/AnimatedViewPortJob.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/PieChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/CombinedChartData.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Formatters/IndexAxisValueFormatter.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/LineChartRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Utils/Platform.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Interfaces/ILineRadarChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Filters/DataApproximator.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/LineChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Charts/BarChartView.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Formatters/DefaultValueFormatter.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Jobs/ViewPortJob.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Utils/Fill.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/BarChartData.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Interfaces/BubbleChartDataProvider.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/BubbleChartRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/ScatterChartRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/RadarChartDataEntry.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/XAxisRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/CandleChartData.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/LegendRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/Scatter/CrossShapeRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Highlight/Range.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/AxisRendererBase.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Highlight/HorizontalBarHighlighter.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/LineRadarChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/BarLineScatterCandleBubbleRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Components/ComponentBase.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Interfaces/CombinedChartDataProvider.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/ChartData.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Jobs/AnimatedZoomViewJob.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/BubbleChartDataEntry.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreText.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/XPC.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Metal.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreData.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/AppKit.apinotesc /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Supporting\ Files/Charts.h /Users/endotsuyoshi/Documents/ios/shoanaorigin2/shoana/Build/Intermediates/Charts.build/Debug/Charts.build/unextended-module.modulemap /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/Dispatch.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/CoreGraphics.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/AppKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreData.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/XPC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/QuickLook.apinotesc /Users/endotsuyoshi/Documents/ios/shoanaorigin2/shoana/Build/Intermediates/Charts.build/Debug/Charts.build/Objects-normal/x86_64/HorizontalBarChartView~partial.swiftmodule : /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/LineScatterCandleRadarRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Utils/TransformerHorizontalBarChart.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Charts/CombinedChartView.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Charts/LineChartView.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/RadarChartRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Interfaces/ICandleChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Components/AxisBase.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Jobs/MoveViewJob.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Jobs/AnimatedMoveViewJob.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Highlight/ChartHighlighter.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Interfaces/LineChartDataProvider.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Components/MarkerImage.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Interfaces/ILineChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Interfaces/IPieChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Utils/Transformer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/LineChartData.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Highlight/IHighlighter.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Components/Description.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Highlight/RadarHighlighter.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/ScatterChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Interfaces/IBarLineScatterCandleBubbleChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Components/YAxis.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/CandleChartDataEntry.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Highlight/PieRadarHighlighter.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Interfaces/IBubbleChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Formatters/DefaultAxisValueFormatter.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/PieChartDataEntry.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Utils/ViewPortHandler.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Formatters/IFillFormatter.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Charts/RadarChartView.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/BubbleChartData.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Animation/ChartAnimationEasing.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/ScatterChartData.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/ChartDataEntryBase.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Formatters/IValueFormatter.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Interfaces/IRadarChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Components/MarkerView.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/RadarChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/Scatter/ChevronDownShapeRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Charts/ScatterChartView.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Components/Legend.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/BarLineScatterCandleBubbleChartData.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/BubbleChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/BarChartDataEntry.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Charts/CandleStickChartView.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/Scatter/XShapeRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/Scatter/ChevronUpShapeRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Components/XAxis.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/ChartDataEntry.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/ChartDataRendererBase.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Interfaces/ScatterChartDataProvider.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Charts/PieChartView.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Components/ChartLimitLine.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/Scatter/CircleShapeRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/ChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Animation/Animator.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/Renderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Formatters/DefaultFillFormatter.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/HorizontalBarChartRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/XAxisRendererHorizontalBarChart.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/ChartBaseDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Charts/BubbleChartView.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/YAxisRendererHorizontalBarChart.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/Scatter/IShapeRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/Scatter/TriangleShapeRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Interfaces/CandleChartDataProvider.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Utils/ChartUtils.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/YAxisRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/LineScatterCandleRadarChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/XAxisRendererRadarChart.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Charts/BarLineChartViewBase.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/CandleStickChartRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Charts/ChartViewBase.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Components/IMarker.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/YAxisRendererRadarChart.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Interfaces/IChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Interfaces/BarChartDataProvider.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/BarChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/BarChartRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Interfaces/IBarChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/BarLineScatterCandleBubbleChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Highlight/Highlight.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Interfaces/IScatterChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Interfaces/BarLineScatterCandleBubbleChartDataProvider.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/CombinedChartRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Interfaces/ChartDataProvider.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Charts/HorizontalBarChartView.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Formatters/IAxisValueFormatter.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Highlight/BarHighlighter.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Jobs/ZoomViewJob.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/RadarChartData.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Highlight/CombinedHighlighter.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Charts/PieRadarChartViewBase.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Highlight/PieHighlighter.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/LineRadarRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Components/LegendEntry.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/PieChartData.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Utils/ChartColorTemplates.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/Scatter/SquareShapeRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/CandleChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/PieChartRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Interfaces/ILineScatterCandleRadarChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Jobs/AnimatedViewPortJob.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/PieChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/CombinedChartData.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Formatters/IndexAxisValueFormatter.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/LineChartRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Utils/Platform.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Interfaces/ILineRadarChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Filters/DataApproximator.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/LineChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Charts/BarChartView.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Formatters/DefaultValueFormatter.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Jobs/ViewPortJob.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Utils/Fill.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/BarChartData.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Interfaces/BubbleChartDataProvider.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/BubbleChartRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/ScatterChartRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/RadarChartDataEntry.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/XAxisRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/CandleChartData.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/LegendRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/Scatter/CrossShapeRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Highlight/Range.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/AxisRendererBase.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Highlight/HorizontalBarHighlighter.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/LineRadarChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/BarLineScatterCandleBubbleRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Components/ComponentBase.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Interfaces/CombinedChartDataProvider.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/ChartData.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Jobs/AnimatedZoomViewJob.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/BubbleChartDataEntry.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreText.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/XPC.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Metal.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreData.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/AppKit.apinotesc /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Supporting\ Files/Charts.h /Users/endotsuyoshi/Documents/ios/shoanaorigin2/shoana/Build/Intermediates/Charts.build/Debug/Charts.build/unextended-module.modulemap /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/Dispatch.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/CoreGraphics.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/AppKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreData.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/XPC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/QuickLook.apinotesc /Users/endotsuyoshi/Documents/ios/shoanaorigin2/shoana/Build/Intermediates/Charts.build/Debug/Charts.build/Objects-normal/x86_64/HorizontalBarChartView~partial.swiftdoc : /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/LineScatterCandleRadarRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Utils/TransformerHorizontalBarChart.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Charts/CombinedChartView.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Charts/LineChartView.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/RadarChartRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Interfaces/ICandleChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Components/AxisBase.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Jobs/MoveViewJob.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Jobs/AnimatedMoveViewJob.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Highlight/ChartHighlighter.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Interfaces/LineChartDataProvider.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Components/MarkerImage.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Interfaces/ILineChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Interfaces/IPieChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Utils/Transformer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/LineChartData.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Highlight/IHighlighter.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Components/Description.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Highlight/RadarHighlighter.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/ScatterChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Interfaces/IBarLineScatterCandleBubbleChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Components/YAxis.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/CandleChartDataEntry.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Highlight/PieRadarHighlighter.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Interfaces/IBubbleChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Formatters/DefaultAxisValueFormatter.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/PieChartDataEntry.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Utils/ViewPortHandler.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Formatters/IFillFormatter.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Charts/RadarChartView.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/BubbleChartData.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Animation/ChartAnimationEasing.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/ScatterChartData.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/ChartDataEntryBase.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Formatters/IValueFormatter.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Interfaces/IRadarChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Components/MarkerView.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/RadarChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/Scatter/ChevronDownShapeRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Charts/ScatterChartView.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Components/Legend.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/BarLineScatterCandleBubbleChartData.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/BubbleChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/BarChartDataEntry.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Charts/CandleStickChartView.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/Scatter/XShapeRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/Scatter/ChevronUpShapeRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Components/XAxis.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/ChartDataEntry.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/ChartDataRendererBase.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Interfaces/ScatterChartDataProvider.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Charts/PieChartView.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Components/ChartLimitLine.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/Scatter/CircleShapeRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/ChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Animation/Animator.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/Renderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Formatters/DefaultFillFormatter.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/HorizontalBarChartRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/XAxisRendererHorizontalBarChart.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/ChartBaseDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Charts/BubbleChartView.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/YAxisRendererHorizontalBarChart.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/Scatter/IShapeRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/Scatter/TriangleShapeRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Interfaces/CandleChartDataProvider.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Utils/ChartUtils.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/YAxisRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/LineScatterCandleRadarChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/XAxisRendererRadarChart.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Charts/BarLineChartViewBase.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/CandleStickChartRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Charts/ChartViewBase.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Components/IMarker.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/YAxisRendererRadarChart.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Interfaces/IChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Interfaces/BarChartDataProvider.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/BarChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/BarChartRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Interfaces/IBarChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/BarLineScatterCandleBubbleChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Highlight/Highlight.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Interfaces/IScatterChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Interfaces/BarLineScatterCandleBubbleChartDataProvider.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/CombinedChartRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Interfaces/ChartDataProvider.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Charts/HorizontalBarChartView.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Formatters/IAxisValueFormatter.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Highlight/BarHighlighter.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Jobs/ZoomViewJob.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/RadarChartData.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Highlight/CombinedHighlighter.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Charts/PieRadarChartViewBase.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Highlight/PieHighlighter.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/LineRadarRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Components/LegendEntry.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/PieChartData.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Utils/ChartColorTemplates.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/Scatter/SquareShapeRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/CandleChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/PieChartRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Interfaces/ILineScatterCandleRadarChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Jobs/AnimatedViewPortJob.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/PieChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/CombinedChartData.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Formatters/IndexAxisValueFormatter.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/LineChartRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Utils/Platform.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Interfaces/ILineRadarChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Filters/DataApproximator.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/LineChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Charts/BarChartView.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Formatters/DefaultValueFormatter.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Jobs/ViewPortJob.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Utils/Fill.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/BarChartData.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Interfaces/BubbleChartDataProvider.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/BubbleChartRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/ScatterChartRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/RadarChartDataEntry.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/XAxisRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/CandleChartData.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/LegendRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/Scatter/CrossShapeRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Highlight/Range.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/AxisRendererBase.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Highlight/HorizontalBarHighlighter.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/LineRadarChartDataSet.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Renderers/BarLineScatterCandleBubbleRenderer.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Components/ComponentBase.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Interfaces/CombinedChartDataProvider.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/ChartData.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Jobs/AnimatedZoomViewJob.swift /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Charts/Data/Implementations/Standard/BubbleChartDataEntry.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreText.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Foundation.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/XPC.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Metal.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreData.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/AppKit.apinotesc /Users/endotsuyoshi/Documents/ios/shoanaorigin2/Charts/Source/Supporting\ Files/Charts.h /Users/endotsuyoshi/Documents/ios/shoanaorigin2/shoana/Build/Intermediates/Charts.build/Debug/Charts.build/unextended-module.modulemap /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/Dispatch.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/CoreGraphics.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/AppKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreData.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/XPC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/QuickLook.apinotesc
D
/home/knoldus/IdeaProjects/user_service/target/debug/deps/liblog-cca170c9b2b372cd.rlib: /home/knoldus/.cargo/registry/src/github.com-1ecc6299db9ec823/log-0.4.6/src/lib.rs /home/knoldus/.cargo/registry/src/github.com-1ecc6299db9ec823/log-0.4.6/src/macros.rs /home/knoldus/.cargo/registry/src/github.com-1ecc6299db9ec823/log-0.4.6/src/serde.rs /home/knoldus/IdeaProjects/user_service/target/debug/deps/log-cca170c9b2b372cd.d: /home/knoldus/.cargo/registry/src/github.com-1ecc6299db9ec823/log-0.4.6/src/lib.rs /home/knoldus/.cargo/registry/src/github.com-1ecc6299db9ec823/log-0.4.6/src/macros.rs /home/knoldus/.cargo/registry/src/github.com-1ecc6299db9ec823/log-0.4.6/src/serde.rs /home/knoldus/.cargo/registry/src/github.com-1ecc6299db9ec823/log-0.4.6/src/lib.rs: /home/knoldus/.cargo/registry/src/github.com-1ecc6299db9ec823/log-0.4.6/src/macros.rs: /home/knoldus/.cargo/registry/src/github.com-1ecc6299db9ec823/log-0.4.6/src/serde.rs:
D
/******************************************************************************* copyright: Copyright (c) 2004 Kris Bell. All rights reserved license: BSD style: $(LICENSE) version: Initial release: January 2006 author: Kris *******************************************************************************/ module tango.io.stream.Lines; private import tango.io.stream.Iterator; /******************************************************************************* Iterate across a set of text patterns. Each pattern is exposed to the client as a slice of the original content, where the slice is transient. If you need to retain the exposed content, then you should .dup it appropriately. The content exposed via an iterator is supposed to be entirely read-only. All current iterators abide by this rule, but it is possible a user could mutate the content through a get() slice. To enforce the desired read-only aspect, the code would have to introduce redundant copying or the compiler would have to support read-only arrays. See Delimiters, Patterns, Quotes. *******************************************************************************/ class Lines(T) : Iterator!(T) { /*********************************************************************** Construct an uninitialized iterator. For example: --- auto lines = new Lines!(char); void somefunc (InputStream stream) { foreach (line; lines.set(stream)) Cout (line).newline; } --- Construct a streaming iterator upon a stream: --- void somefunc (InputStream stream) { foreach (line; new Lines!(char) (stream)) Cout (line).newline; } --- Construct a streaming iterator upon a conduit: --- foreach (line; new Lines!(char) (new File ("myfile"))) Cout (line).newline; --- ***********************************************************************/ this (InputStream stream = null) { super (stream); } /*********************************************************************** Read a line of text, and return false when there's no further content available. ***********************************************************************/ final bool readln (ref const(T)[] content) { content = super.next; return content.ptr !is null; } /*********************************************************************** Scanner implementation for this iterator. Find a '\n', and eat any immediately preceeding '\r'. ***********************************************************************/ protected override size_t scan (const(void)[] data) { auto content = (cast(const(T)*) data.ptr) [0 .. data.length / T.sizeof]; foreach (int i, T c; content) if (c is '\n') { int slice = i; if (i && content[i-1] is '\r') --slice; set (content.ptr, 0, slice, i); return found (i); } return notFound(); } } /******************************************************************************* *******************************************************************************/ debug(UnitTest) { private import tango.io.device.Array; unittest { auto p = new Lines!(char) (new Array("blah".dup)); } } /******************************************************************************* *******************************************************************************/ debug (Lines) { import tango.io.Console; import tango.io.device.Array; void main() { auto lines = new Lines!(char)(new Array("one\ntwo\r\nthree".dup)); foreach (i, line, delim; lines) Cout (line) (delim); } }
D
/Users/monradajuycharoen/Desktop/DUP/Test2/build/Pods.build/Debug-iphonesimulator/SwiftyOnboard.build/Objects-normal/x86_64/SwiftyOnboardPage.o : /Users/monradajuycharoen/Desktop/DUP/Test2/Pods/SwiftyOnboard/SwiftyOnboard/SwiftyOnboard.swift /Users/monradajuycharoen/Desktop/DUP/Test2/Pods/SwiftyOnboard/SwiftyOnboard/SwiftyOnboardPage.swift /Users/monradajuycharoen/Desktop/DUP/Test2/Pods/SwiftyOnboard/SwiftyOnboard/SwiftyOnboardOverlay.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/monradajuycharoen/Desktop/DUP/Test2/Pods/Target\ Support\ Files/SwiftyOnboard/SwiftyOnboard-umbrella.h /Users/monradajuycharoen/Desktop/DUP/Test2/Pods/SwiftyOnboard/SwiftyOnboard/SwiftyOnboard.h /Users/monradajuycharoen/Desktop/DUP/Test2/build/Pods.build/Debug-iphonesimulator/SwiftyOnboard.build/unextended-module.modulemap /Users/monradajuycharoen/Desktop/DUP/Test2/build/Pods.build/Debug-iphonesimulator/SwiftyOnboard.build/Objects-normal/x86_64/SwiftyOnboardPage~partial.swiftmodule : /Users/monradajuycharoen/Desktop/DUP/Test2/Pods/SwiftyOnboard/SwiftyOnboard/SwiftyOnboard.swift /Users/monradajuycharoen/Desktop/DUP/Test2/Pods/SwiftyOnboard/SwiftyOnboard/SwiftyOnboardPage.swift /Users/monradajuycharoen/Desktop/DUP/Test2/Pods/SwiftyOnboard/SwiftyOnboard/SwiftyOnboardOverlay.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/monradajuycharoen/Desktop/DUP/Test2/Pods/Target\ Support\ Files/SwiftyOnboard/SwiftyOnboard-umbrella.h /Users/monradajuycharoen/Desktop/DUP/Test2/Pods/SwiftyOnboard/SwiftyOnboard/SwiftyOnboard.h /Users/monradajuycharoen/Desktop/DUP/Test2/build/Pods.build/Debug-iphonesimulator/SwiftyOnboard.build/unextended-module.modulemap /Users/monradajuycharoen/Desktop/DUP/Test2/build/Pods.build/Debug-iphonesimulator/SwiftyOnboard.build/Objects-normal/x86_64/SwiftyOnboardPage~partial.swiftdoc : /Users/monradajuycharoen/Desktop/DUP/Test2/Pods/SwiftyOnboard/SwiftyOnboard/SwiftyOnboard.swift /Users/monradajuycharoen/Desktop/DUP/Test2/Pods/SwiftyOnboard/SwiftyOnboard/SwiftyOnboardPage.swift /Users/monradajuycharoen/Desktop/DUP/Test2/Pods/SwiftyOnboard/SwiftyOnboard/SwiftyOnboardOverlay.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/monradajuycharoen/Desktop/DUP/Test2/Pods/Target\ Support\ Files/SwiftyOnboard/SwiftyOnboard-umbrella.h /Users/monradajuycharoen/Desktop/DUP/Test2/Pods/SwiftyOnboard/SwiftyOnboard/SwiftyOnboard.h /Users/monradajuycharoen/Desktop/DUP/Test2/build/Pods.build/Debug-iphonesimulator/SwiftyOnboard.build/unextended-module.modulemap
D
module ws.gui.scroller; import std.math, std.algorithm, std.conv, ws.time, ws.gui.base; class Scroller: Base { double scroll = 0; double scrollSpeed = 0; double frameTime; double frameLast; override void resize(int[2] size){ super.resize(size); update; } void update(){ if(!children.length) return; foreach(c; children){ c.move([pos.x, pos.y+size.h-c.size.h+scroll.to!int]); c.resize([size.w, c.size.h]); } onMouseMove(cursorPos.x, cursorPos.y); } override void resizeRequest(Base child, int[2] size){ child.resize(size); scroll = scroll.min(size.h - this.size.h).max(0); update; } override void onMouseButton(Mouse.button button, bool pressed, int x, int y){ if(!children.length) return; auto maxOffset = (children[0].size.h - size.h).max(0); if(button == Mouse.wheelDown && scroll < maxOffset){ if(pressed){ scrollSpeed += 25+scrollSpeed.abs; return; } }else if(button == Mouse.wheelUp && scroll > 0){ if(pressed){ scrollSpeed -= 25+scrollSpeed.abs; return; } }else super.onMouseButton(button, pressed, x, y); } override void onDraw(){ if(hidden) return; frameTime = now-frameLast; frameLast = now; if(scrollSpeed){ scroll = (scroll + scrollSpeed*frameTime*30).min(children[0].size.h - size.h).max(0); scrollSpeed = scrollSpeed.eerp(0, frameTime*15, frameTime*7.5, frameTime/50); update; } draw.clip(pos, size); super.onDraw(); draw.noclip; } } double eerp(double current, double target, double a, double b, double c){ auto dir = current < target ? 1 : -1; auto diff = (current-target).abs; return current + (dir*(c*diff^^2 + b*diff + a)).min(diff).max(-diff); }
D
/// Generate by tools module org.restlet.engine.io.BioUtils; import java.lang.exceptions; public class BioUtils { public this() { implMissing(); } }
D
module android.java.android.animation.AnimatorSet; public import android.java.android.animation.AnimatorSet_d_interface; import arsd.jni : ImportExportImpl; mixin ImportExportImpl!AnimatorSet; import import6 = android.java.android.animation.AnimatorSet; import import3 = android.java.java.util.ArrayList; import import9 = android.java.java.lang.Class; import import5 = android.java.android.animation.AnimatorSet_Builder;
D
module org.eclipse.swt.internal.mozilla.nsIDOMDOMImplementation; import org.eclipse.swt.internal.mozilla.Common; import org.eclipse.swt.internal.mozilla.nsID; import org.eclipse.swt.internal.mozilla.nsISupports; import org.eclipse.swt.internal.mozilla.nsIDOMDocumentType; import org.eclipse.swt.internal.mozilla.nsIDOMDocument; import org.eclipse.swt.internal.mozilla.nsStringAPI; const char[] NS_IDOMDOMIMPLEMENTATION_IID_STR = "a6cf9074-15b3-11d2-932e-00805f8add32"; const nsIID NS_IDOMDOMIMPLEMENTATION_IID= {0xa6cf9074, 0x15b3, 0x11d2, [ 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 ]}; interface nsIDOMDOMImplementation : nsISupports { static const char[] IID_STR = NS_IDOMDOMIMPLEMENTATION_IID_STR; static const nsIID IID = NS_IDOMDOMIMPLEMENTATION_IID; extern(System): nsresult HasFeature(nsAString * feature, nsAString * version_, PRBool *_retval); nsresult CreateDocumentType(nsAString * qualifiedName, nsAString * publicId, nsAString * systemId, nsIDOMDocumentType *_retval); nsresult CreateDocument(nsAString * namespaceURI, nsAString * qualifiedName, nsIDOMDocumentType doctype, nsIDOMDocument *_retval); }
D
instance MIL_3110_ANDRE(Npc_Default) { name[0] = "Лорд Андре"; guild = GIL_PAL; id = 3110; voice = 8; flags = 0; npcType = npctype_main; aivar[93] = TRUE; aivar[AIV_ToughGuy] = TRUE; aivar[AIV_ToughGuyNewsOverride] = TRUE; aivar[AIV_IGNORE_Murder] = TRUE; aivar[AIV_IGNORE_Theft] = TRUE; aivar[AIV_IGNORE_Sheepkiller] = TRUE; B_SetAttributesToChapter(self,6); fight_tactic = FAI_HUMAN_MASTER; EquipItem(self,ItMw_1H_Blessed_02); B_CreateAmbientInv(self); B_SetNpcVisual(self,MALE,"Hum_Head_Bald",Face_N_Weak12,BodyTex_N,itar_pal_m_v1_NPC); Mdl_SetModelFatness(self,1); Mdl_ApplyOverlayMds(self,"Humans_Militia.mds"); B_GiveNpcTalents(self); B_SetFightSkills(self,80); daily_routine = rtn_start_3110; }; func void rtn_start_3110() { TA_Stand_ArmsCrossed(0,0,12,0,"FP_ANDRE"); TA_Stand_ArmsCrossed(12,0,0,0,"FP_ANDRE"); }; func void rtn_tot_3110() { TA_Stand_WP(8,0,20,0,"TOT"); TA_Stand_WP(20,0,8,0,"TOT"); };
D
/** * Copyright © Yurai Web Framework 2021 * License: MIT (https://github.com/YuraiWeb/yurai/blob/main/LICENSE) * Author: Jacob Jensen (bausshf) */ module yurai.views.viewresult; public final class ViewResult { private: string _content; string _contentType; public: final: this(string content, string contentType = null) { _content = content ? content : ""; _contentType = contentType ? (contentType ~ "; charset=UTF-8") : ""; if (!_contentType || !_contentType.length) { _contentType = "text/html; charset=UTF-8"; } } this() { _content = null; _contentType = "text/html; charset=UTF-8"; } @property { string content() { return _content; } string contentType() { return _contentType; } } }
D
/Users/admin/Desktop/TMS_Kostya/TMSrepo/test/HW9_1_Kostya/DerivedData/HW9_1_Kostya/Build/Intermediates.noindex/HW9_1_Kostya.build/Debug-iphonesimulator/HW9_1_Kostya.build/Objects-normal/x86_64/AppDelegate.o : /Users/admin/Desktop/TMS_Kostya/TMSrepo/test/HW9_1_Kostya/HW9_1_Kostya/SceneDelegate.swift /Users/admin/Desktop/TMS_Kostya/TMSrepo/test/HW9_1_Kostya/HW9_1_Kostya/AppDelegate.swift /Users/admin/Desktop/TMS_Kostya/TMSrepo/test/HW9_1_Kostya/HW9_1_Kostya/ViewController.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Swift.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Users/admin/Desktop/TMS_Kostya/TMSrepo/test/HW9_1_Kostya/DerivedData/HW9_1_Kostya/Build/Intermediates.noindex/HW9_1_Kostya.build/Debug-iphonesimulator/HW9_1_Kostya.build/Objects-normal/x86_64/AppDelegate~partial.swiftmodule : /Users/admin/Desktop/TMS_Kostya/TMSrepo/test/HW9_1_Kostya/HW9_1_Kostya/SceneDelegate.swift /Users/admin/Desktop/TMS_Kostya/TMSrepo/test/HW9_1_Kostya/HW9_1_Kostya/AppDelegate.swift /Users/admin/Desktop/TMS_Kostya/TMSrepo/test/HW9_1_Kostya/HW9_1_Kostya/ViewController.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Swift.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Users/admin/Desktop/TMS_Kostya/TMSrepo/test/HW9_1_Kostya/DerivedData/HW9_1_Kostya/Build/Intermediates.noindex/HW9_1_Kostya.build/Debug-iphonesimulator/HW9_1_Kostya.build/Objects-normal/x86_64/AppDelegate~partial.swiftdoc : /Users/admin/Desktop/TMS_Kostya/TMSrepo/test/HW9_1_Kostya/HW9_1_Kostya/SceneDelegate.swift /Users/admin/Desktop/TMS_Kostya/TMSrepo/test/HW9_1_Kostya/HW9_1_Kostya/AppDelegate.swift /Users/admin/Desktop/TMS_Kostya/TMSrepo/test/HW9_1_Kostya/HW9_1_Kostya/ViewController.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Swift.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Users/admin/Desktop/TMS_Kostya/TMSrepo/test/HW9_1_Kostya/DerivedData/HW9_1_Kostya/Build/Intermediates.noindex/HW9_1_Kostya.build/Debug-iphonesimulator/HW9_1_Kostya.build/Objects-normal/x86_64/AppDelegate~partial.swiftsourceinfo : /Users/admin/Desktop/TMS_Kostya/TMSrepo/test/HW9_1_Kostya/HW9_1_Kostya/SceneDelegate.swift /Users/admin/Desktop/TMS_Kostya/TMSrepo/test/HW9_1_Kostya/HW9_1_Kostya/AppDelegate.swift /Users/admin/Desktop/TMS_Kostya/TMSrepo/test/HW9_1_Kostya/HW9_1_Kostya/ViewController.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Swift.swiftmodule/x86_64-apple-ios-simulator.swiftmodule
D
a male singer with a voice above that of a tenor the highest adult male singing voice of or being the highest male voice
D
/* TEST_OUTPUT: --- fail_compilation/fail97.d(11): Error: pragma `lib` is missing a terminating `;` --- */ // https://issues.dlang.org/show_bug.cgi?id=151 import std.stdio; pragma(lib,"ws2_32.lib")//; class bla{} void main(){}
D
/* Copyright (c) 2013-2018 Timur Gafarov Boost Software License - Version 1.0 - August 17th, 2003 Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and accompanying documentation covered by this license (the "Software") to use, reproduce, display, distribute, execute, and transmit the Software, and to prepare derivative works of the Software, and to permit third-parties to whom the Software is furnished to do so, all subject to the following: The copyright notices in the Software and this entire statement, including the above license grant, this restriction and the following disclaimer, must be included in all copies of the Software, in whole or in part, and all derivative works of the Software, unless such copies or derivative works are solely in the form of machine-executable object code generated by a source language processor. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ module dagon.physics.geometry; import std.math; import dlib.core.ownership; import dlib.core.memory; import dlib.math.vector; import dlib.math.matrix; import dlib.math.transformation; import dlib.math.utils; import dlib.geometry.aabb; import dagon.physics.world; enum GeomType { Undefined, Sphere, Box, Cylinder, Cone, Ellipsoid, Triangle, UserDefined } abstract class Geometry: Owner { GeomType type = GeomType.Undefined; this(Owner o) { super(o); } Vector3f supportPoint(Vector3f dir) { return Vector3f(0.0f, 0.0f, 0.0f); } Matrix3x3f inertiaTensor(float mass) { return Matrix3x3f.identity * mass; } AABB boundingBox(Vector3f position) { return AABB(position, Vector3f(1.0f, 1.0f, 1.0f)); } } class GeomSphere: Geometry { float radius; this(PhysicsWorld world, float r) { super(world); type = GeomType.Sphere; radius = r; } override Vector3f supportPoint(Vector3f dir) { return dir.normalized * radius; } override Matrix3x3f inertiaTensor(float mass) { float v = 0.4f * mass * radius * radius; return matrixf( v, 0, 0, 0, v, 0, 0, 0, v ); } override AABB boundingBox(Vector3f position) { return AABB(position, Vector3f(radius, radius, radius)); } } class GeomBox: Geometry { Vector3f halfSize; float bsphereRadius; this(PhysicsWorld world, Vector3f hsize) { super(world); type = GeomType.Box; halfSize = hsize; bsphereRadius = halfSize.length; } override Vector3f supportPoint(Vector3f dir) { Vector3f result; result.x = sign(dir.x) * halfSize.x; result.y = sign(dir.y) * halfSize.y; result.z = sign(dir.z) * halfSize.z; return result; } override Matrix3x3f inertiaTensor(float mass) { float x2 = halfSize.x * halfSize.x; float y2 = halfSize.y * halfSize.y; float z2 = halfSize.z * halfSize.z; return matrixf( (y2 + z2)/3 * mass, 0, 0, 0, (x2 + z2)/3 * mass, 0, 0, 0, (x2 + y2)/3 * mass ); } override AABB boundingBox(Vector3f position) { return AABB(position, Vector3f(bsphereRadius, bsphereRadius, bsphereRadius)); } } class GeomCylinder: Geometry { float height; float radius; this(PhysicsWorld world, float h, float r) { super(world); type = GeomType.Cylinder; height = h; radius = r; } override Vector3f supportPoint(Vector3f dir) { Vector3f result; float sigma = sqrt((dir.x * dir.x + dir.z * dir.z)); if (sigma > 0.0f) { result.x = dir.x / sigma * radius; result.y = sign(dir.y) * height * 0.5f; result.z = dir.z / sigma * radius; } else { result.x = 0.0f; result.y = sign(dir.y) * height * 0.5f; result.z = 0.0f; } return result; } override Matrix3x3f inertiaTensor(float mass) { float r2 = radius * radius; float h2 = height * height; return matrixf( (3*r2 + h2)/12 * mass, 0, 0, 0, (3*r2 + h2)/12 * mass, 0, 0, 0, r2/2 * mass ); } override AABB boundingBox(Vector3f position) { float rsum = radius + radius; float d = sqrt(rsum * rsum + height * height) * 0.5f; return AABB(position, Vector3f(d, d, d)); } } class GeomCone: Geometry { float radius; float height; this(PhysicsWorld world, float h, float r) { super(world); type = GeomType.Cone; height = h; radius = r; } override Vector3f supportPoint(Vector3f dir) { float zdist = dir[0] * dir[0] + dir[1] * dir[1]; float len = zdist + dir[2] * dir[2]; zdist = sqrt(zdist); len = sqrt(len); float half_h = height * 0.5; float radius = radius; float sin_a = radius / sqrt(radius * radius + 4.0f * half_h * half_h); if (dir[2] > len * sin_a) return Vector3f(0.0f, 0.0f, half_h); else if (zdist > 0.0f) { float rad = radius / zdist; return Vector3f(rad * dir[0], rad * dir[1], -half_h); } else return Vector3f(0.0f, 0.0f, -half_h); } override Matrix3x3f inertiaTensor(float mass) { float r2 = radius * radius; float h2 = height * height; return matrixf( (3.0f/80.0f*h2 + 3.0f/20.0f*r2) * mass, 0, 0, 0, (3.0f/80.0f*h2 + 3.0f/20.0f*r2) * mass, 0, 0, 0, (3.0f/10.0f*r2) * mass ); } override AABB boundingBox(Vector3f position) { float rsum = radius + radius; float d = sqrt(rsum * rsum + height * height) * 0.5f; return AABB(position, Vector3f(d, d, d)); } } class GeomEllipsoid: Geometry { Vector3f radii; this(PhysicsWorld world, Vector3f r) { super(world); type = GeomType.Ellipsoid; radii = r; } override Vector3f supportPoint(Vector3f dir) { return dir.normalized * radii; } override Matrix3x3f inertiaTensor(float mass) { float x2 = radii.x * radii.x; float y2 = radii.y * radii.y; float z2 = radii.z * radii.z; return matrixf( (y2 + z2)/5 * mass, 0, 0, 0, (x2 + z2)/5 * mass, 0, 0, 0, (x2 + y2)/5 * mass ); } override AABB boundingBox(Vector3f position) { return AABB(position, radii); } } class GeomTriangle: Geometry { Vector3f[3] v; this(PhysicsWorld world, Vector3f a, Vector3f b, Vector3f c) { super(world); type = GeomType.Triangle; v[0] = a; v[1] = b; v[2] = c; } override Vector3f supportPoint(Vector3f dir) { float dota = dir.dot(v[0]); float dotb = dir.dot(v[1]); float dotc = dir.dot(v[2]); if (dota > dotb) { if (dotc > dota) return v[2]; else return v[0]; } else { if (dotc > dotb) return v[2]; else return v[1]; } } // TODO: boundingBox }
D
; Copyright (C) 2008 The Android Open Source Project ; ; Licensed under the Apache License, Version 2.0 (the "License"); ; you may not use this file except in compliance with the License. ; You may obtain a copy of the License at ; ; http://www.apache.org/licenses/LICENSE-2.0 ; ; Unless required by applicable law or agreed to in writing, software ; distributed under the License is distributed on an "AS IS" BASIS, ; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ; See the License for the specific language governing permissions and ; limitations under the License. .source T_sparse_switch_8.java .class public dot.junit.opcodes.sparse_switch.d.T_sparse_switch_8 .super java/lang/Object .method public <init>()V .limit regs 1 invoke-direct {v0}, java/lang/Object/<init>()V return-void .end method .method public run(I)I .limit regs 5 sparse-switch v4 -1 : Label9 10 : Label12 15 : Label12 sparse-switch-end Label6: const v4, -1 return v4 Label9: const v4, 2 return v4 Label12: const v4, 20 return v4 .end method
D
# FIXED PROFILES/gattservapp_util.obj: C:/ti/simplelink/ble_cc26xx_2_01_01_44627/Projects/ble/Profiles/GATT/gattservapp_util.c PROFILES/gattservapp_util.obj: C:/ti/simplelink/ble_cc26xx_2_01_01_44627/Components/ble/include/bcomdef.h PROFILES/gattservapp_util.obj: C:/ti/simplelink/ble_cc26xx_2_01_01_44627/Components/osal/include/comdef.h PROFILES/gattservapp_util.obj: C:/ti/simplelink/ble_cc26xx_2_01_01_44627/Components/hal/target/CC2650TIRTOS/hal_types.h PROFILES/gattservapp_util.obj: C:/ti/simplelink/ble_cc26xx_2_01_01_44627/Components/hal/target/CC2650TIRTOS/../_common/cc26xx/_hal_types.h PROFILES/gattservapp_util.obj: C:/ti/ccs613/ccsv6/tools/compiler/ti-cgt-arm_5.2.5/include/stdint.h PROFILES/gattservapp_util.obj: C:/ti/simplelink/ble_cc26xx_2_01_01_44627/Components/hal/include/hal_defs.h PROFILES/gattservapp_util.obj: C:/ti/simplelink/ble_cc26xx_2_01_01_44627/Components/ble/host/linkdb.h PROFILES/gattservapp_util.obj: C:/ti/simplelink/ble_cc26xx_2_01_01_44627/Components/ble/include/gatt.h PROFILES/gattservapp_util.obj: C:/ti/simplelink/ble_cc26xx_2_01_01_44627/Components/osal/include/OSAL.h PROFILES/gattservapp_util.obj: C:/ti/ccs613/ccsv6/tools/compiler/ti-cgt-arm_5.2.5/include/limits.h PROFILES/gattservapp_util.obj: C:/ti/ccs613/ccsv6/tools/compiler/ti-cgt-arm_5.2.5/include/yvals.h PROFILES/gattservapp_util.obj: C:/ti/ccs613/ccsv6/tools/compiler/ti-cgt-arm_5.2.5/include/stdarg.h PROFILES/gattservapp_util.obj: C:/ti/ccs613/ccsv6/tools/compiler/ti-cgt-arm_5.2.5/include/linkage.h PROFILES/gattservapp_util.obj: C:/ti/ccs613/ccsv6/tools/compiler/ti-cgt-arm_5.2.5/include/_lock.h PROFILES/gattservapp_util.obj: C:/ti/simplelink/ble_cc26xx_2_01_01_44627/Components/osal/include/OSAL_Memory.h PROFILES/gattservapp_util.obj: C:/ti/simplelink/ble_cc26xx_2_01_01_44627/Components/osal/include/OSAL_Timers.h PROFILES/gattservapp_util.obj: C:/ti/simplelink/ble_cc26xx_2_01_01_44627/Components/icall/include/ICall.h PROFILES/gattservapp_util.obj: C:/ti/ccs613/ccsv6/tools/compiler/ti-cgt-arm_5.2.5/include/stdbool.h PROFILES/gattservapp_util.obj: C:/ti/ccs613/ccsv6/tools/compiler/ti-cgt-arm_5.2.5/include/stdlib.h PROFILES/gattservapp_util.obj: C:/ti/simplelink/ble_cc26xx_2_01_01_44627/Components/ble/include/att.h PROFILES/gattservapp_util.obj: C:/ti/simplelink/ble_cc26xx_2_01_01_44627/Components/ble/include/l2cap.h PROFILES/gattservapp_util.obj: C:/ti/simplelink/ble_cc26xx_2_01_01_44627/Projects/ble/include/gattservapp.h C:/ti/simplelink/ble_cc26xx_2_01_01_44627/Projects/ble/Profiles/GATT/gattservapp_util.c: C:/ti/simplelink/ble_cc26xx_2_01_01_44627/Components/ble/include/bcomdef.h: C:/ti/simplelink/ble_cc26xx_2_01_01_44627/Components/osal/include/comdef.h: C:/ti/simplelink/ble_cc26xx_2_01_01_44627/Components/hal/target/CC2650TIRTOS/hal_types.h: C:/ti/simplelink/ble_cc26xx_2_01_01_44627/Components/hal/target/CC2650TIRTOS/../_common/cc26xx/_hal_types.h: C:/ti/ccs613/ccsv6/tools/compiler/ti-cgt-arm_5.2.5/include/stdint.h: C:/ti/simplelink/ble_cc26xx_2_01_01_44627/Components/hal/include/hal_defs.h: C:/ti/simplelink/ble_cc26xx_2_01_01_44627/Components/ble/host/linkdb.h: C:/ti/simplelink/ble_cc26xx_2_01_01_44627/Components/ble/include/gatt.h: C:/ti/simplelink/ble_cc26xx_2_01_01_44627/Components/osal/include/OSAL.h: C:/ti/ccs613/ccsv6/tools/compiler/ti-cgt-arm_5.2.5/include/limits.h: C:/ti/ccs613/ccsv6/tools/compiler/ti-cgt-arm_5.2.5/include/yvals.h: C:/ti/ccs613/ccsv6/tools/compiler/ti-cgt-arm_5.2.5/include/stdarg.h: C:/ti/ccs613/ccsv6/tools/compiler/ti-cgt-arm_5.2.5/include/linkage.h: C:/ti/ccs613/ccsv6/tools/compiler/ti-cgt-arm_5.2.5/include/_lock.h: C:/ti/simplelink/ble_cc26xx_2_01_01_44627/Components/osal/include/OSAL_Memory.h: C:/ti/simplelink/ble_cc26xx_2_01_01_44627/Components/osal/include/OSAL_Timers.h: C:/ti/simplelink/ble_cc26xx_2_01_01_44627/Components/icall/include/ICall.h: C:/ti/ccs613/ccsv6/tools/compiler/ti-cgt-arm_5.2.5/include/stdbool.h: C:/ti/ccs613/ccsv6/tools/compiler/ti-cgt-arm_5.2.5/include/stdlib.h: C:/ti/simplelink/ble_cc26xx_2_01_01_44627/Components/ble/include/att.h: C:/ti/simplelink/ble_cc26xx_2_01_01_44627/Components/ble/include/l2cap.h: C:/ti/simplelink/ble_cc26xx_2_01_01_44627/Projects/ble/include/gattservapp.h:
D
module core.dto.common; enum Player : int { A = 1, B = 2, C = 4 }; enum Cell : int { None = 0, A = 1, B = 2, C = 4, AllMighty = 7, Nothing = -1 }; struct ShuttingDown {} struct Finished {} struct Position { int x; int y; bool opEquals(Position arg) { return this.x == arg.x && this.y == arg.y; } }
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/semantic3.d, _semantic3.d) * Documentation: https://dlang.org/phobos/dmd_semantic3.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/semantic3.d */ module dmd.semantic3; import core.stdc.stdio; import core.stdc.string; import dmd.aggregate; import dmd.aliasthis; import dmd.arraytypes; import dmd.astcodegen; import dmd.attrib; import dmd.blockexit; import dmd.clone; import dmd.ctorflow; import dmd.dcast; import dmd.dclass; import dmd.declaration; import dmd.denum; import dmd.dimport; import dmd.dinterpret; import dmd.dmodule; import dmd.dscope; import dmd.dstruct; import dmd.dsymbol; import dmd.dsymbolsem; import dmd.dtemplate; import dmd.dversion; import dmd.errors; import dmd.escape; import dmd.expression; import dmd.expressionsem; import dmd.func; import dmd.globals; import dmd.id; import dmd.identifier; import dmd.init; import dmd.initsem; import dmd.hdrgen; import dmd.mtype; import dmd.nogc; import dmd.nspace; import dmd.objc; import dmd.opover; import dmd.parse; import dmd.root.filename; import dmd.root.outbuffer; import dmd.root.rmem; import dmd.root.rootobject; import dmd.sideeffect; import dmd.statementsem; import dmd.staticassert; import dmd.tokens; import dmd.utf; import dmd.utils; import dmd.semantic2; import dmd.statement; import dmd.target; import dmd.templateparamsem; import dmd.typesem; import dmd.visitor; enum LOG = false; /************************************* * Does semantic analysis on function bodies. */ extern(C++) void semantic3(Dsymbol dsym, Scope* sc) { scope v = new Semantic3Visitor(sc); dsym.accept(v); } private extern(C++) final class Semantic3Visitor : Visitor { alias visit = Visitor.visit; Scope* sc; this(Scope* sc) { this.sc = sc; } override void visit(Dsymbol) {} override void visit(TemplateInstance tempinst) { static if (LOG) { printf("TemplateInstance.semantic3('%s'), semanticRun = %d\n", tempinst.toChars(), tempinst.semanticRun); } //if (toChars()[0] == 'D') *(char*)0=0; if (tempinst.semanticRun >= PASS.semantic3) return; tempinst.semanticRun = PASS.semantic3; if (!tempinst.errors && tempinst.members) { TemplateDeclaration tempdecl = tempinst.tempdecl.isTemplateDeclaration(); assert(tempdecl); sc = tempdecl._scope; sc = sc.push(tempinst.argsym); sc = sc.push(tempinst); sc.tinst = tempinst; sc.minst = tempinst.minst; int needGagging = (tempinst.gagged && !global.gag); uint olderrors = global.errors; int oldGaggedErrors = -1; // dead-store to prevent spurious warning /* If this is a gagged instantiation, gag errors. * Future optimisation: If the results are actually needed, errors * would already be gagged, so we don't really need to run semantic * on the members. */ if (needGagging) oldGaggedErrors = global.startGagging(); for (size_t i = 0; i < tempinst.members.dim; i++) { Dsymbol s = (*tempinst.members)[i]; s.semantic3(sc); if (tempinst.gagged && global.errors != olderrors) break; } if (global.errors != olderrors) { if (!tempinst.errors) { if (!tempdecl.literal) tempinst.error(tempinst.loc, "error instantiating"); if (tempinst.tinst) tempinst.tinst.printInstantiationTrace(); } tempinst.errors = true; } if (needGagging) global.endGagging(oldGaggedErrors); sc = sc.pop(); sc.pop(); } } override void visit(TemplateMixin tmix) { if (tmix.semanticRun >= PASS.semantic3) return; tmix.semanticRun = PASS.semantic3; static if (LOG) { printf("TemplateMixin.semantic3('%s')\n", tmix.toChars()); } if (tmix.members) { sc = sc.push(tmix.argsym); sc = sc.push(tmix); for (size_t i = 0; i < tmix.members.dim; i++) { Dsymbol s = (*tmix.members)[i]; s.semantic3(sc); } sc = sc.pop(); sc.pop(); } } override void visit(Module mod) { //printf("Module::semantic3('%s'): parent = %p\n", toChars(), parent); if (mod.semanticRun != PASS.semantic2done) return; mod.semanticRun = PASS.semantic3; // Note that modules get their own scope, from scratch. // This is so regardless of where in the syntax a module // gets imported, it is unaffected by context. Scope* sc = Scope.createGlobal(mod); // create root scope //printf("Module = %p\n", sc.scopesym); // Pass 3 semantic routines: do initializers and function bodies for (size_t i = 0; i < mod.members.dim; i++) { Dsymbol s = (*mod.members)[i]; //printf("Module %s: %s.semantic3()\n", toChars(), s.toChars()); s.semantic3(sc); mod.runDeferredSemantic2(); } if (mod.userAttribDecl) { mod.userAttribDecl.semantic3(sc); } sc = sc.pop(); sc.pop(); mod.semanticRun = PASS.semantic3done; } override void visit(FuncDeclaration funcdecl) { /* Determine if function should add `return 0;` */ bool addReturn0() { TypeFunction f = cast(TypeFunction)funcdecl.type; return f.next.ty == Tvoid && (funcdecl.isMain() || global.params.betterC && funcdecl.isCMain()); } VarDeclaration _arguments = null; if (!funcdecl.parent) { if (global.errors) return; //printf("FuncDeclaration::semantic3(%s '%s', sc = %p)\n", kind(), toChars(), sc); assert(0); } if (funcdecl.errors || isError(funcdecl.parent)) { funcdecl.errors = true; return; } //printf("FuncDeclaration::semantic3('%s.%s', %p, sc = %p, loc = %s)\n", funcdecl.parent.toChars(), funcdecl.toChars(), funcdecl, sc, funcdecl.loc.toChars()); //fflush(stdout); //printf("storage class = x%x %x\n", sc.stc, storage_class); //{ static int x; if (++x == 2) *(char*)0=0; } //printf("\tlinkage = %d\n", sc.linkage); if (funcdecl.ident == Id.assign && !funcdecl.inuse) { if (funcdecl.storage_class & STC.inference) { /* https://issues.dlang.org/show_bug.cgi?id=15044 * For generated opAssign function, any errors * from its body need to be gagged. */ uint oldErrors = global.startGagging(); ++funcdecl.inuse; funcdecl.semantic3(sc); --funcdecl.inuse; if (global.endGagging(oldErrors)) // if errors happened { // Disable generated opAssign, because some members forbid identity assignment. funcdecl.storage_class |= STC.disable; funcdecl.fbody = null; // remove fbody which contains the error funcdecl.semantic3Errors = false; } return; } } //printf(" sc.incontract = %d\n", (sc.flags & SCOPE.contract)); if (funcdecl.semanticRun >= PASS.semantic3) return; funcdecl.semanticRun = PASS.semantic3; funcdecl.semantic3Errors = false; if (!funcdecl.type || funcdecl.type.ty != Tfunction) return; TypeFunction f = cast(TypeFunction)funcdecl.type; if (!funcdecl.inferRetType && f.next.ty == Terror) return; if (!funcdecl.fbody && funcdecl.inferRetType && !f.next) { funcdecl.error("has no function body with return type inference"); return; } uint oldErrors = global.errors; auto fds = FuncDeclSem3(funcdecl,sc); fds.checkInContractOverrides(); // Remember whether we need to generate an 'out' contract. immutable bool needEnsure = FuncDeclaration.needsFensure(funcdecl); if (funcdecl.fbody || funcdecl.frequires || needEnsure) { /* Symbol table into which we place parameters and nested functions, * solely to diagnose name collisions. */ funcdecl.localsymtab = new DsymbolTable(); // Establish function scope auto ss = new ScopeDsymbol(funcdecl.loc, null); // find enclosing scope symbol, might skip symbol-less CTFE and/or FuncExp scopes for (auto scx = sc; ; scx = scx.enclosing) { if (scx.scopesym) { ss.parent = scx.scopesym; break; } } ss.endlinnum = funcdecl.endloc.linnum; Scope* sc2 = sc.push(ss); sc2.func = funcdecl; sc2.parent = funcdecl; sc2.ctorflow.callSuper = CSX.none; sc2.sbreak = null; sc2.scontinue = null; sc2.sw = null; sc2.fes = funcdecl.fes; sc2.linkage = LINK.d; sc2.stc &= ~(STC.auto_ | STC.scope_ | STC.static_ | STC.extern_ | STC.abstract_ | STC.deprecated_ | STC.override_ | STC.TYPECTOR | STC.final_ | STC.tls | STC.gshared | STC.ref_ | STC.return_ | STC.property | STC.nothrow_ | STC.pure_ | STC.safe | STC.trusted | STC.system); sc2.protection = Prot(Prot.Kind.public_); sc2.explicitProtection = 0; sc2.aligndecl = null; if (funcdecl.ident != Id.require && funcdecl.ident != Id.ensure) sc2.flags = sc.flags & ~SCOPE.contract; sc2.flags &= ~SCOPE.compile; sc2.tf = null; sc2.os = null; sc2.inLoop = false; sc2.userAttribDecl = null; if (sc2.intypeof == 1) sc2.intypeof = 2; sc2.ctorflow.fieldinit = null; /* Note: When a lambda is defined immediately under aggregate member * scope, it should be contextless due to prevent interior pointers. * e.g. * // dg points 'this' - it's interior pointer * class C { int x; void delegate() dg = (){ this.x = 1; }; } * * However, lambdas could be used inside typeof, in order to check * some expressions validity at compile time. For such case the lambda * body can access aggregate instance members. * e.g. * class C { int x; static assert(is(typeof({ this.x = 1; }))); } * * To properly accept it, mark these lambdas as member functions. */ if (auto fld = funcdecl.isFuncLiteralDeclaration()) { if (auto ad = funcdecl.isMember2()) { if (!sc.intypeof) { if (fld.tok == TOK.delegate_) funcdecl.error("cannot be %s members", ad.kind()); else fld.tok = TOK.function_; } else { if (fld.tok != TOK.function_) fld.tok = TOK.delegate_; } } } // Declare 'this' auto ad = funcdecl.isThis(); auto hiddenParams = funcdecl.declareThis(sc2, ad); funcdecl.vthis = hiddenParams.vthis; funcdecl.isThis2 = hiddenParams.isThis2; funcdecl.selectorParameter = hiddenParams.selectorParameter; //printf("[%s] ad = %p vthis = %p\n", loc.toChars(), ad, vthis); //if (vthis) printf("\tvthis.type = %s\n", vthis.type.toChars()); // Declare hidden variable _arguments[] and _argptr if (f.parameterList.varargs == VarArg.variadic) { if (f.linkage == LINK.d) { // Variadic arguments depend on Typeinfo being defined. if (!global.params.useTypeInfo || !Type.dtypeinfo || !Type.typeinfotypelist) { if (!global.params.useTypeInfo) funcdecl.error("D-style variadic functions cannot be used with -betterC"); else if (!Type.typeinfotypelist) funcdecl.error("`object.TypeInfo_Tuple` could not be found, but is implicitly used in D-style variadic functions"); else funcdecl.error("`object.TypeInfo` could not be found, but is implicitly used in D-style variadic functions"); fatal(); } // Declare _arguments[] funcdecl.v_arguments = new VarDeclaration(funcdecl.loc, Type.typeinfotypelist.type, Id._arguments_typeinfo, null); funcdecl.v_arguments.storage_class |= STC.temp | STC.parameter; funcdecl.v_arguments.dsymbolSemantic(sc2); sc2.insert(funcdecl.v_arguments); funcdecl.v_arguments.parent = funcdecl; //Type t = Type.dtypeinfo.type.constOf().arrayOf(); Type t = Type.dtypeinfo.type.arrayOf(); _arguments = new VarDeclaration(funcdecl.loc, t, Id._arguments, null); _arguments.storage_class |= STC.temp; _arguments.dsymbolSemantic(sc2); sc2.insert(_arguments); _arguments.parent = funcdecl; } if (f.linkage == LINK.d || f.parameterList.length) { // Declare _argptr Type t = Type.tvalist; // Init is handled in FuncDeclaration_toObjFile funcdecl.v_argptr = new VarDeclaration(funcdecl.loc, t, Id._argptr, new VoidInitializer(funcdecl.loc)); funcdecl.v_argptr.storage_class |= STC.temp; funcdecl.v_argptr.dsymbolSemantic(sc2); sc2.insert(funcdecl.v_argptr); funcdecl.v_argptr.parent = funcdecl; } } /* Declare all the function parameters as variables * and install them in parameters[] */ size_t nparams = f.parameterList.length; if (nparams) { /* parameters[] has all the tuples removed, as the back end * doesn't know about tuples */ funcdecl.parameters = new VarDeclarations(); funcdecl.parameters.reserve(nparams); for (size_t i = 0; i < nparams; i++) { Parameter fparam = f.parameterList[i]; Identifier id = fparam.ident; StorageClass stc = 0; if (!id) { /* Generate identifier for un-named parameter, * because we need it later on. */ fparam.ident = id = Identifier.generateId("_param_", i); stc |= STC.temp; } Type vtype = fparam.type; auto v = new VarDeclaration(funcdecl.loc, vtype, id, null); //printf("declaring parameter %s of type %s\n", v.toChars(), v.type.toChars()); stc |= STC.parameter; if (f.parameterList.varargs == VarArg.typesafe && i + 1 == nparams) { stc |= STC.variadic; auto vtypeb = vtype.toBasetype(); if (vtypeb.ty == Tarray) { /* Since it'll be pointing into the stack for the array * contents, it needs to be `scope` */ stc |= STC.scope_; } } if (funcdecl.flags & FUNCFLAG.inferScope && !(fparam.storageClass & STC.scope_)) stc |= STC.maybescope; stc |= fparam.storageClass & (STC.in_ | STC.out_ | STC.ref_ | STC.return_ | STC.scope_ | STC.lazy_ | STC.final_ | STC.TYPECTOR | STC.nodtor); v.storage_class = stc; v.dsymbolSemantic(sc2); if (!sc2.insert(v)) { funcdecl.error("parameter `%s.%s` is already defined", funcdecl.toChars(), v.toChars()); funcdecl.errors = true; } else funcdecl.parameters.push(v); funcdecl.localsymtab.insert(v); v.parent = funcdecl; if (fparam.userAttribDecl) v.userAttribDecl = fparam.userAttribDecl; } } // Declare the tuple symbols and put them in the symbol table, // but not in parameters[]. if (f.parameterList.parameters) { for (size_t i = 0; i < f.parameterList.parameters.dim; i++) { Parameter fparam = (*f.parameterList.parameters)[i]; if (!fparam.ident) continue; // never used, so ignore if (fparam.type.ty == Ttuple) { TypeTuple t = cast(TypeTuple)fparam.type; size_t dim = Parameter.dim(t.arguments); auto exps = new Objects(dim); for (size_t j = 0; j < dim; j++) { Parameter narg = Parameter.getNth(t.arguments, j); assert(narg.ident); VarDeclaration v = sc2.search(Loc.initial, narg.ident, null).isVarDeclaration(); assert(v); Expression e = new VarExp(v.loc, v); (*exps)[j] = e; } assert(fparam.ident); auto v = new TupleDeclaration(funcdecl.loc, fparam.ident, exps); //printf("declaring tuple %s\n", v.toChars()); v.isexp = true; if (!sc2.insert(v)) funcdecl.error("parameter `%s.%s` is already defined", funcdecl.toChars(), v.toChars()); funcdecl.localsymtab.insert(v); v.parent = funcdecl; } } } // Precondition invariant Statement fpreinv = null; if (funcdecl.addPreInvariant()) { Expression e = addInvariant(funcdecl.loc, sc, ad, funcdecl.vthis); if (e) fpreinv = new ExpStatement(Loc.initial, e); } // Postcondition invariant Statement fpostinv = null; if (funcdecl.addPostInvariant()) { Expression e = addInvariant(funcdecl.loc, sc, ad, funcdecl.vthis); if (e) fpostinv = new ExpStatement(Loc.initial, e); } // Pre/Postcondition contract if (!funcdecl.fbody) funcdecl.buildEnsureRequire(); Scope* scout = null; if (needEnsure || funcdecl.addPostInvariant()) { /* https://issues.dlang.org/show_bug.cgi?id=3657 * Set the correct end line number for fensure scope. */ uint fensure_endlin = funcdecl.endloc.linnum; if (funcdecl.fensure) if (auto s = funcdecl.fensure.isScopeStatement()) fensure_endlin = s.endloc.linnum; if ((needEnsure && global.params.useOut == CHECKENABLE.on) || fpostinv) { funcdecl.returnLabel = funcdecl.searchLabel(Id.returnLabel); } // scope of out contract (need for vresult.semantic) auto sym = new ScopeDsymbol(funcdecl.loc, null); sym.parent = sc2.scopesym; sym.endlinnum = fensure_endlin; scout = sc2.push(sym); } if (funcdecl.fbody) { auto sym = new ScopeDsymbol(funcdecl.loc, null); sym.parent = sc2.scopesym; sym.endlinnum = funcdecl.endloc.linnum; sc2 = sc2.push(sym); auto ad2 = funcdecl.isMemberLocal(); /* If this is a class constructor */ if (ad2 && funcdecl.isCtorDeclaration()) { sc2.ctorflow.allocFieldinit(ad2.fields.dim); foreach (v; ad2.fields) { v.ctorinit = 0; } } if (!funcdecl.inferRetType && !target.isReturnOnStack(f, funcdecl.needThis())) funcdecl.nrvo_can = 0; bool inferRef = (f.isref && (funcdecl.storage_class & STC.auto_)); funcdecl.fbody = funcdecl.fbody.statementSemantic(sc2); if (!funcdecl.fbody) funcdecl.fbody = new CompoundStatement(Loc.initial, new Statements()); if (funcdecl.naked) { fpreinv = null; // can't accommodate with no stack frame fpostinv = null; } assert(funcdecl.type == f || (funcdecl.type.ty == Tfunction && f.purity == PURE.impure && (cast(TypeFunction)funcdecl.type).purity >= PURE.fwdref)); f = cast(TypeFunction)funcdecl.type; if (funcdecl.inferRetType) { // If no return type inferred yet, then infer a void if (!f.next) f.next = Type.tvoid; if (f.checkRetType(funcdecl.loc)) funcdecl.fbody = new ErrorStatement(); } if (global.params.vcomplex && f.next !is null) f.next.checkComplexTransition(funcdecl.loc, sc); if (funcdecl.returns && !funcdecl.fbody.isErrorStatement()) { for (size_t i = 0; i < funcdecl.returns.dim;) { Expression exp = (*funcdecl.returns)[i].exp; if (exp.op == TOK.variable && (cast(VarExp)exp).var == funcdecl.vresult) { if (addReturn0()) exp.type = Type.tint32; else exp.type = f.next; // Remove `return vresult;` from returns funcdecl.returns.remove(i); continue; } if (inferRef && f.isref && !exp.type.constConv(f.next)) // https://issues.dlang.org/show_bug.cgi?id=13336 f.isref = false; i++; } } if (f.isref) // Function returns a reference { if (funcdecl.storage_class & STC.auto_) funcdecl.storage_class &= ~STC.auto_; } if (!target.isReturnOnStack(f, funcdecl.needThis())) funcdecl.nrvo_can = 0; if (funcdecl.fbody.isErrorStatement()) { } else if (funcdecl.isStaticCtorDeclaration()) { /* It's a static constructor. Ensure that all * ctor consts were initialized. */ ScopeDsymbol pd = funcdecl.toParent().isScopeDsymbol(); for (size_t i = 0; i < pd.members.dim; i++) { Dsymbol s = (*pd.members)[i]; s.checkCtorConstInit(); } } else if (ad2 && funcdecl.isCtorDeclaration()) { ClassDeclaration cd = ad2.isClassDeclaration(); // Verify that all the ctorinit fields got initialized if (!(sc2.ctorflow.callSuper & CSX.this_ctor)) { foreach (i, v; ad2.fields) { if (v.isThisDeclaration()) continue; if (v.ctorinit == 0) { /* Current bugs in the flow analysis: * 1. union members should not produce error messages even if * not assigned to * 2. structs should recognize delegating opAssign calls as well * as delegating calls to other constructors */ if (v.isCtorinit() && !v.type.isMutable() && cd) funcdecl.error("missing initializer for %s field `%s`", MODtoChars(v.type.mod), v.toChars()); else if (v.storage_class & STC.nodefaultctor) error(funcdecl.loc, "field `%s` must be initialized in constructor", v.toChars()); else if (v.type.needsNested()) error(funcdecl.loc, "field `%s` must be initialized in constructor, because it is nested struct", v.toChars()); } else { bool mustInit = (v.storage_class & STC.nodefaultctor || v.type.needsNested()); if (mustInit && !(sc2.ctorflow.fieldinit[i].csx & CSX.this_ctor)) { funcdecl.error("field `%s` must be initialized but skipped", v.toChars()); } } } } sc2.ctorflow.freeFieldinit(); if (cd && !(sc2.ctorflow.callSuper & CSX.any_ctor) && cd.baseClass && cd.baseClass.ctor) { sc2.ctorflow.callSuper = CSX.none; // Insert implicit super() at start of fbody Type tthis = ad2.type.addMod(funcdecl.vthis.type.mod); FuncDeclaration fd = resolveFuncCall(Loc.initial, sc2, cd.baseClass.ctor, null, tthis, null, FuncResolveFlag.quiet); if (!fd) { funcdecl.error("no match for implicit `super()` call in constructor"); } else if (fd.storage_class & STC.disable) { funcdecl.error("cannot call `super()` implicitly because it is annotated with `@disable`"); } else { Expression e1 = new SuperExp(Loc.initial); Expression e = new CallExp(Loc.initial, e1); e = e.expressionSemantic(sc2); Statement s = new ExpStatement(Loc.initial, e); funcdecl.fbody = new CompoundStatement(Loc.initial, s, funcdecl.fbody); } } //printf("ctorflow.callSuper = x%x\n", sc2.ctorflow.callSuper); } /* https://issues.dlang.org/show_bug.cgi?id=17502 * Wait until after the return type has been inferred before * generating the contracts for this function, and merging contracts * from overrides. * * https://issues.dlang.org/show_bug.cgi?id=17893 * However should take care to generate this before inferered * function attributes are applied, such as 'nothrow'. * * This was originally at the end of the first semantic pass, but * required a fix-up to be done here for the '__result' variable * type of __ensure() inside auto functions, but this didn't work * if the out parameter was implicit. */ funcdecl.buildEnsureRequire(); // Check for errors related to 'nothrow'. const blockexit = funcdecl.fbody.blockExit(funcdecl, f.isnothrow); if (f.isnothrow && blockexit & BE.throw_) error(funcdecl.loc, "`nothrow` %s `%s` may throw", funcdecl.kind(), funcdecl.toPrettyChars()); if (!(blockexit & (BE.throw_ | BE.halt) || funcdecl.flags & FUNCFLAG.hasCatches)) { /* Disable optimization on Win32 due to * https://issues.dlang.org/show_bug.cgi?id=17997 */ // if (!global.params.isWindows || global.params.is64bit) funcdecl.eh_none = true; // don't generate unwind tables for this function } if (funcdecl.flags & FUNCFLAG.nothrowInprocess) { if (funcdecl.type == f) f = cast(TypeFunction)f.copy(); f.isnothrow = !(blockexit & BE.throw_); } if (funcdecl.fbody.isErrorStatement()) { } else if (ad2 && funcdecl.isCtorDeclaration()) { /* Append: * return this; * to function body */ if (blockexit & BE.fallthru) { Statement s = new ReturnStatement(funcdecl.loc, null); s = s.statementSemantic(sc2); funcdecl.fbody = new CompoundStatement(funcdecl.loc, funcdecl.fbody, s); funcdecl.hasReturnExp |= (funcdecl.hasReturnExp & 1 ? 16 : 1); } } else if (funcdecl.fes) { // For foreach(){} body, append a return 0; if (blockexit & BE.fallthru) { Expression e = IntegerExp.literal!0; Statement s = new ReturnStatement(Loc.initial, e); funcdecl.fbody = new CompoundStatement(Loc.initial, funcdecl.fbody, s); funcdecl.hasReturnExp |= (funcdecl.hasReturnExp & 1 ? 16 : 1); } assert(!funcdecl.returnLabel); } else { const(bool) inlineAsm = (funcdecl.hasReturnExp & 8) != 0; if ((blockexit & BE.fallthru) && f.next.ty != Tvoid && !inlineAsm) { Expression e; if (!funcdecl.hasReturnExp) funcdecl.error("has no `return` statement, but is expected to return a value of type `%s`", f.next.toChars()); else funcdecl.error("no `return exp;` or `assert(0);` at end of function"); if (global.params.useAssert == CHECKENABLE.on && !global.params.useInline) { /* Add an assert(0, msg); where the missing return * should be. */ e = new AssertExp(funcdecl.endloc, IntegerExp.literal!0, new StringExp(funcdecl.loc, cast(char*)"missing return expression")); } else e = new HaltExp(funcdecl.endloc); e = new CommaExp(Loc.initial, e, f.next.defaultInit(Loc.initial)); e = e.expressionSemantic(sc2); Statement s = new ExpStatement(Loc.initial, e); funcdecl.fbody = new CompoundStatement(Loc.initial, funcdecl.fbody, s); } } if (funcdecl.returns) { bool implicit0 = addReturn0(); Type tret = implicit0 ? Type.tint32 : f.next; assert(tret.ty != Tvoid); if (funcdecl.vresult || funcdecl.returnLabel) funcdecl.buildResultVar(scout ? scout : sc2, tret); /* Cannot move this loop into NrvoWalker, because * returns[i] may be in the nested delegate for foreach-body. */ for (size_t i = 0; i < funcdecl.returns.dim; i++) { ReturnStatement rs = (*funcdecl.returns)[i]; Expression exp = rs.exp; if (exp.op == TOK.error) continue; if (tret.ty == Terror) { // https://issues.dlang.org/show_bug.cgi?id=13702 exp = checkGC(sc2, exp); continue; } /* If the expression in the return statement (exp) cannot be implicitly * converted to the return type (tret) of the function and if the * type of the expression is type isolated, then it may be possible * that a promotion to `immutable` or `inout` (through a cast) will * match the return type. */ if (!exp.implicitConvTo(tret) && funcdecl.isTypeIsolated(exp.type)) { /* https://issues.dlang.org/show_bug.cgi?id=20073 * * The problem is that if the type of the returned expression (exp.type) * is an aggregated declaration with an alias this, the alias this may be * used for the conversion testing without it being an isolated type. * * To make sure this does not happen, we can test here the implicit conversion * only for the aggregated declaration type by using `implicitConvToWithoutAliasThis`. * The implicit conversion with alias this is taken care of later. */ AggregateDeclaration aggDecl = isAggregate(exp.type); TypeStruct tstruct; TypeClass tclass; bool hasAliasThis; if (aggDecl && aggDecl.aliasthis) { hasAliasThis = true; tclass = exp.type.isTypeClass(); if (!tclass) tstruct = exp.type.isTypeStruct(); assert(tclass || tstruct); } if (hasAliasThis) { if (tclass) { if ((cast(TypeClass)(exp.type.immutableOf())).implicitConvToWithoutAliasThis(tret)) exp = exp.castTo(sc2, exp.type.immutableOf()); else if ((cast(TypeClass)(exp.type.wildOf())).implicitConvToWithoutAliasThis(tret)) exp = exp.castTo(sc2, exp.type.wildOf()); } else { if ((cast(TypeStruct)exp.type.immutableOf()).implicitConvToWithoutAliasThis(tret)) exp = exp.castTo(sc2, exp.type.immutableOf()); else if ((cast(TypeStruct)exp.type.immutableOf()).implicitConvToWithoutAliasThis(tret)) exp = exp.castTo(sc2, exp.type.wildOf()); } } else { if (exp.type.immutableOf().implicitConvTo(tret)) exp = exp.castTo(sc2, exp.type.immutableOf()); else if (exp.type.wildOf().implicitConvTo(tret)) exp = exp.castTo(sc2, exp.type.wildOf()); } } const hasCopyCtor = exp.type.ty == Tstruct && (cast(TypeStruct)exp.type).sym.hasCopyCtor; // if a copy constructor is present, the return type conversion will be handled by it if (!hasCopyCtor) exp = exp.implicitCastTo(sc2, tret); if (f.isref) { // Function returns a reference exp = exp.toLvalue(sc2, exp); checkReturnEscapeRef(sc2, exp, false); } else { exp = exp.optimize(WANTvalue); /* https://issues.dlang.org/show_bug.cgi?id=10789 * If NRVO is not possible, all returned lvalues should call their postblits. */ if (!funcdecl.nrvo_can) exp = doCopyOrMove(sc2, exp, f.next); if (tret.hasPointers()) checkReturnEscape(sc2, exp, false); } exp = checkGC(sc2, exp); if (funcdecl.vresult) { // Create: return vresult = exp; exp = new BlitExp(rs.loc, funcdecl.vresult, exp); exp.type = funcdecl.vresult.type; if (rs.caseDim) exp = Expression.combine(exp, new IntegerExp(rs.caseDim)); } else if (funcdecl.tintro && !tret.equals(funcdecl.tintro.nextOf())) { exp = exp.implicitCastTo(sc2, funcdecl.tintro.nextOf()); } rs.exp = exp; } } if (funcdecl.nrvo_var || funcdecl.returnLabel) { scope NrvoWalker nw = new NrvoWalker(); nw.fd = funcdecl; nw.sc = sc2; nw.visitStmt(funcdecl.fbody); } sc2 = sc2.pop(); } funcdecl.frequire = funcdecl.mergeFrequire(funcdecl.frequire, funcdecl.fdrequireParams); funcdecl.fensure = funcdecl.mergeFensure(funcdecl.fensure, Id.result, funcdecl.fdensureParams); Statement freq = funcdecl.frequire; Statement fens = funcdecl.fensure; /* Do the semantic analysis on the [in] preconditions and * [out] postconditions. */ if (freq) { /* frequire is composed of the [in] contracts */ auto sym = new ScopeDsymbol(funcdecl.loc, null); sym.parent = sc2.scopesym; sym.endlinnum = funcdecl.endloc.linnum; sc2 = sc2.push(sym); sc2.flags = (sc2.flags & ~SCOPE.contract) | SCOPE.require; // BUG: need to error if accessing out parameters // BUG: need to disallow returns and throws // BUG: verify that all in and ref parameters are read freq = freq.statementSemantic(sc2); freq.blockExit(funcdecl, false); funcdecl.eh_none = false; sc2 = sc2.pop(); if (global.params.useIn == CHECKENABLE.off) freq = null; } if (fens) { /* fensure is composed of the [out] contracts */ if (f.next.ty == Tvoid && funcdecl.fensures) { foreach (e; *funcdecl.fensures) { if (e.id) { funcdecl.error(e.ensure.loc, "`void` functions have no result"); //fens = null; } } } sc2 = scout; //push sc2.flags = (sc2.flags & ~SCOPE.contract) | SCOPE.ensure; // BUG: need to disallow returns and throws if (funcdecl.fensure && f.next.ty != Tvoid) funcdecl.buildResultVar(scout, f.next); fens = fens.statementSemantic(sc2); fens.blockExit(funcdecl, false); funcdecl.eh_none = false; sc2 = sc2.pop(); if (global.params.useOut == CHECKENABLE.off) fens = null; } if (funcdecl.fbody && funcdecl.fbody.isErrorStatement()) { } else { auto a = new Statements(); // Merge in initialization of 'out' parameters if (funcdecl.parameters) { for (size_t i = 0; i < funcdecl.parameters.dim; i++) { VarDeclaration v = (*funcdecl.parameters)[i]; if (v.storage_class & STC.out_) { if (!v._init) { v.error("Zero-length `out` parameters are not allowed."); return; } ExpInitializer ie = v._init.isExpInitializer(); assert(ie); if (auto iec = ie.exp.isConstructExp()) { // construction occurred in parameter processing auto ec = new AssignExp(iec.loc, iec.e1, iec.e2); ec.type = iec.type; ie.exp = ec; } a.push(new ExpStatement(Loc.initial, ie.exp)); } } } if (_arguments) { /* Advance to elements[] member of TypeInfo_Tuple with: * _arguments = v_arguments.elements; */ Expression e = new VarExp(Loc.initial, funcdecl.v_arguments); e = new DotIdExp(Loc.initial, e, Id.elements); e = new ConstructExp(Loc.initial, _arguments, e); e = e.expressionSemantic(sc2); _arguments._init = new ExpInitializer(Loc.initial, e); auto de = new DeclarationExp(Loc.initial, _arguments); a.push(new ExpStatement(Loc.initial, de)); } // Merge contracts together with body into one compound statement if (freq || fpreinv) { if (!freq) freq = fpreinv; else if (fpreinv) freq = new CompoundStatement(Loc.initial, freq, fpreinv); a.push(freq); } if (funcdecl.fbody) a.push(funcdecl.fbody); if (fens || fpostinv) { if (!fens) fens = fpostinv; else if (fpostinv) fens = new CompoundStatement(Loc.initial, fpostinv, fens); auto ls = new LabelStatement(Loc.initial, Id.returnLabel, fens); funcdecl.returnLabel.statement = ls; a.push(funcdecl.returnLabel.statement); if (f.next.ty != Tvoid && funcdecl.vresult) { // Create: return vresult; Expression e = new VarExp(Loc.initial, funcdecl.vresult); if (funcdecl.tintro) { e = e.implicitCastTo(sc, funcdecl.tintro.nextOf()); e = e.expressionSemantic(sc); } auto s = new ReturnStatement(Loc.initial, e); a.push(s); } } if (addReturn0()) { // Add a return 0; statement Statement s = new ReturnStatement(Loc.initial, IntegerExp.literal!0); a.push(s); } Statement sbody = new CompoundStatement(Loc.initial, a); /* Append destructor calls for parameters as finally blocks. */ if (funcdecl.parameters) { foreach (v; *funcdecl.parameters) { if (v.storage_class & (STC.ref_ | STC.out_ | STC.lazy_)) continue; if (v.needsScopeDtor()) { // same with ExpStatement.scopeCode() Statement s = new DtorExpStatement(Loc.initial, v.edtor, v); v.storage_class |= STC.nodtor; s = s.statementSemantic(sc2); bool isnothrow = f.isnothrow & !(funcdecl.flags & FUNCFLAG.nothrowInprocess); const blockexit = s.blockExit(funcdecl, isnothrow); if (blockexit & BE.throw_) funcdecl.eh_none = false; if (f.isnothrow && isnothrow && blockexit & BE.throw_) error(funcdecl.loc, "`nothrow` %s `%s` may throw", funcdecl.kind(), funcdecl.toPrettyChars()); if (funcdecl.flags & FUNCFLAG.nothrowInprocess && blockexit & BE.throw_) f.isnothrow = false; if (sbody.blockExit(funcdecl, f.isnothrow) == BE.fallthru) sbody = new CompoundStatement(Loc.initial, sbody, s); else sbody = new TryFinallyStatement(Loc.initial, sbody, s); } } } // from this point on all possible 'throwers' are checked funcdecl.flags &= ~FUNCFLAG.nothrowInprocess; if (funcdecl.isSynchronized()) { /* Wrap the entire function body in a synchronized statement */ ClassDeclaration cd = funcdecl.toParentDecl().isClassDeclaration(); if (cd) { if (!global.params.is64bit && global.params.isWindows && !funcdecl.isStatic() && !sbody.usesEH() && !global.params.trace) { /* The back end uses the "jmonitor" hack for syncing; * no need to do the sync at this level. */ } else { Expression vsync; if (funcdecl.isStatic()) { // The monitor is in the ClassInfo vsync = new DotIdExp(funcdecl.loc, symbolToExp(cd, funcdecl.loc, sc2, false), Id.classinfo); } else { // 'this' is the monitor vsync = new VarExp(funcdecl.loc, funcdecl.vthis); if (funcdecl.isThis2) { vsync = new PtrExp(funcdecl.loc, vsync); vsync = new IndexExp(funcdecl.loc, vsync, IntegerExp.literal!0); } } sbody = new PeelStatement(sbody); // don't redo semantic() sbody = new SynchronizedStatement(funcdecl.loc, vsync, sbody); sbody = sbody.statementSemantic(sc2); } } else { funcdecl.error("synchronized function `%s` must be a member of a class", funcdecl.toChars()); } } // If declaration has no body, don't set sbody to prevent incorrect codegen. if (funcdecl.fbody || funcdecl.allowsContractWithoutBody()) funcdecl.fbody = sbody; } // Check for undefined labels if (funcdecl.labtab) foreach (keyValue; funcdecl.labtab.tab.asRange) { //printf(" KV: %s = %s\n", keyValue.key.toChars(), keyValue.value.toChars()); LabelDsymbol label = cast(LabelDsymbol)keyValue.value; if (!label.statement && (!label.deleted || label.iasm)) { funcdecl.error("label `%s` is undefined", label.toChars()); } } // Fix up forward-referenced gotos if (funcdecl.gotos) { for (size_t i = 0; i < funcdecl.gotos.dim; ++i) { (*funcdecl.gotos)[i].checkLabel(); } } if (funcdecl.naked && (funcdecl.fensures || funcdecl.frequires)) funcdecl.error("naked assembly functions with contracts are not supported"); sc2.ctorflow.callSuper = CSX.none; sc2.pop(); } if (funcdecl.checkClosure()) { // We should be setting errors here instead of relying on the global error count. //errors = true; } /* If function survived being marked as impure, then it is pure */ if (funcdecl.flags & FUNCFLAG.purityInprocess) { funcdecl.flags &= ~FUNCFLAG.purityInprocess; if (funcdecl.type == f) f = cast(TypeFunction)f.copy(); f.purity = PURE.fwdref; } if (funcdecl.flags & FUNCFLAG.safetyInprocess) { funcdecl.flags &= ~FUNCFLAG.safetyInprocess; if (funcdecl.type == f) f = cast(TypeFunction)f.copy(); f.trust = TRUST.safe; } if (funcdecl.flags & FUNCFLAG.nogcInprocess) { funcdecl.flags &= ~FUNCFLAG.nogcInprocess; if (funcdecl.type == f) f = cast(TypeFunction)f.copy(); f.isnogc = true; } if (funcdecl.flags & FUNCFLAG.returnInprocess) { funcdecl.flags &= ~FUNCFLAG.returnInprocess; if (funcdecl.storage_class & STC.return_) { if (funcdecl.type == f) f = cast(TypeFunction)f.copy(); f.isreturn = true; if (funcdecl.storage_class & STC.returninferred) f.isreturninferred = true; } } funcdecl.flags &= ~FUNCFLAG.inferScope; // Eliminate maybescope's { // Create and fill array[] with maybe candidates from the `this` and the parameters VarDeclaration[] array = void; VarDeclaration[10] tmp = void; size_t dim = (funcdecl.vthis !is null) + (funcdecl.parameters ? funcdecl.parameters.dim : 0); if (dim <= tmp.length) array = tmp[0 .. dim]; else { auto ptr = cast(VarDeclaration*)mem.xmalloc(dim * VarDeclaration.sizeof); array = ptr[0 .. dim]; } size_t n = 0; if (funcdecl.vthis) array[n++] = funcdecl.vthis; if (funcdecl.parameters) { foreach (v; *funcdecl.parameters) { array[n++] = v; } } eliminateMaybeScopes(array[0 .. n]); if (dim > tmp.length) mem.xfree(array.ptr); } // Infer STC.scope_ if (funcdecl.parameters && !funcdecl.errors) { size_t nfparams = f.parameterList.length; assert(nfparams == funcdecl.parameters.dim); foreach (u, v; *funcdecl.parameters) { if (v.storage_class & STC.maybescope) { //printf("Inferring scope for %s\n", v.toChars()); Parameter p = f.parameterList[u]; notMaybeScope(v); v.storage_class |= STC.scope_ | STC.scopeinferred; p.storageClass |= STC.scope_ | STC.scopeinferred; assert(!(p.storageClass & STC.maybescope)); } } } if (funcdecl.vthis && funcdecl.vthis.storage_class & STC.maybescope) { notMaybeScope(funcdecl.vthis); funcdecl.vthis.storage_class |= STC.scope_ | STC.scopeinferred; f.isscope = true; f.isscopeinferred = true; } // reset deco to apply inference result to mangled name if (f != funcdecl.type) f.deco = null; // Do semantic type AFTER pure/nothrow inference. if (!f.deco && funcdecl.ident != Id.xopEquals && funcdecl.ident != Id.xopCmp) { sc = sc.push(); if (funcdecl.isCtorDeclaration()) // https://issues.dlang.org/show_bug.cgi?id=#15665 sc.flags |= SCOPE.ctor; sc.stc = 0; sc.linkage = funcdecl.linkage; // https://issues.dlang.org/show_bug.cgi?id=8496 funcdecl.type = f.typeSemantic(funcdecl.loc, sc); sc = sc.pop(); } /* If this function had instantiated with gagging, error reproduction will be * done by TemplateInstance::semantic. * Otherwise, error gagging should be temporarily ungagged by functionSemantic3. */ funcdecl.semanticRun = PASS.semantic3done; funcdecl.semantic3Errors = (global.errors != oldErrors) || (funcdecl.fbody && funcdecl.fbody.isErrorStatement()); if (funcdecl.type.ty == Terror) funcdecl.errors = true; //printf("-FuncDeclaration::semantic3('%s.%s', sc = %p, loc = %s)\n", parent.toChars(), toChars(), sc, loc.toChars()); //fflush(stdout); } override void visit(CtorDeclaration ctor) { //printf("CtorDeclaration()\n%s\n", ctor.fbody.toChars()); if (ctor.semanticRun >= PASS.semantic3) return; /* If any of the fields of the aggregate have a destructor, add * scope (failure) { this.fieldDtor(); } * as the first statement. It is not necessary to add it after * each initialization of a field, because destruction of .init constructed * structs should be benign. * https://issues.dlang.org/show_bug.cgi?id=14246 */ AggregateDeclaration ad = ctor.isMemberDecl(); if (ad && ad.fieldDtor && global.params.dtorFields) { /* Generate: * this.fieldDtor() */ Expression e = new ThisExp(ctor.loc); e.type = ad.type.mutableOf(); e = new DotVarExp(ctor.loc, e, ad.fieldDtor, false); e = new CallExp(ctor.loc, e); auto sexp = new ExpStatement(ctor.loc, e); auto ss = new ScopeStatement(ctor.loc, sexp, ctor.loc); version (all) { /* Generate: * try { ctor.fbody; } * catch (Exception __o) * { this.fieldDtor(); throw __o; } * This differs from the alternate scope(failure) version in that an Exception * is caught rather than a Throwable. This enables the optimization whereby * the try-catch can be removed if ctor.fbody is nothrow. (nothrow only * applies to Exception.) */ Identifier id = Identifier.generateId("__o"); auto ts = new ThrowStatement(ctor.loc, new IdentifierExp(ctor.loc, id)); auto handler = new CompoundStatement(ctor.loc, ss, ts); auto catches = new Catches(); auto ctch = new Catch(ctor.loc, getException(), id, handler); catches.push(ctch); ctor.fbody = new TryCatchStatement(ctor.loc, ctor.fbody, catches); } else { /* Generate: * scope (failure) { this.fieldDtor(); } * Hopefully we can use this version someday when scope(failure) catches * Exception instead of Throwable. */ auto s = new ScopeGuardStatement(ctor.loc, TOK.onScopeFailure, ss); ctor.fbody = new CompoundStatement(ctor.loc, s, ctor.fbody); } } visit(cast(FuncDeclaration)ctor); } override void visit(Nspace ns) { if (ns.semanticRun >= PASS.semantic3) return; ns.semanticRun = PASS.semantic3; static if (LOG) { printf("Nspace::semantic3('%s')\n", ns.toChars()); } if (ns.members) { sc = sc.push(ns); sc.linkage = LINK.cpp; foreach (s; *ns.members) { s.semantic3(sc); } sc.pop(); } } override void visit(AttribDeclaration ad) { Dsymbols* d = ad.include(sc); if (d) { Scope* sc2 = ad.newScope(sc); for (size_t i = 0; i < d.dim; i++) { Dsymbol s = (*d)[i]; s.semantic3(sc2); } if (sc2 != sc) sc2.pop(); } } override void visit(AggregateDeclaration ad) { //printf("AggregateDeclaration::semantic3(sc=%p, %s) type = %s, errors = %d\n", sc, toChars(), type.toChars(), errors); if (!ad.members) return; StructDeclaration sd = ad.isStructDeclaration(); if (!sc) // from runDeferredSemantic3 for TypeInfo generation { assert(sd); sd.semanticTypeInfoMembers(); return; } auto sc2 = ad.newScope(sc); for (size_t i = 0; i < ad.members.dim; i++) { Dsymbol s = (*ad.members)[i]; s.semantic3(sc2); } sc2.pop(); // don't do it for unused deprecated types // or error ypes if (!ad.getRTInfo && Type.rtinfo && (!ad.isDeprecated() || global.params.useDeprecated != DiagnosticReporting.error) && (ad.type && ad.type.ty != Terror)) { // Evaluate: RTinfo!type auto tiargs = new Objects(); tiargs.push(ad.type); auto ti = new TemplateInstance(ad.loc, Type.rtinfo, tiargs); Scope* sc3 = ti.tempdecl._scope.startCTFE(); sc3.tinst = sc.tinst; sc3.minst = sc.minst; if (ad.isDeprecated()) sc3.stc |= STC.deprecated_; ti.dsymbolSemantic(sc3); ti.semantic2(sc3); ti.semantic3(sc3); auto e = symbolToExp(ti.toAlias(), Loc.initial, sc3, false); sc3.endCTFE(); e = e.ctfeInterpret(); ad.getRTInfo = e; } if (sd) sd.semanticTypeInfoMembers(); ad.semanticRun = PASS.semantic3done; } } private struct FuncDeclSem3 { // The FuncDeclaration subject to Semantic analysis FuncDeclaration funcdecl; // Scope of analysis Scope* sc; this(FuncDeclaration fd,Scope* s) { funcdecl = fd; sc = s; } /* Checks that the overriden functions (if any) have in contracts if * funcdecl has an in contract. */ void checkInContractOverrides() { if (funcdecl.frequires) { for (size_t i = 0; i < funcdecl.foverrides.dim; i++) { FuncDeclaration fdv = funcdecl.foverrides[i]; if (fdv.fbody && !fdv.frequires) { funcdecl.error("cannot have an in contract when overridden function `%s` does not have an in contract", fdv.toPrettyChars()); break; } } } } }
D
module game.model.cache; /* PhysicsCache (former name: StateManager) holds many states, and knows when * to auto-save. Feed the StateManager with the current state all the time, * feed to function autoSave(). That will nop often. */ import std.algorithm; import std.range; import std.typecons; import core.memory; // GC.collect(); import basics.help; // clone(T[]), a deep copy for arrays import game.replay; import game.model.state; import hardware.tharsis; import net.repdata; import std.string; // format enum DuringTurbo : bool { no = false, yes = true } class PhysicsCache { private: enum updatesMostFrequentPair = 10; enum updatesMultiplierNextPairIsSlowerBy = 5; // 10, 50, 250, 1250 enum pairsToKeep = 4; GameState _zero; GameState _userState; GameState[2 * pairsToKeep] _auto; // For the user-triggered save (_user), remember the replay that was // correct by then. Otherwise, the user could restart, do something // deviating, and then load the user state that supposes the old, // differing replay. Replay _userReplay; public: void dispose() { destroy(_zero); destroy(_userState); foreach (ref gs; _auto) destroy(gs); assert (! _auto[0].refCountedStore.isInitialized); } void saveZero(in GameState s) { _zero = s.clone(); } @property Phyu zeroStatePhyu() const { assert (_zero.refCountedStore.isInitialized); return _zero.update; } void saveUser(in GameState s, in Replay r) { _userState = s.clone(); assert (r); if (_userReplay is null || ! r.firstDifference(_userReplay).thisBeginsWithRhs) // r has info that _userReplay hasn't, store r _userReplay = r.clone(); } bool userStateExists() const { return _userReplay !is null; } // Depending on mismatches between Nurse's replay and our saved replay, // some cached states must be invalidated. Fixes user-stateload desyncs. auto loadUser(in Replay nurseReplay) in { assert (userStateExists, "don't load if there is nothing to load"); assert (nurseReplay, "need reference so I know what to invalidate"); } body { auto deleteAfter = _userState.update; auto diff = _userReplay.firstDifference(nurseReplay); if (diff.mismatch && diff.firstDifferenceIfMismatch < deleteAfter) deleteAfter = diff.firstDifferenceIfMismatch; forgetAutoSavesOnAndAfter(deleteAfter); struct Ret { const(GameState) state; const(Replay) replay; FirstDifference loadedVsNurseReplay; } return Ret(_userState, _userReplay, diff); } const(GameState) loadBeforePhyu(in Phyu u) { GameState ret = _zero; foreach (gs; _auto) if ( gs.refCountedStore.isInitialized && gs.update < u && gs.update > ret.update) ret = gs; forgetAutoSavesOnAndAfter(u); return ret; } bool wouldAutoSave( in GameState s, in Phyu updTo, in DuringTurbo duringTurbo) const { immutable pair = duringTurbo ? 1 : 0; assert (pair >= 0 && pair < pairsToKeep); if (s.update == 0 || s.update % updateMultipleForPair(pair) != 0) return false; foreach (possible; pair .. pairsToKeep) // We save 2 states per update multiple. But when we want to update // 100 times, there is no need saving states after 10, 20, 30, ... // updates, we would only keep the states at 90 and 100, anyway. // And the state at 50 and 100, in a higher pair. if (s.update > updTo - 2 * updateMultipleForPair(possible) && s.update % updateMultipleForPair(possible) == 0) return true; return false; } void autoSave(in GameState s, in Phyu ultimatelyTo) { if (! wouldAutoSave(s, ultimatelyTo, DuringTurbo.no)) return; // Potentially push older auto-saved states down the hierarchy. // First, if it's time to copy a frequent state into a less frequent // state, make these copies. Start with least frequent copying the // second-to-least freqent. // After copying the internal states like that, save s into the most // frequently updated pair. The most frequently updated pair has // array indices 0 and 1. The next one has array indices 2 and 3, ... for (int pair = pairsToKeep - 1; pair >= 0; --pair) { immutable int umfp = updateMultipleForPair(pair); if (s.update % umfp == 0) { int whichOfPair = (s.update / umfp) % 2; if (pair > 0) // Make a shallow copy of the more-frequently-hit state: // We treat states inside PhysicsCache like immutable. // Only clone when we return to outside of PhysicsCache. _auto[2*pair + whichOfPair] = _auto[2*(pair-1)]; else // Make a hard copy of the current state. _auto[0 + whichOfPair] = s.clone(); } } } private: void forgetAutoSavesOnAndAfter(in Phyu u) { foreach (ref GameState gs; _auto) if (gs.refCountedStore.isInitialized && gs.update >= u) destroy(gs); } int updateMultipleForPair(in int pair) const pure { assert (pair >= 0 && pair < pairsToKeep); int ret = updatesMostFrequentPair; foreach (i; 0 .. pair) ret *= updatesMultiplierNextPairIsSlowerBy; return ret; } } // end class StateManager
D
/** Fundamental operations for arbitrary-precision arithmetic * * These functions are for internal use only. */ /* Copyright Don Clugston 2008 - 2010. * 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) */ /* References: "Modern Computer Arithmetic" (MCA) is the primary reference for all algorithms used in this library. - R.P. Brent and P. Zimmermann, "Modern Computer Arithmetic", Version 0.5.9, (Oct 2010). - C. Burkinel and J. Ziegler, "Fast Recursive Division", MPI-I-98-1-022, Max-Planck Institute fuer Informatik, (Oct 1998). - G. Hanrot, M. Quercia, and P. Zimmermann, "The Middle Product Algorithm, I.", INRIA 4664, (Dec 2002). - M. Bodrato and A. Zanoni, "What about Toom-Cook Matrices Optimality?", http://bodrato.it/papers (2006). - A. Fog, "Optimizing subroutines in assembly language", www.agner.org/optimize (2008). - A. Fog, "The microarchitecture of Intel and AMD CPU's", www.agner.org/optimize (2008). - A. Fog, "Instruction tables: Lists of instruction latencies, throughputs and micro-operation breakdowns for Intel and AMD CPU's.", www.agner.org/optimize (2008). Idioms: Many functions in this module use 'func(Tulong)(Tulong x) if (is(Tulong == ulong))' rather than 'func(ulong x)' in order to disable implicit conversion. */ module std.internal.math.biguintcore; version(D_InlineAsm_X86) { import std.internal.math.biguintx86; } else { import std.internal.math.biguintnoasm; } alias multibyteAdd = multibyteAddSub!('+'); alias multibyteSub = multibyteAddSub!('-'); private import core.cpuid; private import std.traits : Unqual; shared static this() { CACHELIMIT = core.cpuid.datacache[0].size*1024/2; FASTDIVLIMIT = 100; } private: // Limits for when to switch between algorithms. immutable size_t CACHELIMIT; // Half the size of the data cache. immutable size_t FASTDIVLIMIT; // crossover to recursive division // These constants are used by shift operations static if (BigDigit.sizeof == int.sizeof) { enum { LG2BIGDIGITBITS = 5, BIGDIGITSHIFTMASK = 31 }; alias BIGHALFDIGIT = ushort; } else static if (BigDigit.sizeof == long.sizeof) { alias BIGHALFDIGIT = uint; enum { LG2BIGDIGITBITS = 6, BIGDIGITSHIFTMASK = 63 }; } else static assert(0, "Unsupported BigDigit size"); private import std.exception : assumeUnique; private import std.traits:isIntegral; enum BigDigitBits = BigDigit.sizeof*8; template maxBigDigits(T) if (isIntegral!T) { enum maxBigDigits = (T.sizeof+BigDigit.sizeof-1)/BigDigit.sizeof; } enum immutable(BigDigit) [] ZERO = [0]; enum immutable(BigDigit) [] ONE = [1]; enum immutable(BigDigit) [] TWO = [2]; enum immutable(BigDigit) [] TEN = [10]; public: /// BigUint performs memory management and wraps the low-level calls. struct BigUint { private: pure invariant() { assert( data.length >= 1 && (data.length == 1 || data[$-1] != 0 )); } immutable(BigDigit) [] data = ZERO; this(immutable(BigDigit) [] x) pure { data = x; } this(T)(T x) pure if (isIntegral!T) { opAssign(x); } public: // Length in uints size_t uintLength() pure const { static if (BigDigit.sizeof == uint.sizeof) { return data.length; } else static if (BigDigit.sizeof == ulong.sizeof) { return data.length * 2 - ((data[$-1] & 0xFFFF_FFFF_0000_0000L) ? 1 : 0); } } size_t ulongLength() pure const { static if (BigDigit.sizeof == uint.sizeof) { return (data.length + 1) >> 1; } else static if (BigDigit.sizeof == ulong.sizeof) { return data.length; } } // The value at (cast(ulong[])data)[n] ulong peekUlong(int n) pure const { static if (BigDigit.sizeof == int.sizeof) { if (data.length == n*2 + 1) return data[n*2]; return data[n*2] + ((cast(ulong)data[n*2 + 1]) << 32 ); } else static if (BigDigit.sizeof == long.sizeof) { return data[n]; } } uint peekUint(int n) pure const { static if (BigDigit.sizeof == int.sizeof) { return data[n]; } else { ulong x = data[n >> 1]; return (n & 1) ? cast(uint)(x >> 32) : cast(uint)x; } } public: /// void opAssign(Tulong)(Tulong u) pure if (is (Tulong == ulong)) { if (u == 0) data = ZERO; else if (u == 1) data = ONE; else if (u == 2) data = TWO; else if (u == 10) data = TEN; else { static if (BigDigit.sizeof == int.sizeof) { uint ulo = cast(uint)(u & 0xFFFF_FFFF); uint uhi = cast(uint)(u >> 32); if (uhi == 0) { data = [ulo]; } else { data = [ulo, uhi]; } } else static if (BigDigit.sizeof == long.sizeof) { data = [u]; } } } void opAssign(Tdummy = void)(BigUint y) pure { this.data = y.data; } /// int opCmp(Tdummy = void)(const BigUint y) pure const { if (data.length != y.data.length) return (data.length > y.data.length) ? 1 : -1; size_t k = highestDifferentDigit(data, y.data); if (data[k] == y.data[k]) return 0; return data[k] > y.data[k] ? 1 : -1; } /// int opCmp(Tulong)(Tulong y) pure const if(is (Tulong == ulong)) { if (data.length > maxBigDigits!Tulong) return 1; foreach_reverse (i; 0 .. maxBigDigits!Tulong) { BigDigit tmp = cast(BigDigit)(y>>(i*BigDigitBits)); if (tmp == 0) if (data.length >= i+1) { // Since ZERO is [0], so we cannot simply return 1 here, as // data[i] would be 0 for i==0 in that case. return (data[i] > 0) ? 1 : 0; } else continue; else if (i+1 > data.length) return -1; else if (tmp != data[i]) return data[i] > tmp ? 1 : -1; } return 0; } bool opEquals(Tdummy = void)(ref const BigUint y) pure const { return y.data[] == data[]; } bool opEquals(Tdummy = void)(ulong y) pure const { if (data.length > 2) return false; uint ylo = cast(uint)(y & 0xFFFF_FFFF); uint yhi = cast(uint)(y >> 32); if (data.length==2 && data[1]!=yhi) return false; if (data.length==1 && yhi!=0) return false; return (data[0] == ylo); } bool isZero() pure const nothrow @safe { return data.length == 1 && data[0] == 0; } size_t numBytes() pure const { return data.length * BigDigit.sizeof; } // the extra bytes are added to the start of the string char [] toDecimalString(int frontExtraBytes) const pure { auto predictlength = 20+20*(data.length/2); // just over 19 char [] buff = new char[frontExtraBytes + predictlength]; ptrdiff_t sofar = biguintToDecimal(buff, data.dup); return buff[sofar-frontExtraBytes..$]; } /** Convert to a hex string, printing a minimum number of digits 'minPadding', * allocating an additional 'frontExtraBytes' at the start of the string. * Padding is done with padChar, which may be '0' or ' '. * 'separator' is a digit separation character. If non-zero, it is inserted * between every 8 digits. * Separator characters do not contribute to the minPadding. */ char [] toHexString(int frontExtraBytes, char separator = 0, int minPadding=0, char padChar = '0') const pure { // Calculate number of extra padding bytes size_t extraPad = (minPadding > data.length * 2 * BigDigit.sizeof) ? minPadding - data.length * 2 * BigDigit.sizeof : 0; // Length not including separator bytes size_t lenBytes = data.length * 2 * BigDigit.sizeof; // Calculate number of separator bytes size_t mainSeparatorBytes = separator ? (lenBytes / 8) - 1 : 0; size_t totalSeparatorBytes = separator ? ((extraPad + lenBytes + 7) / 8) - 1: 0; char [] buff = new char[lenBytes + extraPad + totalSeparatorBytes + frontExtraBytes]; biguintToHex(buff[$ - lenBytes - mainSeparatorBytes .. $], data, separator); if (extraPad > 0) { if (separator) { size_t start = frontExtraBytes; // first index to pad if (extraPad &7) { // Do 1 to 7 extra zeros. buff[frontExtraBytes .. frontExtraBytes + (extraPad & 7)] = padChar; buff[frontExtraBytes + (extraPad & 7)] = (padChar == ' ' ? ' ' : separator); start += (extraPad & 7) + 1; } for (int i=0; i< (extraPad >> 3); ++i) { buff[start .. start + 8] = padChar; buff[start + 8] = (padChar == ' ' ? ' ' : separator); start += 9; } } else { buff[frontExtraBytes .. frontExtraBytes + extraPad]=padChar; } } int z = frontExtraBytes; if (lenBytes > minPadding) { // Strip leading zeros. ptrdiff_t maxStrip = lenBytes - minPadding; while (z< buff.length-1 && (buff[z]=='0' || buff[z]==padChar) && maxStrip>0) { ++z; --maxStrip; } } if (padChar!='0') { // Convert leading zeros into padChars. for (size_t k= z; k< buff.length-1 && (buff[k]=='0' || buff[k]==padChar); ++k) { if (buff[k]=='0') buff[k]=padChar; } } return buff[z-frontExtraBytes..$]; } // return false if invalid character found bool fromHexString(const(char)[] s) pure { //Strip leading zeros int firstNonZero = 0; while ((firstNonZero < s.length - 1) && (s[firstNonZero]=='0' || s[firstNonZero]=='_')) { ++firstNonZero; } auto len = (s.length - firstNonZero + 15)/4; auto tmp = new BigDigit[len+1]; uint part = 0; uint sofar = 0; uint partcount = 0; assert(s.length>0); for (ptrdiff_t i = s.length - 1; i>=firstNonZero; --i) { assert(i>=0); char c = s[i]; if (s[i]=='_') continue; uint x = (c>='0' && c<='9') ? c - '0' : (c>='A' && c<='F') ? c - 'A' + 10 : (c>='a' && c<='f') ? c - 'a' + 10 : 100; if (x==100) return false; part >>= 4; part |= (x<<(32-4)); ++partcount; if (partcount==8) { tmp[sofar] = part; ++sofar; partcount = 0; part = 0; } } if (part) { for ( ; partcount != 8; ++partcount) part >>= 4; tmp[sofar] = part; ++sofar; } if (sofar == 0) data = ZERO; else data = assumeUnique(tmp[0..sofar]); return true; } // return true if OK; false if erroneous characters found bool fromDecimalString(const(char)[] s) pure { //Strip leading zeros int firstNonZero = 0; while ((firstNonZero < s.length) && (s[firstNonZero]=='0' || s[firstNonZero]=='_')) { ++firstNonZero; } if (firstNonZero == s.length && s.length >= 1) { data = ZERO; return true; } auto predictlength = (18*2 + 2*(s.length-firstNonZero)) / 19; auto tmp = new BigDigit[predictlength]; uint hi = biguintFromDecimal(tmp, s[firstNonZero..$]); tmp.length = hi; data = assumeUnique(tmp); return true; } //////////////////////// // // All of these member functions create a new BigUint. // return x >> y BigUint opShr(Tulong)(Tulong y) pure const if (is (Tulong == ulong)) { assert(y>0); uint bits = cast(uint)y & BIGDIGITSHIFTMASK; if ((y>>LG2BIGDIGITBITS) >= data.length) return BigUint(ZERO); uint words = cast(uint)(y >> LG2BIGDIGITBITS); if (bits==0) { return BigUint(data[words..$]); } else { uint [] result = new BigDigit[data.length - words]; multibyteShr(result, data[words..$], bits); if (result.length>1 && result[$-1]==0) return BigUint(assumeUnique(result[0..$-1])); else return BigUint(assumeUnique(result)); } } // return x << y BigUint opShl(Tulong)(Tulong y) pure const if (is (Tulong == ulong)) { assert(y>0); if (isZero()) return this; uint bits = cast(uint)y & BIGDIGITSHIFTMASK; assert ((y>>LG2BIGDIGITBITS) < cast(ulong)(uint.max)); uint words = cast(uint)(y >> LG2BIGDIGITBITS); BigDigit [] result = new BigDigit[data.length + words+1]; result[0..words] = 0; if (bits==0) { result[words..words+data.length] = data[]; return BigUint(assumeUnique(result[0..words+data.length])); } else { uint c = multibyteShl(result[words..words+data.length], data, bits); if (c==0) return BigUint(assumeUnique(result[0..words+data.length])); result[$-1] = c; return BigUint(assumeUnique(result)); } } // If wantSub is false, return x + y, leaving sign unchanged // If wantSub is true, return abs(x - y), negating sign if x < y static BigUint addOrSubInt(Tulong)(const BigUint x, Tulong y, bool wantSub, ref bool sign) pure if (is(Tulong == ulong)) { BigUint r; if (wantSub) { // perform a subtraction if (x.data.length > 2) { r.data = subInt(x.data, y); } else { // could change sign! ulong xx = x.data[0]; if (x.data.length > 1) xx += (cast(ulong)x.data[1]) << 32; ulong d; if (xx <= y) { d = y - xx; sign = !sign; } else { d = xx - y; } if (d == 0) { r = 0UL; sign = false; return r; } if (d > uint.max) { r.data = [cast(uint)(d & 0xFFFF_FFFF), cast(uint)(d>>32)]; } else { r.data = [cast(uint)(d & 0xFFFF_FFFF)]; } } } else { r.data = addInt(x.data, y); } return r; } // If wantSub is false, return x + y, leaving sign unchanged. // If wantSub is true, return abs(x - y), negating sign if x<y static BigUint addOrSub(BigUint x, BigUint y, bool wantSub, bool *sign) pure { BigUint r; if (wantSub) { // perform a subtraction bool negative; r.data = sub(x.data, y.data, &negative); *sign ^= negative; if (r.isZero()) { *sign = false; } } else { r.data = add(x.data, y.data); } return r; } // return x*y. // y must not be zero. static BigUint mulInt(T = ulong)(BigUint x, T y) pure { if (y==0 || x == 0) return BigUint(ZERO); uint hi = cast(uint)(y >>> 32); uint lo = cast(uint)(y & 0xFFFF_FFFF); uint [] result = new BigDigit[x.data.length+1+(hi!=0)]; result[x.data.length] = multibyteMul(result[0..x.data.length], x.data, lo, 0); if (hi!=0) { result[x.data.length+1] = multibyteMulAdd!('+')(result[1..x.data.length+1], x.data, hi, 0); } return BigUint(removeLeadingZeros(assumeUnique(result))); } /* return x * y. */ static BigUint mul(BigUint x, BigUint y) pure { if (y==0 || x == 0) return BigUint(ZERO); auto len = x.data.length + y.data.length; BigDigit [] result = new BigDigit[len]; if (y.data.length > x.data.length) { mulInternal(result, y.data, x.data); } else { if (x.data[]==y.data[]) squareInternal(result, x.data); else mulInternal(result, x.data, y.data); } // the highest element could be zero, // in which case we need to reduce the length return BigUint(removeLeadingZeros(assumeUnique(result))); } // return x / y static BigUint divInt(T)(BigUint x, T y_) pure if ( is(Unqual!T == uint) ) { uint y = y_; if (y == 1) return x; uint [] result = new BigDigit[x.data.length]; if ((y&(-y))==y) { assert(y!=0, "BigUint division by zero"); // perfect power of 2 uint b = 0; for (;y!=1; y>>=1) { ++b; } multibyteShr(result, x.data, b); } else { result[] = x.data[]; uint rem = multibyteDivAssign(result, y, 0); } return BigUint(removeLeadingZeros(assumeUnique(result))); } // return x % y static uint modInt(T)(BigUint x, T y_) pure if ( is(Unqual!T == uint) ) { uint y = y_; assert(y!=0); if ((y&(-y)) == y) { // perfect power of 2 return x.data[0] & (y-1); } else { // horribly inefficient - malloc, copy, & store are unnecessary. uint [] wasteful = new BigDigit[x.data.length]; wasteful[] = x.data[]; uint rem = multibyteDivAssign(wasteful, y, 0); delete wasteful; return rem; } } // return x / y static BigUint div(BigUint x, BigUint y) pure { if (y.data.length > x.data.length) return BigUint(ZERO); if (y.data.length == 1) return divInt(x, y.data[0]); BigDigit [] result = new BigDigit[x.data.length - y.data.length + 1]; divModInternal(result, null, x.data, y.data); return BigUint(removeLeadingZeros(assumeUnique(result))); } // return x % y static BigUint mod(BigUint x, BigUint y) pure { if (y.data.length > x.data.length) return x; if (y.data.length == 1) { return BigUint([modInt(x, y.data[0])]); } BigDigit [] result = new BigDigit[x.data.length - y.data.length + 1]; BigDigit [] rem = new BigDigit[y.data.length]; divModInternal(result, rem, x.data, y.data); return BigUint(removeLeadingZeros(assumeUnique(rem))); } // return x op y static BigUint bitwiseOp(string op)(BigUint x, BigUint y, bool xSign, bool ySign, ref bool resultSign) pure if (op == "|" || op == "^" || op == "&") { auto d1 = includeSign(x.data, y.uintLength, xSign); auto d2 = includeSign(y.data, x.uintLength, ySign); foreach (i; 0..d1.length) { mixin("d1[i] " ~ op ~ "= d2[i];"); } mixin("resultSign = xSign " ~ op ~ " ySign;"); if (resultSign) { twosComplement(d1, d1); } return BigUint(removeLeadingZeros(assumeUnique(d1))); } /** * Return a BigUint which is x raised to the power of y. * Method: Powers of 2 are removed from x, then left-to-right binary * exponentiation is used. * Memory allocation is minimized: at most one temporary BigUint is used. */ static BigUint pow(BigUint x, ulong y) pure { // Deal with the degenerate cases first. if (y==0) return BigUint(ONE); if (y==1) return x; if (x==0 || x==1) return x; BigUint result; // Simplify, step 1: Remove all powers of 2. uint firstnonzero = firstNonZeroDigit(x.data); // Now we know x = x[firstnonzero..$] * (2^^(firstnonzero*BigDigitBits)) // where BigDigitBits = BigDigit.sizeof * 8 // See if x[firstnonzero..$] can now fit into a single digit. bool singledigit = ((x.data.length - firstnonzero) == 1); // If true, then x0 is that digit // and the result will be (x0 ^^ y) * (2^^(firstnonzero*y*BigDigitBits)) BigDigit x0 = x.data[firstnonzero]; assert(x0 !=0); // Length of the non-zero portion size_t nonzerolength = x.data.length - firstnonzero; ulong y0; uint evenbits = 0; // number of even bits in the bottom of x while (!(x0 & 1)) { x0 >>= 1; ++evenbits; } if ((x.data.length- firstnonzero == 2)) { // Check for a single digit straddling a digit boundary BigDigit x1 = x.data[firstnonzero+1]; if ((x1 >> evenbits) == 0) { x0 |= (x1 << (BigDigit.sizeof * 8 - evenbits)); singledigit = true; } } // Now if (singledigit), x^^y = (x0 ^^ y) * 2^^(evenbits * y) * 2^^(firstnonzero*y*BigDigitBits)) uint evenshiftbits = 0; // Total powers of 2 to shift by, at the end // Simplify, step 2: For singledigits, see if we can trivially reduce y BigDigit finalMultiplier = 1UL; if (singledigit) { // x fits into a single digit. Raise it to the highest power we can // that still fits into a single digit, then reduce the exponent accordingly. // We're quite likely to have a residual multiply at the end. // For example, 10^^100 = (((5^^13)^^7) * 5^^9) * 2^^100. // and 5^^13 still fits into a uint. evenshiftbits = cast(uint)( (evenbits * y) & BIGDIGITSHIFTMASK); if (x0 == 1) { // Perfect power of 2 result = 1UL; return result << (evenbits + firstnonzero * 8 * BigDigit.sizeof) * y; } int p = highestPowerBelowUintMax(x0); if (y <= p) { // Just do it with pow result = cast(ulong)intpow(x0, y); if (evenbits + firstnonzero == 0) return result; return result << (evenbits + firstnonzero * 8 * BigDigit.sizeof) * y; } y0 = y / p; finalMultiplier = intpow(x0, y - y0*p); x0 = intpow(x0, p); // Result is x0 nonzerolength = 1; } // Now if (singledigit), x^^y = finalMultiplier * (x0 ^^ y0) * 2^^(evenbits * y) * 2^^(firstnonzero*y*BigDigitBits)) // Perform a crude check for overflow and allocate result buffer. // The length required is y * lg2(x) bits. // which will always fit into y*x.length digits. But this is // a gross overestimate if x is small (length 1 or 2) and the highest // digit is nearly empty. // A better estimate is: // y * lg2(x[$-1]/BigDigit.max) + y * (x.length - 1) digits, // and the first term is always between // y * (bsr(x.data[$-1]) + 1) / BIGDIGITBITS and // y * (bsr(x.data[$-1]) + 2) / BIGDIGITBITS // For single digit payloads, we already have // x^^y = finalMultiplier * (x0 ^^ y0) * 2^^(evenbits * y) * 2^^(firstnonzero*y*BigDigitBits)) // and x0 is almost a full digit, so it's a tight estimate. // Number of digits is therefore 1 + x0.length*y0 + (evenbits*y)/BIGDIGIT + firstnonzero*y // Note that the divisions must be rounded up. // Estimated length in BigDigits ulong estimatelength = singledigit ? 1 + y0 + ((evenbits*y + BigDigit.sizeof * 8 - 1) / (BigDigit.sizeof *8)) + firstnonzero*y : x.data.length * y; // Imprecise check for overflow. Makes the extreme cases easier to debug // (less extreme overflow will result in an out of memory error). if (estimatelength > uint.max/(4*BigDigit.sizeof)) assert(0, "Overflow in BigInt.pow"); // The result buffer includes space for all the trailing zeros BigDigit [] resultBuffer = new BigDigit[cast(size_t)estimatelength]; // Do all the powers of 2! size_t result_start = cast(size_t)( firstnonzero * y + (singledigit ? ((evenbits * y) >> LG2BIGDIGITBITS) : 0)); resultBuffer[0..result_start] = 0; BigDigit [] t1 = resultBuffer[result_start..$]; BigDigit [] r1; if (singledigit) { r1 = t1[0..1]; r1[0] = x0; y = y0; } else { // It's not worth right shifting by evenbits unless we also shrink the length after each // multiply or squaring operation. That might still be worthwhile for large y. r1 = t1[0..x.data.length - firstnonzero]; r1[0..$] = x.data[firstnonzero..$]; } if (y>1) { // Set r1 = r1 ^^ y. // The secondary buffer only needs space for the multiplication results BigDigit [] secondaryBuffer = new BigDigit[resultBuffer.length - result_start]; BigDigit [] t2 = secondaryBuffer; BigDigit [] r2; int shifts = 63; // num bits in a long while(!(y & 0x8000_0000_0000_0000L)) { y <<= 1; --shifts; } y <<=1; while(y!=0) { // For each bit of y: Set r1 = r1 * r1 // If the bit is 1, set r1 = r1 * x // Eg, if y is 0b101, result = ((x^^2)^^2)*x == x^^5. // Optimization opportunity: if more than 2 bits in y are set, // it's usually possible to reduce the number of multiplies // by caching odd powers of x. eg for y = 54, // (0b110110), set u = x^^3, and result is ((u^^8)*u)^^2 r2 = t2[0 .. r1.length*2]; squareInternal(r2, r1); if (y & 0x8000_0000_0000_0000L) { r1 = t1[0 .. r2.length + nonzerolength]; if (singledigit) { r1[$-1] = multibyteMul(r1[0 .. $-1], r2, x0, 0); } else { mulInternal(r1, r2, x.data[firstnonzero..$]); } } else { r1 = t1[0 .. r2.length]; r1[] = r2[]; } y <<=1; shifts--; } while (shifts>0) { r2 = t2[0 .. r1.length * 2]; squareInternal(r2, r1); r1 = t1[0 .. r2.length]; r1[] = r2[]; --shifts; } } if (finalMultiplier!=1) { BigDigit carry = multibyteMul(r1, r1, finalMultiplier, 0); if (carry) { r1 = t1[0 .. r1.length + 1]; r1[$-1] = carry; } } if (evenshiftbits) { BigDigit carry = multibyteShl(r1, r1, evenshiftbits); if (carry!=0) { r1 = t1[0 .. r1.length + 1]; r1[$ - 1] = carry; } } while(r1[$ - 1]==0) { r1=r1[0 .. $ - 1]; } return BigUint(assumeUnique(resultBuffer[0 .. result_start + r1.length])); } // Implement toHash so that BigUint works properly as an AA key. size_t toHash() const @trusted nothrow { return typeid(data).getHash(&data); } } // end BigUint unittest { // ulong comparison test BigUint a = [1]; assert(a == 1); assert(a < 0x8000_0000_0000_0000UL); // bug 9548 // bug 12234 BigUint z = [0]; assert(z == 0UL); assert(!(z > 0UL)); assert(!(z < 0UL)); } // Remove leading zeros from x, to restore the BigUint invariant inout(BigDigit) [] removeLeadingZeros(inout(BigDigit) [] x) pure { size_t k = x.length; while(k>1 && x[k - 1]==0) --k; return x[0 .. k]; } unittest { BigUint r = BigUint([5]); BigUint t = BigUint([7]); BigUint s = BigUint.mod(r, t); assert(s==5); } unittest { BigUint r; r = 5UL; assert(r.peekUlong(0) == 5UL); assert(r.peekUint(0) == 5U); r = 0x1234_5678_9ABC_DEF0UL; assert(r.peekUlong(0) == 0x1234_5678_9ABC_DEF0UL); assert(r.peekUint(0) == 0x9ABC_DEF0U); } // Pow tests unittest { BigUint r, s; r.fromHexString("80000000_00000001"); s = BigUint.pow(r, 5); r.fromHexString("08000000_00000000_50000000_00000001_40000000_00000002_80000000" ~ "_00000002_80000000_00000001"); assert(s == r); s = 10UL; s = BigUint.pow(s, 39); r.fromDecimalString("1000000000000000000000000000000000000000"); assert(s == r); r.fromHexString("1_E1178E81_00000000"); s = BigUint.pow(r, 15); // Regression test: this used to overflow array bounds r.fromDecimalString("000_000_00"); assert(r == 0); r.fromDecimalString("0007"); assert(r == 7); r.fromDecimalString("0"); assert(r == 0); } // Radix conversion tests unittest { BigUint r; r.fromHexString("1_E1178E81_00000000"); assert(r.toHexString(0, '_', 0) == "1_E1178E81_00000000"); assert(r.toHexString(0, '_', 20) == "0001_E1178E81_00000000"); assert(r.toHexString(0, '_', 16+8) == "00000001_E1178E81_00000000"); assert(r.toHexString(0, '_', 16+9) == "0_00000001_E1178E81_00000000"); assert(r.toHexString(0, '_', 16+8+8) == "00000000_00000001_E1178E81_00000000"); assert(r.toHexString(0, '_', 16+8+8+1) == "0_00000000_00000001_E1178E81_00000000"); assert(r.toHexString(0, '_', 16+8+8+1, ' ') == " 1_E1178E81_00000000"); assert(r.toHexString(0, 0, 16+8+8+1) == "00000000000000001E1178E8100000000"); r = 0UL; assert(r.toHexString(0, '_', 0) == "0"); assert(r.toHexString(0, '_', 7) == "0000000"); assert(r.toHexString(0, '_', 7, ' ') == " 0"); assert(r.toHexString(0, '#', 9) == "0#00000000"); assert(r.toHexString(0, 0, 9) == "000000000"); } private: void twosComplement(const(BigDigit) [] x, BigDigit[] result) pure { foreach (i; 0..x.length) { result[i] = ~x[i]; } result[x.length..$] = BigDigit.max; bool sgn = false; foreach (i; 0..result.length) { if (result[i] == BigDigit.max) { result[i] = 0; } else { result[i] += 1; break; } } } // Encode BigInt as BigDigit array (sign and 2's complement) BigDigit[] includeSign(const(BigDigit) [] x, size_t minSize, bool sign) pure { size_t length = (x.length > minSize) ? x.length : minSize; BigDigit [] result = new BigDigit[length]; if (sign) { twosComplement(x, result); } else { result[0..x.length] = x; } return result; } // works for any type T intpow(T)(T x, ulong n) pure { T p; switch (n) { case 0: p = 1; break; case 1: p = x; break; case 2: p = x * x; break; default: p = 1; while (1){ if (n & 1) p *= x; n >>= 1; if (!n) break; x *= x; } break; } return p; } // returns the maximum power of x that will fit in a uint. int highestPowerBelowUintMax(uint x) pure { assert(x>1); static immutable ubyte [22] maxpwr = [ 31, 20, 15, 13, 12, 11, 10, 10, 9, 9, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 7]; if (x<24) return maxpwr[x-2]; if (x<41) return 6; if (x<85) return 5; if (x<256) return 4; if (x<1626) return 3; if (x<65536) return 2; return 1; } // returns the maximum power of x that will fit in a ulong. int highestPowerBelowUlongMax(uint x) pure { assert(x>1); static immutable ubyte [39] maxpwr = [ 63, 40, 31, 27, 24, 22, 21, 20, 19, 18, 17, 17, 16, 16, 15, 15, 15, 15, 14, 14, 14, 14, 13, 13, 13, 13, 13, 13, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12]; if (x<41) return maxpwr[x-2]; if (x<57) return 11; if (x<85) return 10; if (x<139) return 9; if (x<256) return 8; if (x<566) return 7; if (x<1626) return 6; if (x<7132) return 5; if (x<65536) return 4; if (x<2642246) return 3; return 2; } version(unittest) { int slowHighestPowerBelowUintMax(uint x) pure { int pwr = 1; for (ulong q = x;x*q < cast(ulong)uint.max; ) { q*=x; ++pwr; } return pwr; } unittest { assert(highestPowerBelowUintMax(10)==9); for (int k=82; k<88; ++k) {assert(highestPowerBelowUintMax(k)== slowHighestPowerBelowUintMax(k)); } } } /* General unsigned subtraction routine for bigints. * Sets result = x - y. If the result is negative, negative will be true. */ BigDigit [] sub(const BigDigit [] x, const BigDigit [] y, bool *negative) pure { if (x.length == y.length) { // There's a possibility of cancellation, if x and y are almost equal. ptrdiff_t last = highestDifferentDigit(x, y); BigDigit [] result = new BigDigit[last+1]; if (x[last] < y[last]) { // we know result is negative multibyteSub(result[0..last+1], y[0..last+1], x[0..last+1], 0); *negative = true; } else { // positive or zero result multibyteSub(result[0..last+1], x[0..last+1], y[0..last+1], 0); *negative = false; } while (result.length > 1 && result[$-1] == 0) { result = result[0..$-1]; } // if (result.length >1 && result[$-1]==0) return result[0..$-1]; return result; } // Lengths are different const(BigDigit) [] large, small; if (x.length < y.length) { *negative = true; large = y; small = x; } else { *negative = false; large = x; small = y; } // result.length will be equal to larger length, or could decrease by 1. BigDigit [] result = new BigDigit[large.length]; BigDigit carry = multibyteSub(result[0..small.length], large[0..small.length], small, 0); result[small.length..$] = large[small.length..$]; if (carry) { multibyteIncrementAssign!('-')(result[small.length..$], carry); } while (result.length > 1 && result[$-1] == 0) { result = result[0..$-1]; } return result; } // return a + b BigDigit [] add(const BigDigit [] a, const BigDigit [] b) pure { const(BigDigit) [] x, y; if (a.length < b.length) { x = b; y = a; } else { x = a; y = b; } // now we know x.length > y.length // create result. add 1 in case it overflows BigDigit [] result = new BigDigit[x.length + 1]; BigDigit carry = multibyteAdd(result[0..y.length], x[0..y.length], y, 0); if (x.length != y.length) { result[y.length..$-1]= x[y.length..$]; carry = multibyteIncrementAssign!('+')(result[y.length..$-1], carry); } if (carry) { result[$-1] = carry; return result; } else return result[0..$-1]; } /** return x + y */ BigDigit [] addInt(const BigDigit[] x, ulong y) pure { uint hi = cast(uint)(y >>> 32); uint lo = cast(uint)(y& 0xFFFF_FFFF); auto len = x.length; if (x.length < 2 && hi!=0) ++len; BigDigit [] result = new BigDigit[len+1]; result[0..x.length] = x[]; if (x.length < 2 && hi!=0) { result[1]=hi; hi=0; } uint carry = multibyteIncrementAssign!('+')(result[0..$-1], lo); if (hi!=0) carry += multibyteIncrementAssign!('+')(result[1..$-1], hi); if (carry) { result[$-1] = carry; return result; } else return result[0..$-1]; } /** Return x - y. * x must be greater than y. */ BigDigit [] subInt(const BigDigit[] x, ulong y) pure { uint hi = cast(uint)(y >>> 32); uint lo = cast(uint)(y & 0xFFFF_FFFF); BigDigit [] result = new BigDigit[x.length]; result[] = x[]; multibyteIncrementAssign!('-')(result[], lo); if (hi) multibyteIncrementAssign!('-')(result[1..$], hi); if (result[$-1] == 0) return result[0..$-1]; else return result; } /** General unsigned multiply routine for bigints. * Sets result = x * y. * * The length of y must not be larger than the length of x. * Different algorithms are used, depending on the lengths of x and y. * TODO: "Modern Computer Arithmetic" suggests the OddEvenKaratsuba algorithm for the * unbalanced case. (But I doubt it would be faster in practice). * */ void mulInternal(BigDigit[] result, const(BigDigit)[] x, const(BigDigit)[] y) pure { assert( result.length == x.length + y.length ); assert( y.length > 0 ); assert( x.length >= y.length); if (y.length <= KARATSUBALIMIT) { // Small multiplier, we'll just use the asm classic multiply. if (y.length == 1) { // Trivial case, no cache effects to worry about result[x.length] = multibyteMul(result[0..x.length], x, y[0], 0); return; } if (x.length + y.length < CACHELIMIT) return mulSimple(result, x, y); // If x is so big that it won't fit into the cache, we divide it into chunks // Every chunk must be greater than y.length. // We make the first chunk shorter, if necessary, to ensure this. auto chunksize = CACHELIMIT / y.length; auto residual = x.length % chunksize; if (residual < y.length) { chunksize -= y.length; } // Use schoolbook multiply. mulSimple(result[0 .. chunksize + y.length], x[0..chunksize], y); auto done = chunksize; while (done < x.length) { // result[done .. done+ylength] already has a value. chunksize = (done + (CACHELIMIT / y.length) < x.length) ? (CACHELIMIT / y.length) : x.length - done; BigDigit [KARATSUBALIMIT] partial; partial[0..y.length] = result[done..done+y.length]; mulSimple(result[done..done+chunksize+y.length], x[done..done+chunksize], y); addAssignSimple(result[done..done+chunksize + y.length], partial[0..y.length]); done += chunksize; } return; } auto half = (x.length >> 1) + (x.length & 1); if (2*y.length*y.length <= x.length*x.length) { // UNBALANCED MULTIPLY // Use school multiply to cut into quasi-squares of Karatsuba-size // or larger. The ratio of the two sides of the 'square' must be // between 1.414:1 and 1:1. Use Karatsuba on each chunk. // // For maximum performance, we want the ratio to be as close to // 1:1 as possible. To achieve this, we can either pad x or y. // The best choice depends on the modulus x%y. auto numchunks = x.length / y.length; auto chunksize = y.length; auto extra = x.length % y.length; auto maxchunk = chunksize + extra; bool paddingY; // true = we're padding Y, false = we're padding X. if (extra * extra * 2 < y.length*y.length) { // The leftover bit is small enough that it should be incorporated // in the existing chunks. // Make all the chunks a tiny bit bigger // (We're padding y with zeros) chunksize += extra / cast(double)numchunks; extra = x.length - chunksize*numchunks; // there will probably be a few left over. // Every chunk will either have size chunksize, or chunksize+1. maxchunk = chunksize + 1; paddingY = true; assert(chunksize + extra + chunksize *(numchunks-1) == x.length ); } else { // the extra bit is large enough that it's worth making a new chunk. // (This means we're padding x with zeros, when doing the first one). maxchunk = chunksize; ++numchunks; paddingY = false; assert(extra + chunksize *(numchunks-1) == x.length ); } // We make the buffer a bit bigger so we have space for the partial sums. BigDigit [] scratchbuff = new BigDigit[karatsubaRequiredBuffSize(maxchunk) + y.length]; BigDigit [] partial = scratchbuff[$ - y.length .. $]; size_t done; // how much of X have we done so far? double residual = 0; if (paddingY) { // If the first chunk is bigger, do it first. We're padding y. mulKaratsuba(result[0 .. y.length + chunksize + (extra > 0 ? 1 : 0 )], x[0 .. chunksize + (extra>0?1:0)], y, scratchbuff); done = chunksize + (extra > 0 ? 1 : 0); if (extra) --extra; } else { // We're padding X. Begin with the extra bit. mulKaratsuba(result[0 .. y.length + extra], y, x[0..extra], scratchbuff); done = extra; extra = 0; } auto basechunksize = chunksize; while (done < x.length) { chunksize = basechunksize + (extra > 0 ? 1 : 0); if (extra) --extra; partial[] = result[done .. done+y.length]; mulKaratsuba(result[done .. done + y.length + chunksize], x[done .. done+chunksize], y, scratchbuff); addAssignSimple(result[done .. done + y.length + chunksize], partial); done += chunksize; } delete scratchbuff; } else { // Balanced. Use Karatsuba directly. BigDigit [] scratchbuff = new BigDigit[karatsubaRequiredBuffSize(x.length)]; mulKaratsuba(result, x, y, scratchbuff); delete scratchbuff; } } /** General unsigned squaring routine for BigInts. * Sets result = x*x. * NOTE: If the highest half-digit of x is zero, the highest digit of result will * also be zero. */ void squareInternal(BigDigit[] result, const BigDigit[] x) pure { // Squaring is potentially half a multiply, plus add the squares of // the diagonal elements. assert(result.length == 2*x.length); if (x.length <= KARATSUBASQUARELIMIT) { if (x.length==1) { result[1] = multibyteMul(result[0..1], x, x[0], 0); return; } return squareSimple(result, x); } // The nice thing about squaring is that it always stays balanced BigDigit [] scratchbuff = new BigDigit[karatsubaRequiredBuffSize(x.length)]; squareKaratsuba(result, x, scratchbuff); delete scratchbuff; } import core.bitop : bsr; /// if remainder is null, only calculate quotient. void divModInternal(BigDigit [] quotient, BigDigit[] remainder, const BigDigit [] u, const BigDigit [] v) pure { assert(quotient.length == u.length - v.length + 1); assert(remainder == null || remainder.length == v.length); assert(v.length > 1); assert(u.length >= v.length); // Normalize by shifting v left just enough so that // its high-order bit is on, and shift u left the // same amount. The highest bit of u will never be set. BigDigit [] vn = new BigDigit[v.length]; BigDigit [] un = new BigDigit[u.length + 1]; // How much to left shift v, so that its MSB is set. uint s = BIGDIGITSHIFTMASK - bsr(v[$-1]); if (s!=0) { multibyteShl(vn, v, s); un[$-1] = multibyteShl(un[0..$-1], u, s); } else { vn[] = v[]; un[0..$-1] = u[]; un[$-1] = 0; } if (quotient.length<FASTDIVLIMIT) { schoolbookDivMod(quotient, un, vn); } else { blockDivMod(quotient, un, vn); } // Unnormalize remainder, if required. if (remainder != null) { if (s == 0) remainder[] = un[0..vn.length]; else multibyteShr(remainder, un[0..vn.length+1], s); } delete un; delete vn; } unittest { immutable(uint) [] u = [0, 0xFFFF_FFFE, 0x8000_0000]; immutable(uint) [] v = [0xFFFF_FFFF, 0x8000_0000]; uint [] q = new uint[u.length - v.length + 1]; uint [] r = new uint[2]; divModInternal(q, r, u, v); assert(q[]==[0xFFFF_FFFFu, 0]); assert(r[]==[0xFFFF_FFFFu, 0x7FFF_FFFF]); u = [0, 0xFFFF_FFFE, 0x8000_0001]; v = [0xFFFF_FFFF, 0x8000_0000]; divModInternal(q, r, u, v); } private: // Converts a big uint to a hexadecimal string. // // Optionally, a separator character (eg, an underscore) may be added between // every 8 digits. // buff.length must be data.length*8 if separator is zero, // or data.length*9 if separator is non-zero. It will be completely filled. char [] biguintToHex(char [] buff, const BigDigit [] data, char separator=0) pure { int x=0; for (ptrdiff_t i=data.length - 1; i>=0; --i) { toHexZeroPadded(buff[x..x+8], data[i]); x+=8; if (separator) { if (i>0) buff[x] = separator; ++x; } } return buff; } /** Convert a big uint into a decimal string. * * Params: * data The biguint to be converted. Will be destroyed. * buff The destination buffer for the decimal string. Must be * large enough to store the result, including leading zeros. * Will be filled backwards, starting from buff[$-1]. * * buff.length must be >= (data.length*32)/log2(10) = 9.63296 * data.length. * Returns: * the lowest index of buff which was used. */ size_t biguintToDecimal(char [] buff, BigDigit [] data) pure { ptrdiff_t sofar = buff.length; // Might be better to divide by (10^38/2^32) since that gives 38 digits for // the price of 3 divisions and a shr; this version only gives 27 digits // for 3 divisions. while(data.length>1) { uint rem = multibyteDivAssign(data, 10_0000_0000, 0); itoaZeroPadded(buff[sofar-9 .. sofar], rem); sofar -= 9; if (data[$-1] == 0 && data.length > 1) { data.length = data.length - 1; } } itoaZeroPadded(buff[sofar-10 .. sofar], data[0]); sofar -= 10; // and strip off the leading zeros while(sofar!= buff.length-1 && buff[sofar] == '0') sofar++; return sofar; } /** Convert a decimal string into a big uint. * * Params: * data The biguint to be receive the result. Must be large enough to * store the result. * s The decimal string. May contain _ or 0..9 * * The required length for the destination buffer is slightly less than * 1 + s.length/log2(10) = 1 + s.length/3.3219. * * Returns: * the highest index of data which was used. */ int biguintFromDecimal(BigDigit [] data, const(char)[] s) pure in { assert((data.length >= 2) || (data.length == 1 && s.length == 1)); } body { import std.conv : ConvException; // Convert to base 1e19 = 10_000_000_000_000_000_000. // (this is the largest power of 10 that will fit into a long). // The length will be less than 1 + s.length/log2(10) = 1 + s.length/3.3219. // 485 bits will only just fit into 146 decimal digits. // As we convert the string, we record the number of digits we've seen in base 19: // hi is the number of digits/19, lo is the extra digits (0 to 18). // TODO: This is inefficient for very large strings (it is O(n^^2)). // We should take advantage of fast multiplication once the numbers exceed // Karatsuba size. uint lo = 0; // number of powers of digits, 0..18 uint x = 0; ulong y = 0; uint hi = 0; // number of base 1e19 digits data[0] = 0; // initially number is 0. if (data.length > 1) data[1] = 0; for (int i= (s[0]=='-' || s[0]=='+')? 1 : 0; i<s.length; ++i) { if (s[i] == '_') continue; if (s[i] < '0' || s[i] > '9') throw new ConvException("invalid digit"); x *= 10; x += s[i] - '0'; ++lo; if (lo == 9) { y = x; x = 0; } if (lo == 18) { y *= 10_0000_0000; y += x; x = 0; } if (lo == 19) { y *= 10; y += x; x = 0; // Multiply existing number by 10^19, then add y1. if (hi>0) { data[hi] = multibyteMul(data[0..hi], data[0..hi], 1220703125*2u, 0); // 5^13*2 = 0x9184_E72A ++hi; data[hi] = multibyteMul(data[0..hi], data[0..hi], 15625*262144u, 0); // 5^6*2^18 = 0xF424_0000 ++hi; } else hi = 2; uint c = multibyteIncrementAssign!('+')(data[0..hi], cast(uint)(y&0xFFFF_FFFF)); c += multibyteIncrementAssign!('+')(data[1..hi], cast(uint)(y>>32)); if (c!=0) { data[hi]=c; ++hi; } y = 0; lo = 0; } } // Now set y = all remaining digits. if (lo>=18) { } else if (lo>=9) { for (int k=9; k<lo; ++k) y*=10; y+=x; } else { for (int k=0; k<lo; ++k) y*=10; y+=x; } if (lo != 0) { if (hi == 0) { data[0] = cast(uint)y; if (data.length == 1) { hi = 1; } else { data[1] = cast(uint)(y >>> 32); hi=2; } } else { while (lo>0) { uint c = multibyteMul(data[0..hi], data[0..hi], 10, 0); if (c!=0) { data[hi]=c; ++hi; } --lo; } uint c = multibyteIncrementAssign!('+')(data[0..hi], cast(uint)(y&0xFFFF_FFFF)); if (y > 0xFFFF_FFFFL) { c += multibyteIncrementAssign!('+')(data[1..hi], cast(uint)(y>>32)); } if (c!=0) { data[hi]=c; ++hi; } } } while (hi>1 && data[hi-1]==0) --hi; return hi; } private: // ------------------------ // These in-place functions are only for internal use; they are incompatible // with COW. // Classic 'schoolbook' multiplication. void mulSimple(BigDigit[] result, const(BigDigit) [] left, const(BigDigit)[] right) pure in { assert(result.length == left.length + right.length); assert(right.length>1); } body { result[left.length] = multibyteMul(result[0..left.length], left, right[0], 0); multibyteMultiplyAccumulate(result[1..$], left, right[1..$]); } // Classic 'schoolbook' squaring void squareSimple(BigDigit[] result, const(BigDigit) [] x) pure in { assert(result.length == 2*x.length); assert(x.length>1); } body { multibyteSquare(result, x); } // add two uints of possibly different lengths. Result must be as long // as the larger length. // Returns carry (0 or 1). uint addSimple(BigDigit[] result, const BigDigit [] left, const BigDigit [] right) pure in { assert(result.length == left.length); assert(left.length >= right.length); assert(right.length>0); } body { uint carry = multibyteAdd(result[0..right.length], left[0..right.length], right, 0); if (right.length < left.length) { result[right.length..left.length] = left[right.length .. $]; carry = multibyteIncrementAssign!('+')(result[right.length..$], carry); } return carry; } // result = left - right // returns carry (0 or 1) BigDigit subSimple(BigDigit [] result,const(BigDigit) [] left, const(BigDigit) [] right) pure in { assert(result.length == left.length); assert(left.length >= right.length); assert(right.length>0); } body { BigDigit carry = multibyteSub(result[0..right.length], left[0..right.length], right, 0); if (right.length < left.length) { result[right.length..left.length] = left[right.length .. $]; carry = multibyteIncrementAssign!('-')(result[right.length..$], carry); } //else if (result.length==left.length+1) { result[$-1] = carry; carry=0; } return carry; } /* result = result - right * Returns carry = 1 if result was less than right. */ BigDigit subAssignSimple(BigDigit [] result, const(BigDigit) [] right) pure { assert(result.length >= right.length); uint c = multibyteSub(result[0..right.length], result[0..right.length], right, 0); if (c && result.length > right.length) c = multibyteIncrementAssign!('-')(result[right.length .. $], c); return c; } /* result = result + right */ BigDigit addAssignSimple(BigDigit [] result, const(BigDigit) [] right) pure { assert(result.length >= right.length); uint c = multibyteAdd(result[0..right.length], result[0..right.length], right, 0); if (c && result.length > right.length) c = multibyteIncrementAssign!('+')(result[right.length .. $], c); return c; } /* performs result += wantSub? - right : right; */ BigDigit addOrSubAssignSimple(BigDigit [] result, const(BigDigit) [] right, bool wantSub) pure { if (wantSub) return subAssignSimple(result, right); else return addAssignSimple(result, right); } // return true if x<y, considering leading zeros bool less(const(BigDigit)[] x, const(BigDigit)[] y) pure { assert(x.length >= y.length); auto k = x.length-1; while(x[k]==0 && k>=y.length) --k; if (k>=y.length) return false; while (k>0 && x[k]==y[k]) --k; return x[k] < y[k]; } // Set result = abs(x-y), return true if result is negative(x<y), false if x<=y. bool inplaceSub(BigDigit[] result, const(BigDigit)[] x, const(BigDigit)[] y) pure { assert(result.length == (x.length >= y.length) ? x.length : y.length); size_t minlen; bool negative; if (x.length >= y.length) { minlen = y.length; negative = less(x, y); } else { minlen = x.length; negative = !less(y, x); } const (BigDigit)[] large, small; if (negative) { large = y; small = x; } else { large = x; small = y; } BigDigit carry = multibyteSub(result[0..minlen], large[0..minlen], small[0..minlen], 0); if (x.length != y.length) { result[minlen..large.length]= large[minlen..$]; result[large.length..$] = 0; if (carry) multibyteIncrementAssign!('-')(result[minlen..$], carry); } return negative; } /* Determine how much space is required for the temporaries * when performing a Karatsuba multiplication. */ size_t karatsubaRequiredBuffSize(size_t xlen) pure { return xlen <= KARATSUBALIMIT ? 0 : 2*xlen; // - KARATSUBALIMIT+2; } /* Sets result = x*y, using Karatsuba multiplication. * x must be longer or equal to y. * Valid only for balanced multiplies, where x is not shorter than y. * It is superior to schoolbook multiplication if and only if * sqrt(2)*y.length > x.length > y.length. * Karatsuba multiplication is O(n^1.59), whereas schoolbook is O(n^2) * The maximum allowable length of x and y is uint.max; but better algorithms * should be used far before that length is reached. * Params: * scratchbuff An array long enough to store all the temporaries. Will be destroyed. */ void mulKaratsuba(BigDigit [] result, const(BigDigit) [] x, const(BigDigit)[] y, BigDigit [] scratchbuff) pure { assert(x.length >= y.length); assert(result.length < uint.max, "Operands too large"); assert(result.length == x.length + y.length); if (x.length <= KARATSUBALIMIT) { return mulSimple(result, x, y); } // Must be almost square (otherwise, a schoolbook iteration is better) assert(2L * y.length * y.length > (x.length-1) * (x.length-1), "Bigint Internal Error: Asymmetric Karatsuba"); // The subtractive version of Karatsuba multiply uses the following result: // (Nx1 + x0)*(Ny1 + y0) = (N*N)*x1y1 + x0y0 + N * (x0y0 + x1y1 - mid) // where mid = (x0-x1)*(y0-y1) // requiring 3 multiplies of length N, instead of 4. // The advantage of the subtractive over the additive version is that // the mid multiply cannot exceed length N. But there are subtleties: // (x0-x1),(y0-y1) may be negative or zero. To keep it simple, we // retain all of the leading zeros in the subtractions // half length, round up. auto half = (x.length >> 1) + (x.length & 1); const(BigDigit) [] x0 = x[0 .. half]; const(BigDigit) [] x1 = x[half .. $]; const(BigDigit) [] y0 = y[0 .. half]; const(BigDigit) [] y1 = y[half .. $]; BigDigit [] mid = scratchbuff[0 .. half*2]; BigDigit [] newscratchbuff = scratchbuff[half*2 .. $]; BigDigit [] resultLow = result[0 .. 2*half]; BigDigit [] resultHigh = result[2*half .. $]; // initially use result to store temporaries BigDigit [] xdiff= result[0 .. half]; BigDigit [] ydiff = result[half .. half*2]; // First, we calculate mid, and sign of mid bool midNegative = inplaceSub(xdiff, x0, x1) ^ inplaceSub(ydiff, y0, y1); mulKaratsuba(mid, xdiff, ydiff, newscratchbuff); // Low half of result gets x0 * y0. High half gets x1 * y1 mulKaratsuba(resultLow, x0, y0, newscratchbuff); if (2L * y1.length * y1.length < x1.length * x1.length) { // an asymmetric situation has been created. // Worst case is if x:y = 1.414 : 1, then x1:y1 = 2.41 : 1. // Applying one schoolbook multiply gives us two pieces each 1.2:1 if (y1.length <= KARATSUBALIMIT) mulSimple(resultHigh, x1, y1); else { // divide x1 in two, then use schoolbook multiply on the two pieces. auto quarter = (x1.length >> 1) + (x1.length & 1); bool ysmaller = (quarter >= y1.length); mulKaratsuba(resultHigh[0..quarter+y1.length], ysmaller ? x1[0..quarter] : y1, ysmaller ? y1 : x1[0..quarter], newscratchbuff); // Save the part which will be overwritten. bool ysmaller2 = ((x1.length - quarter) >= y1.length); newscratchbuff[0..y1.length] = resultHigh[quarter..quarter + y1.length]; mulKaratsuba(resultHigh[quarter..$], ysmaller2 ? x1[quarter..$] : y1, ysmaller2 ? y1 : x1[quarter..$], newscratchbuff[y1.length..$]); resultHigh[quarter..$].addAssignSimple(newscratchbuff[0..y1.length]); } } else mulKaratsuba(resultHigh, x1, y1, newscratchbuff); /* We now have result = x0y0 + (N*N)*x1y1 Before adding or subtracting mid, we must calculate result += N * (x0y0 + x1y1) We can do this with three half-length additions. With a = x0y0, b = x1y1: aHI aLO + aHI aLO + bHI bLO + bHI bLO = R3 R2 R1 R0 R1 = aHI + bLO + aLO R2 = aHI + bLO + aHI + carry_from_R1 R3 = bHi + carry_from_R2 It might actually be quicker to do it in two full-length additions: newscratchbuff[2*half] = addSimple(newscratchbuff[0..2*half], result[0..2*half], result[2*half..$]); addAssignSimple(result[half..$], newscratchbuff[0..2*half+1]); */ BigDigit[] R1 = result[half..half*2]; BigDigit[] R2 = result[half*2..half*3]; BigDigit[] R3 = result[half*3..$]; BigDigit c1 = multibyteAdd(R2, R2, R1, 0); // c1:R2 = R2 + R1 BigDigit c2 = multibyteAdd(R1, R2, result[0..half], 0); // c2:R1 = R2 + R1 + R0 BigDigit c3 = addAssignSimple(R2, R3); // R2 = R2 + R1 + R3 if (c1+c2) multibyteIncrementAssign!('+')(result[half*2..$], c1+c2); if (c1+c3) multibyteIncrementAssign!('+')(R3, c1+c3); // And finally we subtract mid addOrSubAssignSimple(result[half..$], mid, !midNegative); } void squareKaratsuba(BigDigit [] result, const BigDigit [] x, BigDigit [] scratchbuff) pure { // See mulKaratsuba for implementation comments. // Squaring is simpler, since it never gets asymmetric. assert(result.length < uint.max, "Operands too large"); assert(result.length == 2*x.length); if (x.length <= KARATSUBASQUARELIMIT) { return squareSimple(result, x); } // half length, round up. auto half = (x.length >> 1) + (x.length & 1); const(BigDigit)[] x0 = x[0 .. half]; const(BigDigit)[] x1 = x[half .. $]; BigDigit [] mid = scratchbuff[0 .. half*2]; BigDigit [] newscratchbuff = scratchbuff[half*2 .. $]; // initially use result to store temporaries BigDigit [] xdiff= result[0 .. half]; BigDigit [] ydiff = result[half .. half*2]; // First, we calculate mid. We don't need its sign inplaceSub(xdiff, x0, x1); squareKaratsuba(mid, xdiff, newscratchbuff); // Set result = x0x0 + (N*N)*x1x1 squareKaratsuba(result[0 .. 2*half], x0, newscratchbuff); squareKaratsuba(result[2*half .. $], x1, newscratchbuff); /* result += N * (x0x0 + x1x1) Do this with three half-length additions. With a = x0x0, b = x1x1: R1 = aHI + bLO + aLO R2 = aHI + bLO + aHI + carry_from_R1 R3 = bHi + carry_from_R2 */ BigDigit[] R1 = result[half..half*2]; BigDigit[] R2 = result[half*2..half*3]; BigDigit[] R3 = result[half*3..$]; BigDigit c1 = multibyteAdd(R2, R2, R1, 0); // c1:R2 = R2 + R1 BigDigit c2 = multibyteAdd(R1, R2, result[0..half], 0); // c2:R1 = R2 + R1 + R0 BigDigit c3 = addAssignSimple(R2, R3); // R2 = R2 + R1 + R3 if (c1+c2) multibyteIncrementAssign!('+')(result[half*2..$], c1+c2); if (c1+c3) multibyteIncrementAssign!('+')(R3, c1+c3); // And finally we subtract mid, which is always positive subAssignSimple(result[half..$], mid); } /* Knuth's Algorithm D, as presented in * H.S. Warren, "Hacker's Delight", Addison-Wesley Professional (2002). * Also described in "Modern Computer Arithmetic" 0.2, Exercise 1.8.18. * Given u and v, calculates quotient = u / v, u = u % v. * v must be normalized (ie, the MSB of v must be 1). * The most significant words of quotient and u may be zero. * u[0..v.length] holds the remainder. */ void schoolbookDivMod(BigDigit [] quotient, BigDigit [] u, in BigDigit [] v) pure { assert(quotient.length == u.length - v.length); assert(v.length > 1); assert(u.length >= v.length); assert((v[$-1]&0x8000_0000)!=0); assert(u[$-1] < v[$-1]); // BUG: This code only works if BigDigit is uint. uint vhi = v[$-1]; uint vlo = v[$-2]; for (ptrdiff_t j = u.length - v.length - 1; j >= 0; j--) { // Compute estimate of quotient[j], // qhat = (three most significant words of u)/(two most sig words of v). uint qhat; if (u[j + v.length] == vhi) { // uu/vhi could exceed uint.max (it will be 0x8000_0000 or 0x8000_0001) qhat = uint.max; } else { uint ulo = u[j + v.length - 2]; version(D_InlineAsm_X86) { // Note: On DMD, this is only ~10% faster than the non-asm code. uint *p = &u[j + v.length - 1]; asm { mov EAX, p; mov EDX, [EAX+4]; mov EAX, [EAX]; div dword ptr [vhi]; mov qhat, EAX; mov ECX, EDX; div3by2correction: mul dword ptr [vlo]; // EDX:EAX = qhat * vlo sub EAX, ulo; sbb EDX, ECX; jbe div3by2done; mov EAX, qhat; dec EAX; mov qhat, EAX; add ECX, dword ptr [vhi]; jnc div3by2correction; div3by2done: ; } } else { // version(InlineAsm) ulong uu = (cast(ulong)(u[j + v.length]) << 32) | u[j + v.length - 1]; ulong bigqhat = uu / vhi; ulong rhat = uu - bigqhat * vhi; qhat = cast(uint)bigqhat; again: if (cast(ulong)qhat * vlo > ((rhat << 32) + ulo)) { --qhat; rhat += vhi; if (!(rhat & 0xFFFF_FFFF_0000_0000L)) goto again; } } // version(InlineAsm) } // Multiply and subtract. uint carry = multibyteMulAdd!('-')(u[j..j + v.length], v, qhat, 0); if (u[j+v.length] < carry) { // If we subtracted too much, add back --qhat; carry -= multibyteAdd(u[j..j + v.length],u[j..j + v.length], v, 0); } quotient[j] = qhat; u[j + v.length] = u[j + v.length] - carry; } } private: // TODO: Replace with a library call void itoaZeroPadded(char[] output, uint value, int radix = 10) pure { ptrdiff_t x = output.length - 1; for( ; x >= 0; --x) { output[x]= cast(char)(value % radix + '0'); value /= radix; } } void toHexZeroPadded(char[] output, uint value) pure { ptrdiff_t x = output.length - 1; static immutable string hexDigits = "0123456789ABCDEF"; for( ; x>=0; --x) { output[x] = hexDigits[value & 0xF]; value >>= 4; } } private: // Returns the highest value of i for which left[i]!=right[i], // or 0 if left[] == right[] size_t highestDifferentDigit(const BigDigit [] left, const BigDigit [] right) pure { assert(left.length == right.length); for (ptrdiff_t i = left.length - 1; i>0; --i) { if (left[i] != right[i]) return i; } return 0; } // Returns the lowest value of i for which x[i]!=0. int firstNonZeroDigit(const BigDigit [] x) pure { int k = 0; while (x[k]==0) { ++k; assert(k<x.length); } return k; } import core.stdc.stdio; /* Calculate quotient and remainder of u / v using fast recursive division. v must be normalised, and must be at least half as long as u. Given u and v, v normalised, calculates quotient = u/v, u = u%v. scratch is temporary storage space, length must be >= quotient + 1. Returns: u[0..v.length] is the remainder. u[v.length..$] is corrupted. Implements algorithm 1.8 from MCA. This algorithm has an annoying special case. After the first recursion, the highest bit of the quotient may be set. This means that in the second recursive call, the 'in' contract would be violated. (This happens only when the top quarter of u is equal to the top half of v. A base 10 equivalent example of this situation is 5517/56; the first step gives 55/5 = 11). To maintain the in contract, we pad a zero to the top of both u and the quotient. 'mayOverflow' indicates that that the special case has occurred. (In MCA, a different strategy is used: the in contract is weakened, and schoolbookDivMod is more general: it allows the high bit of u to be set). See also: - C. Burkinel and J. Ziegler, "Fast Recursive Division", MPI-I-98-1-022, Max-Planck Institute fuer Informatik, (Oct 1998). */ void recursiveDivMod(BigDigit[] quotient, BigDigit[] u, const(BigDigit)[] v, BigDigit[] scratch, bool mayOverflow = false) pure in { // v must be normalized assert(v.length > 1); assert((v[$ - 1] & 0x8000_0000) != 0); assert(!(u[$ - 1] & 0x8000_0000)); assert(quotient.length == u.length - v.length); if (mayOverflow) { assert(u[$-1] == 0); assert(u[$-2] & 0x8000_0000); } // Must be symmetric. Use block schoolbook division if not. assert((mayOverflow ? u.length-1 : u.length) <= 2 * v.length); assert((mayOverflow ? u.length-1 : u.length) >= v.length); assert(scratch.length >= quotient.length + (mayOverflow ? 0 : 1)); } body { if (quotient.length < FASTDIVLIMIT) { return schoolbookDivMod(quotient, u, v); } // Split quotient into two halves, but keep padding in the top half auto k = (mayOverflow ? quotient.length - 1 : quotient.length) >> 1; // RECURSION 1: Calculate the high half of the quotient // Note that if u and quotient were padded, they remain padded during // this call, so in contract is satisfied. recursiveDivMod(quotient[k .. $], u[2 * k .. $], v[k .. $], scratch, mayOverflow); // quotient[k..$] is our guess at the high quotient. // u[2*k.. 2.*k + v.length - k = k + v.length] is the high part of the // first remainder. u[0..2*k] is the low part. // Calculate the full first remainder to be // remainder - highQuotient * lowDivisor // reducing highQuotient until the remainder is positive. // The low part of the remainder, u[0..k], cannot be altered by this. adjustRemainder(quotient[k .. $], u[k .. k + v.length], v, k, scratch[0 .. quotient.length], mayOverflow); // RECURSION 2: Calculate the low half of the quotient // The full first remainder is now in u[0..k + v.length]. if (u[k + v.length - 1] & 0x8000_0000) { // Special case. The high quotient is 0x1_00...000 or 0x1_00...001. // This means we need an extra quotient word for the next recursion. // We need to restore the invariant for the recursive calls. // We do this by padding both u and quotient. Extending u is trivial, // because the higher words will not be used again. But for the // quotient, we're clobbering the low word of the high quotient, // so we need save it, and add it back in after the recursive call. auto clobberedQuotient = quotient[k]; u[k+v.length] = 0; recursiveDivMod(quotient[0 .. k+1], u[k .. k + v.length+1], v[k .. $], scratch, true); adjustRemainder(quotient[0 .. k+1], u[0 .. v.length], v, k, scratch[0 .. 2 * k+1], true); // Now add the quotient word that got clobbered earlier. multibyteIncrementAssign!('+')(quotient[k..$], clobberedQuotient); } else { // The special case has NOT happened. recursiveDivMod(quotient[0 .. k], u[k .. k + v.length], v[k .. $], scratch, false); // high remainder is in u[k..k+(v.length-k)] == u[k .. v.length] adjustRemainder(quotient[0 .. k], u[0 .. v.length], v, k, scratch[0 .. 2 * k]); } } // rem -= quot * v[0..k]. // If would make rem negative, decrease quot until rem is >=0. // Needs (quot.length * k) scratch space to store the result of the multiply. void adjustRemainder(BigDigit[] quot, BigDigit[] rem, const(BigDigit)[] v, ptrdiff_t k, BigDigit[] scratch, bool mayOverflow = false) pure { assert(rem.length == v.length); mulInternal(scratch, quot, v[0 .. k]); uint carry = 0; if (mayOverflow) carry = scratch[$-1] + subAssignSimple(rem, scratch[0..$-1]); else carry = subAssignSimple(rem, scratch); while(carry) { multibyteIncrementAssign!('-')(quot, 1); // quot-- carry -= multibyteAdd(rem, rem, v, 0); } } // Cope with unbalanced division by performing block schoolbook division. void blockDivMod(BigDigit [] quotient, BigDigit [] u, in BigDigit [] v) pure { assert(quotient.length == u.length - v.length); assert(v.length > 1); assert(u.length >= v.length); assert((v[$-1] & 0x8000_0000)!=0); assert((u[$-1] & 0x8000_0000)==0); BigDigit [] scratch = new BigDigit[v.length + 1]; // Perform block schoolbook division, with 'v.length' blocks. auto m = u.length - v.length; while (m > v.length) { bool mayOverflow = (u[m + v.length -1 ] & 0x8000_0000)!=0; BigDigit saveq; if (mayOverflow) { u[m + v.length] = 0; saveq = quotient[m]; } recursiveDivMod(quotient[m-v.length..m + (mayOverflow? 1: 0)], u[m - v.length..m + v.length + (mayOverflow? 1: 0)], v, scratch, mayOverflow); if (mayOverflow) { assert(quotient[m] == 0); quotient[m] = saveq; } m -= v.length; } recursiveDivMod(quotient[0..m], u[0..m + v.length], v, scratch); delete scratch; } version(unittest) { import std.c.stdio; } unittest { void printBiguint(const uint [] data) { char [] buff = biguintToHex(new char[data.length*9], data, '_'); printf("%.*s\n", buff.length, buff.ptr); } void printDecimalBigUint(BigUint data) { auto str = data.toDecimalString(0); printf("%.*s\n", str.length, str.ptr); } uint [] a, b; a = new uint[43]; b = new uint[179]; for (int i=0; i<a.length; ++i) a[i] = 0x1234_B6E9 + i; for (int i=0; i<b.length; ++i) b[i] = 0x1BCD_8763 - i*546; a[$-1] |= 0x8000_0000; uint [] r = new uint[a.length]; uint [] q = new uint[b.length-a.length+1]; divModInternal(q, r, b, a); q = q[0..$-1]; uint [] r1 = r.dup; uint [] q1 = q.dup; blockDivMod(q, b, a); r = b[0..a.length]; assert(r[] == r1[]); assert(q[] == q1[]); }
D
/Users/Yowa/WorkSpace/Pokedex/Build/Intermediates/Pokedex.build/Debug/Fluent.build/Objects-normal/x86_64/Migration.o : /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Database/Database.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Database/Driver.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Entity/Entity.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Memory/Memory+Filters.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Memory/Memory+Group.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Memory/Memory+Sort.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Memory/MemoryDriver.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Preparation/Database+Preparation.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Preparation/Migration.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Preparation/Preparation.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Preparation/PreparationError.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Query/Action.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Query/Comparison.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Query/Filter.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Query/Group.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Query/Join.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Query/Limit.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Query/Query.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Query/Scope.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Query/Sort.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Relations/Children.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Relations/Parent.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Relations/RelationError.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Relations/Siblings.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Schema/Database+Schema.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Schema/Schema+Creator.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Schema/Schema+Field.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Schema/Schema+Modifier.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Schema/Schema.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/SQL/GeneralSQLSerializer.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/SQL/SQL+Query.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/SQL/SQL+Schema.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/SQL/SQL.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/SQL/SQLSerializer.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Utilities/Fluent+Node.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /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/Darwin.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/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Users/Yowa/WorkSpace/Pokedex/Build/Products/Debug/Node.framework/Modules/Node.swiftmodule/x86_64.swiftmodule /Users/Yowa/WorkSpace/Pokedex/Build/Products/Debug/PathIndexable.framework/Modules/PathIndexable.swiftmodule/x86_64.swiftmodule /Users/Yowa/WorkSpace/Pokedex/Build/Products/Debug/Polymorphic.framework/Modules/Polymorphic.swiftmodule/x86_64.swiftmodule /Users/Yowa/WorkSpace/Pokedex/Build/Intermediates/Pokedex.build/Debug/Fluent.build/Objects-normal/x86_64/Migration~partial.swiftmodule : /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Database/Database.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Database/Driver.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Entity/Entity.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Memory/Memory+Filters.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Memory/Memory+Group.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Memory/Memory+Sort.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Memory/MemoryDriver.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Preparation/Database+Preparation.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Preparation/Migration.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Preparation/Preparation.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Preparation/PreparationError.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Query/Action.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Query/Comparison.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Query/Filter.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Query/Group.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Query/Join.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Query/Limit.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Query/Query.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Query/Scope.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Query/Sort.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Relations/Children.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Relations/Parent.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Relations/RelationError.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Relations/Siblings.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Schema/Database+Schema.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Schema/Schema+Creator.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Schema/Schema+Field.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Schema/Schema+Modifier.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Schema/Schema.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/SQL/GeneralSQLSerializer.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/SQL/SQL+Query.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/SQL/SQL+Schema.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/SQL/SQL.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/SQL/SQLSerializer.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Utilities/Fluent+Node.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /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/Darwin.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/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Users/Yowa/WorkSpace/Pokedex/Build/Products/Debug/Node.framework/Modules/Node.swiftmodule/x86_64.swiftmodule /Users/Yowa/WorkSpace/Pokedex/Build/Products/Debug/PathIndexable.framework/Modules/PathIndexable.swiftmodule/x86_64.swiftmodule /Users/Yowa/WorkSpace/Pokedex/Build/Products/Debug/Polymorphic.framework/Modules/Polymorphic.swiftmodule/x86_64.swiftmodule /Users/Yowa/WorkSpace/Pokedex/Build/Intermediates/Pokedex.build/Debug/Fluent.build/Objects-normal/x86_64/Migration~partial.swiftdoc : /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Database/Database.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Database/Driver.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Entity/Entity.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Memory/Memory+Filters.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Memory/Memory+Group.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Memory/Memory+Sort.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Memory/MemoryDriver.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Preparation/Database+Preparation.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Preparation/Migration.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Preparation/Preparation.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Preparation/PreparationError.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Query/Action.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Query/Comparison.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Query/Filter.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Query/Group.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Query/Join.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Query/Limit.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Query/Query.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Query/Scope.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Query/Sort.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Relations/Children.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Relations/Parent.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Relations/RelationError.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Relations/Siblings.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Schema/Database+Schema.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Schema/Schema+Creator.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Schema/Schema+Field.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Schema/Schema+Modifier.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Schema/Schema.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/SQL/GeneralSQLSerializer.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/SQL/SQL+Query.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/SQL/SQL+Schema.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/SQL/SQL.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/SQL/SQLSerializer.swift /Users/Yowa/WorkSpace/Pokedex/Packages/Fluent-1.0.0/Sources/Fluent/Utilities/Fluent+Node.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /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/Darwin.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/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/IOKit.swiftmodule /Users/Yowa/WorkSpace/Pokedex/Build/Products/Debug/Node.framework/Modules/Node.swiftmodule/x86_64.swiftmodule /Users/Yowa/WorkSpace/Pokedex/Build/Products/Debug/PathIndexable.framework/Modules/PathIndexable.swiftmodule/x86_64.swiftmodule /Users/Yowa/WorkSpace/Pokedex/Build/Products/Debug/Polymorphic.framework/Modules/Polymorphic.swiftmodule/x86_64.swiftmodule
D
module xf.rt.Misc; private { import xf.omg.core.LinearAlgebra : vec3, vec3ub, vec2i; import xf.omg.core.CoordSys : CoordSys; import tango.io.device.File : FileConduit = File; import tango.io.stream.DataFile: DataFileOutput; } void writeTGA(vec3ub delegate(int x, int y) data, vec2i origin, vec2i size, char[] filename) { auto fc = new FileConduit(filename, FileConduit.WriteCreate); auto output = new DataFileOutput(fc); output.int8(0); output.int8(0); output.int8(2); output.int16(0); output.int16(0); output.int8(0); output.int16(0); output.int16(0); output.int16(size.x); output.int16(size.y); output.int8(24); output.int8(0); int y = size.y + origin.y; while (y--) { for (uint x = origin.x; x < origin.x + size.x; ++x) { vec3ub col = data(x, y); output.int8(col.b); output.int8(col.g); output.int8(col.r); } } output.flush(); fc.close(); }
D
func void B_ClearFMC() { B_KillNpc(SLD_750_Soeldner); B_KillNpc(SLD_751_Soeldner); B_KillNpc(SLD_752_Okyl); B_KillNpc(SLD_753_Baloro); B_KillNpc(SLD_755_Soeldner); B_KillNpc(SLD_756_Soeldner); B_KillNpc(SLD_757_Soeldner); B_KillNpc(SLD_758_Soeldner); B_KillNpc(SLD_759_Soeldner); B_KillNpc(SLD_760_Soeldner); B_KillNpc(SLD_761_Soeldner); B_KillNpc(SLD_762_Soeldner); B_KillNpc(SLD_763_Soeldner); B_KillNpc(SLD_764_Soeldner); B_KillNpc(SLD_765_Soeldner); B_KillNpc(SFB_1030_Schuerfer); B_KillNpc(SFB_1031_Schuerfer); B_KillNpc(SFB_1032_Schuerfer); B_KillNpc(SFB_1033_Schuerfer); B_KillNpc(SFB_1034_Schuerfer); B_KillNpc(SFB_1035_Schuerfer); B_KillNpc(SFB_1036_Schuerfer); B_KillNpc(SFB_1037_Swiney); B_KillNpc(SFB_1038_Schuerfer); B_KillNpc(SFB_1039_Schuerfer); B_KillNpc(SFB_1040_Schuerfer); B_KillNpc(SFB_1041_Schuerfer); B_KillNpc(SFB_1042_Schuerfer); B_KillNpc(SFB_1043_Schuerfer); B_KillNpc(SFB_1044_Schuerfer); B_KillNpc(ORG_890_Organisator); B_KillNpc(ORG_891_Organisator); B_KillNpc(ORG_892_Organisator); Wld_InsertNpc(Grd_283_Gardist,"FMC_ENTRANCE"); Wld_InsertNpc(Grd_285_Gardist,"FMC_ENTRANCE"); };
D
instance VLK_6001_mythrilarbeiter (Npc_Default) { // ------ NSC ------ name = "Arbeiter"; guild = GIL_VLK; id = 6001; voice = 13; flags = 0; //NPC_FLAG_IMMORTAL oder 0 npctype = NPCTYPE_MAIN; // ------ Attribute ------ B_SetAttributesToChapter (self, 1); //setzt Attribute und LEVEL entsprechend dem angegebenen Kapitel (1-6) // ------ Kampf-Taktik ------ fight_tactic = FAI_HUMAN_COWARD; // MASTER / STRONG / COWARD // ------ Equippte Waffen ------ //Munition wird automatisch generiert, darf aber angegeben werden EquipItem (self, ItMw_2H_Axe_L_01 ); // ------ Inventory ------ B_CreateAmbientInv (self); // ------ visuals ------ //Muss NACH Attributen kommen, weil in B_SetNpcVisual die Breite abh. v. STR skaliert wird B_SetNpcVisual (self, MALE, "Hum_Head_Bald", Face_N_NormalBart05, BodyTex_N, ITAR_Prisoner); Mdl_SetModelFatness (self, 1); Mdl_ApplyOverlayMds (self, "Humans_Tired.mds"); // Tired / Militia / Mage / Arrogance / Relaxed // ------ NSC-relevante Talente vergeben ------ B_GiveNpcTalents (self); // ------ Kampf-Talente ------ //Der enthaltene B_AddFightSkill setzt Talent-Ani abhängig von TrefferChance% - alle Kampftalente werden gleichhoch gesetzt B_SetFightSkills (self, 15); //Grenzen für Talent-Level liegen bei 30 und 60 // ------ TA anmelden ------ daily_routine = Rtn_Start_6001; }; FUNC VOID Rtn_Start_6001 () { TA_Pick_Ore (08,00,23,00,"HL_MM_01"); TA_smalltalk (23,00,08,00,"HL_ST_01"); }; FUNC VOID Rtn_MALERT_6001 () { TA_Smalltalk (08,00,23,00,"HL_ST_01"); TA_Pick_Ore (23,00,08,00,"HL_ST_01"); };
D
<?xml version="1.0" encoding="ASCII"?> <di:SashWindowsMngr xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi"> <pageList> <availablePage> <emfPageIdentifier href="completeClass.notation#_83_9kCRyEeOxVbFOS1iXXw"/> </availablePage> </pageList> <sashModel currentSelection="//@sashModel/@windows.0/@children.0"> <windows> <children xsi:type="di:TabFolder"> <children> <emfPageIdentifier href="completeClass.notation#_83_9kCRyEeOxVbFOS1iXXw"/> </children> </children> </windows> </sashModel> </di:SashWindowsMngr>
D
/** * This module provides OS specific helper function for DLL support * * Copyright: Copyright Digital Mars 2010 - 2012. * License: Distributed under the * $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0). * (See accompanying file LICENSE) * Authors: Rainer Schuetze * Source: $(DRUNTIMESRC core/sys/windows/_dll.d) */ module core.sys.windows.dll; version (Windows): @system: import core.sys.windows.winbase; import core.sys.windows.winnt; import core.stdc.string; import core.runtime; public import core.sys.windows.threadaux; /////////////////////////////////////////////////////////////////// // support fixing implicit TLS for dynamically loaded DLLs on Windows XP // in this special case, we have to treat _tlsstart and _tlsend as non-TLS variables // as they are used to simulate TLS when it is not set up under XP. In this case we must // not access tls_array[tls_index] as needed for thread local _tlsstart and _tlsend extern (C) { version (Win32) { version (CRuntime_DigitalMars) { extern __gshared byte _tlsstart; extern __gshared byte _tlsend; extern __gshared void* _tls_callbacks_a; } else version (CRuntime_Microsoft) { extern __gshared byte _tls_start; extern __gshared byte _tls_end; extern __gshared void* __xl_a; alias _tls_start _tlsstart; alias _tls_end _tlsend; alias __xl_a _tls_callbacks_a; } extern __gshared int _tls_index; } } extern (C) // rt.minfo { void rt_moduleTlsCtor(); void rt_moduleTlsDtor(); } private: struct dll_aux { // don't let symbols leak into other modules version (Win32) { struct LdrpTlsListEntry { LdrpTlsListEntry* next; LdrpTlsListEntry* prev; void* tlsstart; void* tlsend; void* ptr_tlsindex; void* callbacks; void* zerofill; int tlsindex; } alias fnRtlAllocateHeap = extern(Windows) void* function(void* HeapHandle, uint Flags, size_t Size) nothrow; // find a code sequence and return the address after the sequence static void* findCodeSequence( void* adr, int len, ref ubyte[] pattern ) nothrow { if ( !adr ) return null; ubyte* code = cast(ubyte*) adr; for ( int p = 0; p < len; p++ ) { if ( code[ p .. p + pattern.length ] == pattern[ 0 .. $ ] ) { ubyte* padr = code + p + pattern.length; return padr; } } return null; } // find a code sequence and return the (relative) address that follows static void* findCodeReference( void* adr, int len, ref ubyte[] pattern, bool relative ) nothrow { if ( !adr ) return null; ubyte* padr = cast(ubyte*) findCodeSequence( adr, len, pattern ); if ( padr ) { if ( relative ) return padr + 4 + *cast(int*) padr; return *cast(void**) padr; } return null; } // crawl through ntdll to find function _LdrpAllocateTls@0 and references // to _LdrpNumberOfTlsEntries, _NtdllBaseTag and _LdrpTlsList // LdrInitializeThunk // -> _LdrpInitialize@12 // -> _LdrpInitializeThread@4 // -> _LdrpAllocateTls@0 // -> je chunk // _LdrpNumberOfTlsEntries - number of entries in TlsList // _NtdllBaseTag - tag used for RtlAllocateHeap // _LdrpTlsList - root of the double linked list with TlsList entries static __gshared int* pNtdllBaseTag; // remembered for reusage in addTlsData static __gshared ubyte[] jmp_LdrpInitialize = [ 0x33, 0xED, 0xE9 ]; // xor ebp,ebp; jmp _LdrpInitialize static __gshared ubyte[] jmp__LdrpInitialize = [ 0x5D, 0xE9 ]; // pop ebp; jmp __LdrpInitialize static __gshared ubyte[] jmp__LdrpInitialize_xp64 = [ 0x5D, 0x90, 0x90, 0x90, 0x90, 0x90 ]; // pop ebp; nop; nop; nop; nop; nop; static __gshared ubyte[] call_LdrpInitializeThread = [ 0xFF, 0x75, 0x08, 0xE8 ]; // push [ebp+8]; call _LdrpInitializeThread static __gshared ubyte[] call_LdrpAllocateTls = [ 0x00, 0x00, 0xE8 ]; // jne 0xc3; call _LdrpAllocateTls static __gshared ubyte[] call_LdrpAllocateTls_svr03 = [ 0x65, 0xfc, 0x00, 0xE8 ]; // and [ebp+fc], 0; call _LdrpAllocateTls static __gshared ubyte[] jne_LdrpAllocateTls = [ 0x0f, 0x85 ]; // jne body_LdrpAllocateTls static __gshared ubyte[] mov_LdrpNumberOfTlsEntries = [ 0x8B, 0x0D ]; // mov ecx, _LdrpNumberOfTlsEntries static __gshared ubyte[] mov_NtdllBaseTag = [ 0x51, 0x8B, 0x0D ]; // push ecx; mov ecx, _NtdllBaseTag static __gshared ubyte[] mov_NtdllBaseTag_srv03 = [ 0x50, 0xA1 ]; // push eax; mov eax, _NtdllBaseTag static __gshared ubyte[] mov_LdrpTlsList = [ 0x8B, 0x3D ]; // mov edi, _LdrpTlsList static LdrpTlsListEntry* addTlsListEntry( void** peb, void* tlsstart, void* tlsend, void* tls_callbacks_a, int* tlsindex ) nothrow { HANDLE hnd = GetModuleHandleA( "NTDLL" ); assert( hnd, "cannot get module handle for ntdll" ); ubyte* fn = cast(ubyte*) GetProcAddress( hnd, "LdrInitializeThunk" ); assert( fn, "cannot find LdrInitializeThunk in ntdll" ); void* pLdrpInitialize = findCodeReference( fn, 20, jmp_LdrpInitialize, true ); void* p_LdrpInitialize = findCodeReference( pLdrpInitialize, 40, jmp__LdrpInitialize, true ); if ( !p_LdrpInitialize ) p_LdrpInitialize = findCodeSequence( pLdrpInitialize, 40, jmp__LdrpInitialize_xp64 ); void* pLdrpInitializeThread = findCodeReference( p_LdrpInitialize, 200, call_LdrpInitializeThread, true ); void* pLdrpAllocateTls = findCodeReference( pLdrpInitializeThread, 40, call_LdrpAllocateTls, true ); if (!pLdrpAllocateTls) pLdrpAllocateTls = findCodeReference( pLdrpInitializeThread, 100, call_LdrpAllocateTls_svr03, true ); void* pBodyAllocateTls = findCodeReference( pLdrpAllocateTls, 40, jne_LdrpAllocateTls, true ); int* pLdrpNumberOfTlsEntries = cast(int*) findCodeReference( pBodyAllocateTls, 60, mov_LdrpNumberOfTlsEntries, false ); pNtdllBaseTag = cast(int*) findCodeReference( pBodyAllocateTls, 30, mov_NtdllBaseTag, false ); if (!pNtdllBaseTag) pNtdllBaseTag = cast(int*) findCodeReference( pBodyAllocateTls, 30, mov_NtdllBaseTag_srv03, false ); LdrpTlsListEntry* pLdrpTlsList = cast(LdrpTlsListEntry*)findCodeReference( pBodyAllocateTls, 80, mov_LdrpTlsList, false ); if ( !pLdrpNumberOfTlsEntries || !pNtdllBaseTag || !pLdrpTlsList ) return null; fnRtlAllocateHeap fnAlloc = cast(fnRtlAllocateHeap) GetProcAddress( hnd, "RtlAllocateHeap" ); if ( !fnAlloc ) return null; // allocate new TlsList entry (adding 0xC0000 to the tag is obviously a flag also usesd by // the nt-loader, could be the result of HEAP_MAKE_TAG_FLAGS(0,HEAP_NO_SERIALIZE|HEAP_GROWABLE) // but this is not documented in the msdn entry for RtlAlloateHeap void* heap = peb[6]; LdrpTlsListEntry* entry = cast(LdrpTlsListEntry*) (*fnAlloc)( heap, *pNtdllBaseTag | 0xc0000, LdrpTlsListEntry.sizeof ); if ( !entry ) return null; // fill entry entry.tlsstart = tlsstart; entry.tlsend = tlsend; entry.ptr_tlsindex = tlsindex; entry.callbacks = tls_callbacks_a; entry.zerofill = null; entry.tlsindex = *pLdrpNumberOfTlsEntries; // and add it to the end of TlsList *tlsindex = *pLdrpNumberOfTlsEntries; entry.next = pLdrpTlsList; entry.prev = pLdrpTlsList.prev; pLdrpTlsList.prev.next = entry; pLdrpTlsList.prev = entry; (*pLdrpNumberOfTlsEntries)++; return entry; } // reallocate TLS array and create a copy of the TLS data section static bool addTlsData( void** teb, void* tlsstart, void* tlsend, int tlsindex ) nothrow { HANDLE hnd = GetModuleHandleA( "NTDLL" ); assert( hnd, "cannot get module handle for ntdll" ); fnRtlAllocateHeap fnAlloc = cast(fnRtlAllocateHeap) GetProcAddress( hnd, "RtlAllocateHeap" ); if ( !fnAlloc || !pNtdllBaseTag ) return false; void** peb = cast(void**) teb[12]; void* heap = peb[6]; auto sz = tlsend - tlsstart; void* tlsdata = cast(void*) (*fnAlloc)( heap, *pNtdllBaseTag | 0xc0000, sz ); if ( !tlsdata ) return false; // no relocations! not even self-relocations. Windows does not do them. core.stdc.string.memcpy( tlsdata, tlsstart, sz ); // create copy of tls pointer array void** array = cast(void**) (*fnAlloc)( heap, *pNtdllBaseTag | 0xc0000, (tlsindex + 1) * (void*).sizeof ); if ( !array ) return false; if ( tlsindex > 0 && teb[11] ) core.stdc.string.memcpy( array, teb[11], tlsindex * (void*).sizeof); array[tlsindex] = tlsdata; teb[11] = cast(void*) array; // let the old array leak, in case a oncurrent thread is still relying on it return true; } } // Win32 alias bool BOOLEAN; struct UNICODE_STRING { short Length; short MaximumLength; wchar* Buffer; } struct LIST_ENTRY { LIST_ENTRY* next; LIST_ENTRY* prev; } // the following structures can be found here: // https://www.geoffchappell.com/studies/windows/win32/ntdll/structs/ldr_data_table_entry.htm // perhaps this should be same as LDR_DATA_TABLE_ENTRY, which is introduced with PEB_LDR_DATA struct LDR_MODULE { LIST_ENTRY InLoadOrderModuleList; LIST_ENTRY InMemoryOrderModuleList; LIST_ENTRY InInitializationOrderModuleList; PVOID BaseAddress; PVOID EntryPoint; SIZE_T SizeOfImage; UNICODE_STRING FullDllName; UNICODE_STRING BaseDllName; ULONG Flags; SHORT LoadCount; // obsolete after Version 6.1 SHORT TlsIndex; LIST_ENTRY HashTableEntry; ULONG TimeDateStamp; PVOID EntryPointActivationContext; PVOID PatchInformation; LDR_DDAG_NODE *DdagNode; // starting with Version 6.2 } struct LDR_DDAG_NODE { LIST_ENTRY Modules; void* ServiceTagList; // LDR_SERVICE_TAG_RECORD ULONG LoadCount; ULONG ReferenceCount; // Version 10: ULONG LoadWhileUnloadingCount; ULONG DependencyCount; // Version 10: ULONG LowestLink; } struct PEB_LDR_DATA { ULONG Length; BOOLEAN Initialized; PVOID SsHandle; LIST_ENTRY InLoadOrderModuleList; LIST_ENTRY InMemoryOrderModuleList; LIST_ENTRY InInitializationOrderModuleList; } static LDR_MODULE* findLdrModule( HINSTANCE hInstance, void** peb ) nothrow @nogc { PEB_LDR_DATA* ldrData = cast(PEB_LDR_DATA*) peb[3]; LIST_ENTRY* root = &ldrData.InLoadOrderModuleList; for (LIST_ENTRY* entry = root.next; entry != root; entry = entry.next) { LDR_MODULE *ldrMod = cast(LDR_MODULE*) entry; if (ldrMod.BaseAddress == hInstance) return ldrMod; } return null; } static bool setDllTlsUsage( HINSTANCE hInstance, void** peb ) nothrow { LDR_MODULE *thisMod = findLdrModule( hInstance, peb ); if ( !thisMod ) return false; thisMod.TlsIndex = -1; // uses TLS (not the index itself) thisMod.LoadCount = -1; // never unload return true; } } public: /* ***************************************************** * Fix implicit thread local storage for the case when a DLL is loaded * dynamically after process initialization. * The link time variables are passed to allow placing this function into * an RTL DLL itself. * The problem is described in Bugzilla 3342 and * http://www.nynaeve.net/?p=187, to quote from the latter: * * "When a DLL using implicit TLS is loaded, because the loader doesn't process the TLS * directory, the _tls_index value is not initialized by the loader, nor is there space * allocated for module's TLS data in the ThreadLocalStoragePointer arrays of running * threads. The DLL continues to load, however, and things will appear to work... until the * first access to a __declspec(thread) variable occurs, that is." * * _tls_index is initialized by the compiler to 0, so we can use this as a test. */ bool dll_fixTLS( HINSTANCE hInstance, void* tlsstart, void* tlsend, void* tls_callbacks_a, int* tlsindex ) nothrow { version (GNU_EMUTLS) return true; else version (Win64) return true; // fixed else version (Win32) { /* If the OS has allocated a TLS slot for us, we don't have to do anything * tls_index 0 means: the OS has not done anything, or it has allocated slot 0 * Vista and later Windows systems should do this correctly and not need * this function. */ if ( *tlsindex != 0 ) return true; void** peb; asm pure nothrow @nogc { mov EAX,FS:[0x30]; mov peb, EAX; } dll_aux.LDR_MODULE *ldrMod = dll_aux.findLdrModule( hInstance, peb ); if ( !ldrMod ) return false; // not in module list, bail out if ( ldrMod.TlsIndex != 0 ) return true; // the OS has already setup TLS dll_aux.LdrpTlsListEntry* entry = dll_aux.addTlsListEntry( peb, tlsstart, tlsend, tls_callbacks_a, tlsindex ); if ( !entry ) return false; scope (failure) assert(0); // enforce nothrow, Bugzilla 13561 if ( !enumProcessThreads( function (uint id, void* context) nothrow { dll_aux.LdrpTlsListEntry* entry = cast(dll_aux.LdrpTlsListEntry*) context; return dll_aux.addTlsData( getTEB( id ), entry.tlsstart, entry.tlsend, entry.tlsindex ); }, entry ) ) return false; ldrMod.TlsIndex = -1; // flag TLS usage (not the index itself) ldrMod.LoadCount = -1; // prevent unloading of the DLL, // since XP does not keep track of used TLS entries return true; } } private extern (Windows) ULONGLONG VerSetConditionMask(ULONGLONG, DWORD, BYTE) nothrow @nogc; private bool isWindows8OrLater() nothrow @nogc { OSVERSIONINFOEXW osvi; osvi.dwOSVersionInfoSize = osvi.sizeof; DWORDLONG dwlConditionMask = VerSetConditionMask( VerSetConditionMask( VerSetConditionMask( 0, VER_MAJORVERSION, VER_GREATER_EQUAL), VER_MINORVERSION, VER_GREATER_EQUAL), VER_SERVICEPACKMAJOR, VER_GREATER_EQUAL); osvi.dwMajorVersion = 6; osvi.dwMinorVersion = 2; osvi.wServicePackMajor = 0; return VerifyVersionInfoW(&osvi, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR, dwlConditionMask) != FALSE; } /* ***************************************************** * Get the process reference count for the given DLL handle * Params: * hInstance = DLL instance handle * Returns: * the reference count for the DLL in the current process, * -1 if the DLL is implicitely loaded with the process * or -2 if the DLL handle is invalid */ int dll_getRefCount( HINSTANCE hInstance ) nothrow @nogc { void** peb; version (Win64) { asm pure nothrow @nogc { mov RAX, 0x60; mov RAX,GS:[RAX]; mov peb, RAX; } } else version (Win32) { asm pure nothrow @nogc { mov EAX,FS:[0x30]; mov peb, EAX; } } dll_aux.LDR_MODULE *ldrMod = dll_aux.findLdrModule( hInstance, peb ); if ( !ldrMod ) return -2; // not in module list, bail out if (isWindows8OrLater()) return ldrMod.DdagNode.LoadCount; return ldrMod.LoadCount; } // fixup TLS storage, initialize runtime and attach to threads // to be called from DllMain with reason DLL_PROCESS_ATTACH bool dll_process_attach( HINSTANCE hInstance, bool attach_threads, void* tlsstart, void* tlsend, void* tls_callbacks_a, int* tlsindex ) { version (Win32) { if ( !dll_fixTLS( hInstance, tlsstart, tlsend, tls_callbacks_a, tlsindex ) ) return false; } Runtime.initialize(); version (Shared) { return true; } else { if ( !attach_threads ) return true; // attach to all other threads return enumProcessThreads( function (uint id, void* context) { if ( !thread_findByAddr( id ) && !findLowLevelThread( id ) ) { // if the OS has not prepared TLS for us, don't attach to the thread if ( GetTlsDataAddress( id ) ) { thread_attachByAddr( id ); thread_moduleTlsCtor( id ); } } return true; }, null ); } // !Shared } // same as above, but only usable if druntime is linked statically bool dll_process_attach( HINSTANCE hInstance, bool attach_threads = true ) { version (Win64) { return dll_process_attach( hInstance, attach_threads, null, null, null, null ); } else version (Win32) { return dll_process_attach( hInstance, attach_threads, &_tlsstart, &_tlsend, &_tls_callbacks_a, &_tls_index ); } } // to be called from DllMain with reason DLL_PROCESS_DETACH void dll_process_detach( HINSTANCE hInstance, bool detach_threads = true ) { version (Shared) { /* not needed */ } else { // notify core.thread.joinLowLevelThread that the DLL is about to be unloaded thread_DLLProcessDetaching = true; // detach from all other threads if ( detach_threads ) enumProcessThreads( function (uint id, void* context) { if ( id != GetCurrentThreadId() ) { if ( auto t = thread_findByAddr( id ) ) { thread_moduleTlsDtor( id ); if ( !t.isMainThread() ) thread_detachByAddr( id ); } } return true; }, null ); } // !Shared Runtime.terminate(); } /* Make sure that tlsCtorRun is itself a tls variable */ static bool tlsCtorRun; static this() { tlsCtorRun = true; } static ~this() { tlsCtorRun = false; } // to be called from DllMain with reason DLL_THREAD_ATTACH bool dll_thread_attach( bool attach_thread = true, bool initTls = true ) { version (Shared) { /* not needed */ } else { // if the OS has not prepared TLS for us, don't attach to the thread // (happened when running under x64 OS) auto tid = GetCurrentThreadId(); if ( !GetTlsDataAddress( tid ) ) return false; if ( !thread_findByAddr( tid ) && !findLowLevelThread( tid ) ) { // only attach to thread and initalize it if it is not in the thread list (so it's not created by "new Thread") if ( attach_thread ) thread_attachThis(); if ( initTls && !tlsCtorRun ) // avoid duplicate calls rt_moduleTlsCtor(); } } // !Shared return true; } // to be called from DllMain with reason DLL_THREAD_DETACH bool dll_thread_detach( bool detach_thread = true, bool exitTls = true ) { version (Shared) { /* not needed */ } else { // if the OS has not prepared TLS for us, we did not attach to the thread if ( !GetTlsDataAddress( GetCurrentThreadId() ) ) return false; if ( thread_findByAddr( GetCurrentThreadId() ) ) { if ( exitTls && tlsCtorRun ) // avoid dtors to be run twice rt_moduleTlsDtor(); if ( detach_thread ) thread_detachThis(); } } // !Shared return true; } /// A simple mixin to provide a $(D DllMain) which calls the necessary /// runtime initialization and termination functions automatically. /// /// Instead of writing a custom $(D DllMain), simply write: /// /// --- /// mixin SimpleDllMain; /// --- mixin template SimpleDllMain() { import core.sys.windows.windef : HINSTANCE, BOOL, DWORD, LPVOID; extern(Windows) BOOL DllMain(HINSTANCE hInstance, DWORD ulReason, LPVOID reserved) { import core.sys.windows.winnt; import core.sys.windows.dll : dll_process_attach, dll_process_detach, dll_thread_attach, dll_thread_detach; switch (ulReason) { default: assert(0); case DLL_PROCESS_ATTACH: return dll_process_attach( hInstance, true ); case DLL_PROCESS_DETACH: dll_process_detach( hInstance, true ); return true; case DLL_THREAD_ATTACH: return dll_thread_attach( true, true ); case DLL_THREAD_DETACH: return dll_thread_detach( true, true ); } } }
D
/Users/kodainakamura/.go/src/github.com/kdnk/rust_introduction/src/ch07_ownership/target/debug/examples/toy_vec_01-12b1e87826ee375b: examples/toy_vec_01.rs /Users/kodainakamura/.go/src/github.com/kdnk/rust_introduction/src/ch07_ownership/target/debug/examples/toy_vec_01-12b1e87826ee375b.d: examples/toy_vec_01.rs examples/toy_vec_01.rs:
D
/++ A sum type for modern D. This module provides [SumType], an alternative to `std.variant.Algebraic` with [match|improved pattern-matching], full attribute correctness (`pure`, `@safe`, `@nogc`, and `nothrow` are inferred whenever possible), and no dependency on runtime type information (`TypeInfo`). License: MIT Authors: Paul Backus, Atila Neves +/ module sumtype; /// $(H3 Basic usage) @safe unittest { import std.math: approxEqual; struct Fahrenheit { double degrees; } struct Celsius { double degrees; } struct Kelvin { double degrees; } alias Temperature = SumType!(Fahrenheit, Celsius, Kelvin); // Construct from any of the member types. Temperature t1 = Fahrenheit(98.6); Temperature t2 = Celsius(100); Temperature t3 = Kelvin(273); // Use pattern matching to access the value. pure @safe @nogc nothrow Fahrenheit toFahrenheit(Temperature t) { return Fahrenheit( t.match!( (Fahrenheit f) => f.degrees, (Celsius c) => c.degrees * 9.0/5 + 32, (Kelvin k) => k.degrees * 9.0/5 - 459.4 ) ); } assert(toFahrenheit(t1).degrees.approxEqual(98.6)); assert(toFahrenheit(t2).degrees.approxEqual(212)); assert(toFahrenheit(t3).degrees.approxEqual(32)); // Use ref to modify the value in place. pure @safe @nogc nothrow void freeze(ref Temperature t) { t.match!( (ref Fahrenheit f) => f.degrees = 32, (ref Celsius c) => c.degrees = 0, (ref Kelvin k) => k.degrees = 273 ); } freeze(t1); assert(toFahrenheit(t1).degrees.approxEqual(32)); // Use a catch-all handler to give a default result. pure @safe @nogc nothrow bool isFahrenheit(Temperature t) { return t.match!( (Fahrenheit f) => true, _ => false ); } assert(isFahrenheit(t1)); assert(!isFahrenheit(t2)); assert(!isFahrenheit(t3)); } /** $(H3 Introspection-based matching) * * In the `length` and `horiz` functions below, the handlers for `match` do not * specify the types of their arguments. Instead, matching is done based on how * the argument is used in the body of the handler: any type with `x` and `y` * properties will be matched by the `rect` handlers, and any type with `r` and * `theta` properties will be matched by the `polar` handlers. */ @safe unittest { import std.math: approxEqual, cos, PI, sqrt; struct Rectangular { double x, y; } struct Polar { double r, theta; } alias Vector = SumType!(Rectangular, Polar); pure @safe @nogc nothrow double length(Vector v) { return v.match!( rect => sqrt(rect.x^^2 + rect.y^^2), polar => polar.r ); } pure @safe @nogc nothrow double horiz(Vector v) { return v.match!( rect => rect.x, polar => polar.r * cos(polar.theta) ); } Vector u = Rectangular(1, 1); Vector v = Polar(1, PI/4); assert(length(u).approxEqual(sqrt(2.0))); assert(length(v).approxEqual(1)); assert(horiz(u).approxEqual(1)); assert(horiz(v).approxEqual(sqrt(0.5))); } /** $(H3 Arithmetic expression evaluator) * * This example makes use of the special placeholder type `This` to define a * [https://en.wikipedia.org/wiki/Recursive_data_type|recursive data type]: an * [https://en.wikipedia.org/wiki/Abstract_syntax_tree|abstract syntax tree] for * representing simple arithmetic expressions. */ @safe unittest { import std.functional: partial; import std.traits: EnumMembers; import std.typecons: Tuple; enum Op : string { Plus = "+", Minus = "-", Times = "*", Div = "/" } // An expression is either // - a number, // - a variable, or // - a binary operation combining two sub-expressions. alias Expr = SumType!( double, string, Tuple!(Op, "op", This*, "lhs", This*, "rhs") ); // Shorthand for Tuple!(Op, "op", Expr*, "lhs", Expr*, "rhs"), // the Tuple type above with Expr substituted for This. alias BinOp = Expr.Types[2]; // Factory function for number expressions pure @safe Expr* num(double value) { return new Expr(value); } // Factory function for variable expressions pure @safe Expr* var(string name) { return new Expr(name); } // Factory function for binary operation expressions pure @safe Expr* binOp(Op op, Expr* lhs, Expr* rhs) { return new Expr(BinOp(op, lhs, rhs)); } // Convenience wrappers for creating BinOp expressions alias sum = partial!(binOp, Op.Plus); alias diff = partial!(binOp, Op.Minus); alias prod = partial!(binOp, Op.Times); alias quot = partial!(binOp, Op.Div); // Evaluate expr, looking up variables in env pure @safe nothrow double eval(Expr expr, double[string] env) { return expr.match!( (double num) => num, (string var) => env[var], (BinOp bop) { double lhs = eval(*bop.lhs, env); double rhs = eval(*bop.rhs, env); final switch(bop.op) { static foreach(op; EnumMembers!Op) { case op: return mixin("lhs" ~ op ~ "rhs"); } } } ); } // Return a "pretty-printed" representation of expr @safe string pprint(Expr expr) { import std.format; return expr.match!( (double num) => "%g".format(num), (string var) => var, (BinOp bop) => "(%s %s %s)".format( pprint(*bop.lhs), bop.op, pprint(*bop.rhs) ) ); } Expr* myExpr = sum(var("a"), prod(num(2), var("b"))); double[string] myEnv = ["a":3, "b":4, "c":7]; assert(eval(*myExpr, myEnv) == 11); assert(pprint(*myExpr) == "(a + (2 * b))"); } /// `This` placeholder, for use in self-referential types. public import std.variant: This; import std.meta: NoDuplicates; /** * A tagged union that can hold a single value from any of a specified set of * types. * * The value in a `SumType` can be operated on using [match|pattern matching]. * * The special type `This` can be used as a placeholder to create * self-referential types, just like with `Algebraic`. See the * [sumtype#arithmetic-expression-evaluator|"Arithmetic expression evaluator" example] for * usage. * * A `SumType` is initialized by default to hold the `.init` value of its * first member type, just like a regular union. The version identifier * `SumTypeNoDefaultCtor` can be used to disable this behavior. * * To avoid ambiguity, duplicate types are not allowed (but see the * [sumtype#basic-usage|"basic usage" example] for a workaround). * * Bugs: * Types with `@disable`d `opEquals` overloads cannot be members of a * `SumType`. * * See_Also: `std.variant.Algebraic` */ struct SumType(TypeArgs...) if (is(NoDuplicates!TypeArgs == TypeArgs) && TypeArgs.length > 0) { import std.meta: AliasSeq, Filter, anySatisfy, allSatisfy; import std.traits: hasElaborateCopyConstructor, hasElaborateDestructor, isAssignable, isCopyable; import std.typecons: ReplaceType; /// The types a `SumType` can hold. alias Types = AliasSeq!(ReplaceType!(This, typeof(this), TypeArgs)); private: enum bool canHoldTag(T) = Types.length <= T.max; alias unsignedInts = AliasSeq!(ubyte, ushort, uint, ulong); alias Tag = Filter!(canHoldTag, unsignedInts)[0]; union Storage { Types values; static foreach (i, T; Types) { @trusted this()(auto ref T val) { import std.functional: forward; values[i] = forward!val; } static if (isCopyable!T) { @trusted this()(auto ref const(T) val) const { values[i] = val; } @trusted this()(auto ref immutable(T) val) immutable { values[i] = val; } } else { @disable this(const(T) val) const; @disable this(immutable(T) val) immutable; } } } Tag tag; Storage storage; @trusted ref inout(T) trustedGet(T)() inout { import std.meta: staticIndexOf; enum tid = staticIndexOf!(T, Types); assert(tag == tid); return storage.values[tid]; } public: static foreach (i, T; Types) { /// Constructs a `SumType` holding a specific value. this()(auto ref T val) { import std.functional: forward; storage = Storage(forward!val); tag = i; } static if (isCopyable!T) { /// ditto this()(auto ref const(T) val) const { storage = const(Storage)(val); tag = i; } /// ditto this()(auto ref immutable(T) val) immutable { storage = immutable(Storage)(val); tag = i; } } else { @disable this(const(T) val) const; @disable this(immutable(T) val) immutable; } } version(SumTypeNoDefaultCtor) { @disable this(); } static foreach (i, T; Types) { static if (isAssignable!T) { /// Assigns a value to a `SumType`. void opAssign()(auto ref T rhs) { import std.functional: forward; this.match!((ref value) { static if (hasElaborateDestructor!(typeof(value))) { destroy(value); } }); storage = Storage(forward!rhs); tag = i; } } } /** * Compares two `SumType`s for equality. * * Two `SumType`s are equal if they are the same kind of `SumType`, they * contain values of the same type, and those values are equal. */ bool opEquals(const SumType rhs) const { return this.match!((ref value) { return rhs.match!((ref rhsValue) { static if (is(typeof(value) == typeof(rhsValue))) { return value == rhsValue; } else { return false; } }); }); } // Workaround for dlang issue 19407 static if (__traits(compiles, anySatisfy!(hasElaborateDestructor, Types))) { // If possible, include the destructor only when it's needed private enum includeDtor = anySatisfy!(hasElaborateDestructor, Types); } else { // If we can't tell, always include it, even when it does nothing private enum includeDtor = true; } static if (includeDtor) { /// Calls the destructor of the `SumType`'s current value. ~this() { this.match!((ref value) { static if (hasElaborateDestructor!(typeof(value))) { destroy(value); } }); } } static if (allSatisfy!(isCopyable, Types)) { static if (anySatisfy!(hasElaborateCopyConstructor, Types)) { /// Calls the postblit of the `SumType`'s current value. this(this) { this.match!((ref value) { static if (hasElaborateCopyConstructor!(typeof(value))) { value.__xpostblit; } }); } } } else { @disable this(this); } static if (allSatisfy!(isCopyable, Types)) { /// Returns a string representation of a `SumType`'s value. string toString(this T)() { import std.conv: text; return this.match!((auto ref value) { return value.text; }); } } } // Construction @safe unittest { alias MySum = SumType!(int, float); assert(__traits(compiles, MySum(42))); assert(__traits(compiles, MySum(3.14))); } // Assignment @safe unittest { alias MySum = SumType!(int, float); MySum x = MySum(42); assert(__traits(compiles, x = 3.14)); } // Self assignment @safe unittest { alias MySum = SumType!(int, float); MySum x = MySum(42); MySum y = MySum(3.14); assert(__traits(compiles, y = x)); } // Equality @safe unittest { alias MySum = SumType!(int, float); MySum x = MySum(123); MySum y = MySum(123); MySum z = MySum(456); MySum w = MySum(123.0); MySum v = MySum(456.0); assert(x == y); assert(x != z); assert(x != w); assert(x != v); } // Imported types @safe unittest { import std.typecons: Tuple; assert(__traits(compiles, { alias MySum = SumType!(Tuple!(int, int)); })); } // const and immutable types @safe unittest { assert(__traits(compiles, { alias MySum = SumType!(const(int[]), immutable(float[])); })); } // Recursive types @safe unittest { alias MySum = SumType!(This*); assert(is(MySum.Types[0] == MySum*)); } // Allowed types @safe unittest { import std.meta: AliasSeq; alias MySum = SumType!(int, float, This*); assert(is(MySum.Types == AliasSeq!(int, float, MySum*))); } // Works alongside Algebraic @safe unittest { import std.variant; alias Bar = Algebraic!(This*); assert(is(Bar.AllowedTypes[0] == Bar*)); } // Types with destructors and postblits @safe unittest { int copies; struct Test { bool initialized = false; this(this) { copies++; } ~this() { if (initialized) copies--; } } alias MySum = SumType!(int, Test); Test t = Test(true); { MySum x = t; assert(copies == 1); } assert(copies == 0); { MySum x = 456; assert(copies == 0); } assert(copies == 0); { MySum x = t; assert(copies == 1); x = 456; assert(copies == 0); } { MySum x = 456; assert(copies == 0); x = t; assert(copies == 1); } } // Doesn't destroy reference types @safe unittest { bool destroyed; class C { ~this() { destroyed = true; } } struct S { ~this() {} } alias MySum = SumType!(S, C); C c = new C(); { MySum x = c; destroyed = false; } assert(!destroyed); { MySum x = c; destroyed = false; x = S(); assert(!destroyed); } } // Types with @disable this() @safe unittest { struct NoInit { @disable this(); } alias MySum = SumType!(NoInit, int); assert(!__traits(compiles, MySum())); assert(__traits(compiles, MySum(42))); } // const SumTypes @safe unittest { assert(__traits(compiles, const(SumType!(int[]))([1, 2, 3]) )); } // Equality of const SumTypes @safe unittest { alias MySum = SumType!int; assert(__traits(compiles, const(MySum)(123) == const(MySum)(456) )); } // Compares reference types using value equality @safe unittest { struct Field {} struct Struct { Field[] fields; } alias MySum = SumType!Struct; auto a = MySum(Struct([Field()])); auto b = MySum(Struct([Field()])); assert(a == b); } // toString @safe unittest { import std.conv: text; static struct Int { int i; } static struct Double { double d; } alias Sum = SumType!(Int, Double); assert(Sum(Int(42)).text == Int(42).text, Sum(Int(42)).text); assert(Sum(Double(33.3)).text == Double(33.3).text, Sum(Double(33.3)).text); assert((const(Sum)(Int(42))).text == (const(Int)(42)).text, (const(Sum)(Int(42))).text); } // Github issue #16 @safe unittest { alias Node = SumType!(This[], string); // override inference of @system attribute for cyclic functions assert((() @trusted => Node([Node([Node("x")])]) == Node([Node([Node("x")])]) )()); } // Github issue #16 with const @safe unittest { alias Node = SumType!(const(This)[], string); // override inference of @system attribute for cyclic functions assert((() @trusted => Node([Node([Node("x")])]) == Node([Node([Node("x")])]) )()); } // Stale pointers @system unittest { import std.array: staticArray; alias MySum = SumType!(ubyte, void*[2]); MySum x = [null, cast(void*) 0x12345678]; void** p = &x.trustedGet!(void*[2])[1]; x = ubyte(123); assert(*p != cast(void*) 0x12345678); } // Exception-safe assignment @safe unittest { struct A { int value = 123; } struct B { int value = 456; this(this) { throw new Exception("oops"); } } alias MySum = SumType!(A, B); MySum x; try { x = B(); } catch (Exception e) {} assert( (x.tag == 0 && x.trustedGet!A.value == 123) || (x.tag == 1 && x.trustedGet!B.value == 456) ); } // Types with @disable this(this) @safe unittest { import std.algorithm.mutation: move; struct NoCopy { @disable this(this); } alias MySum = SumType!NoCopy; NoCopy lval = NoCopy(); MySum x = NoCopy(); MySum y = NoCopy(); assert(__traits(compiles, SumType!NoCopy(NoCopy()))); assert(!__traits(compiles, SumType!NoCopy(lval))); assert(__traits(compiles, y = NoCopy())); assert(__traits(compiles, y = move(x))); assert(!__traits(compiles, y = lval)); assert(!__traits(compiles, y = x)); } version(none) { // Known bug; needs fix for dlang issue 19458 // Types with disabled opEquals @safe unittest { struct S { @disable bool opEquals(const S rhs) const; } assert(__traits(compiles, SumType!S(S()))); } } version(none) { // Known bug; needs fix for dlang issue 19458 @safe unittest { struct S { int i; bool opEquals(S rhs) { return i == rhs.i; } } assert(__traits(compiles, SumType!S(S(123)))); } } /** * Calls a type-appropriate function with the value held in a [SumType]. * * For each possible type the [SumType] can hold, the given handlers are * checked, in order, to see whether they accept a single argument of that type. * The first one that does is chosen as the match for that type. * * Implicit conversions are not taken into account, except between * differently-qualified versions of the same type. For example, a handler that * accepts a `long` will not match the type `int`, but a handler that accepts a * `const(int)[]` will match the type `immutable(int)[]`. * * Every type must have a matching handler, and every handler must match at * least one type. This is enforced at compile time. * * Handlers may be functions, delegates, or objects with opCall overloads. If a * function with more than one overload is given as a handler, all of the * overloads are considered as potential matches. * * Templated handlers are also accepted, and will match any type for which they * can be [implicitly instantiated](https://dlang.org/glossary.html#ifti). See * [sumtype#introspection-based-matching|"Introspection-based matching"] for an * example of templated handler usage. * * Returns: * The value returned from the handler that matches the currently-held type. * * See_Also: `std.variant.visit` */ template match(handlers...) { import std.typecons: Yes; /** * The actual `match` function. * * Params: * self = A [SumType] object */ auto match(Self)(auto ref Self self) if (is(Self : SumType!TypeArgs, TypeArgs...)) { return self.matchImpl!(Yes.exhaustive, handlers); } } /** * Attempts to call a type-appropriate function with the value held in a * [SumType], and throws on failure. * * Matches are chosen using the same rules as [match], but are not required to * be exhaustive—in other words, a type is allowed to have no matching handler. * If a type without a handler is encountered at runtime, a [MatchException] * is thrown. * * Returns: * The value returned from the handler that matches the currently-held type, * if a handler was given for that type. * * Throws: * [MatchException], if the currently-held type has no matching handler. * * See_Also: `std.variant.tryVisit` */ template tryMatch(handlers...) { import std.typecons: No; /** * The actual `tryMatch` function. * * Params: * self = A [SumType] object */ auto tryMatch(Self)(auto ref Self self) if (is(Self : SumType!TypeArgs, TypeArgs...)) { return self.matchImpl!(No.exhaustive, handlers); } } /// Thrown by [tryMatch] when an unhandled type is encountered. class MatchException : Exception { pure @safe @nogc nothrow this(string msg, string file = __FILE__, size_t line = __LINE__) { super(msg, file, line); } } /** * Checks whether a handler can match a given type. * * See the documentation for [match] for a full explanation of how matches are * chosen. */ template canMatch(alias handler, T) { private bool canMatchImpl() { import std.traits: hasMember, isCallable, isSomeFunction, Parameters; // Include overloads even when called from outside of matchImpl alias realHandler = handlerWithOverloads!handler; // immutable recursively overrides all other qualifiers, so the // right-hand side is true if and only if the two types are the // same when qualifiers are ignored. enum sameUpToQuals(T, U) = is(immutable(T) == immutable(U)); bool result = false; static if (is(typeof((T arg) { realHandler(arg); }(T.init)))) { // Regular handlers static if (isCallable!realHandler) { // Functions and delegates static if (isSomeFunction!realHandler) { static if (sameUpToQuals!(T, Parameters!realHandler[0])) { result = true; } // Objects with overloaded opCall } else static if (hasMember!(typeof(realHandler), "opCall")) { static foreach (overload; __traits(getOverloads, typeof(realHandler), "opCall")) { static if (sameUpToQuals!(T, Parameters!overload[0])) { result = true; } } } // Generic handlers } else { result = true; } } return result; } /// True if `handler` is a potential match for `T`, otherwise false. enum bool canMatch = canMatchImpl; } // Includes all overloads of the given handler @safe unittest { static struct OverloadSet { static void fun(int n) {} static void fun(double d) {} } assert(canMatch!(OverloadSet.fun, int)); assert(canMatch!(OverloadSet.fun, double)); } import std.traits: isFunction; // An AliasSeq of a function's overloads private template FunctionOverloads(alias fun) if (isFunction!fun) { import std.meta: AliasSeq; alias FunctionOverloads = AliasSeq!( __traits(getOverloads, __traits(parent, fun), __traits(identifier, fun) ) ); } // A handler with an opCall overload for each overload of fun private template overloadHandler(alias fun) if (isFunction!fun) { struct OverloadHandler { import std.traits: Parameters, ReturnType; static foreach(overload; FunctionOverloads!fun) { ReturnType!overload opCall(Parameters!overload args) { return overload(args); } } } enum overloadHandler = OverloadHandler.init; } // A handler that includes all overloads of the original handler, if applicable private template handlerWithOverloads(alias handler) { // Delegates and function pointers can't have overloads static if (isFunction!handler && FunctionOverloads!handler.length > 1) { alias handlerWithOverloads = overloadHandler!handler; } else { alias handlerWithOverloads = handler; } } import std.typecons: Flag; private template matchImpl(Flag!"exhaustive" exhaustive, handlers...) { auto matchImpl(Self)(auto ref Self self) if (is(Self : SumType!TypeArgs, TypeArgs...)) { import std.meta: staticMap; alias Types = self.Types; enum noMatch = size_t.max; alias allHandlers = staticMap!(handlerWithOverloads, handlers); pure size_t[Types.length] getHandlerIndices() { size_t[Types.length] indices; indices[] = noMatch; static foreach (tid, T; Types) { static foreach (hid, handler; allHandlers) { static if (canMatch!(handler, typeof(self.trustedGet!T()))) { if (indices[tid] == noMatch) { indices[tid] = hid; } } } } return indices; } enum handlerIndices = getHandlerIndices; final switch (self.tag) { static foreach (tid, T; Types) { case tid: static if (handlerIndices[tid] != noMatch) { return allHandlers[handlerIndices[tid]](self.trustedGet!T); } else { static if(exhaustive) { static assert(false, "No matching handler for type `" ~ T.stringof ~ "`"); } else { throw new MatchException( "No matching handler for type `" ~ T.stringof ~ "`"); } } } } assert(false); // unreached import std.algorithm.searching: canFind; // Check for unreachable handlers static foreach (hid, handler; allHandlers) { static assert(handlerIndices[].canFind(hid), "handler `" ~ __traits(identifier, handler) ~ "` " ~ "of type `" ~ typeof(handler).stringof ~ "` " ~ "never matches" ); } } } // Matching @safe unittest { alias MySum = SumType!(int, float); MySum x = MySum(42); MySum y = MySum(3.14); assert(x.match!((int v) => true, (float v) => false)); assert(y.match!((int v) => false, (float v) => true)); } // Missing handlers @safe unittest { alias MySum = SumType!(int, float); MySum x = MySum(42); assert(!__traits(compiles, x.match!((int x) => true))); assert(!__traits(compiles, x.match!())); } // No implicit converstion @safe unittest { alias MySum = SumType!(int, float); MySum x = MySum(42); assert(!__traits(compiles, x.match!((long v) => true, (float v) => false) )); } // Handlers with qualified parameters @safe unittest { alias MySum = SumType!(int[], float[]); MySum x = MySum([1, 2, 3]); MySum y = MySum([1.0, 2.0, 3.0]); assert(x.match!((const(int[]) v) => true, (const(float[]) v) => false)); assert(y.match!((const(int[]) v) => false, (const(float[]) v) => true)); } // Handlers for qualified types @safe unittest { alias MySum = SumType!(immutable(int[]), immutable(float[])); MySum x = MySum([1, 2, 3]); assert(x.match!((immutable(int[]) v) => true, (immutable(float[]) v) => false)); assert(x.match!((const(int[]) v) => true, (const(float[]) v) => false)); // Tail-qualified parameters assert(x.match!((immutable(int)[] v) => true, (immutable(float)[] v) => false)); assert(x.match!((const(int)[] v) => true, (const(float)[] v) => false)); // Generic parameters assert(x.match!((immutable v) => true)); assert(x.match!((const v) => true)); // Unqualified parameters assert(!__traits(compiles, x.match!((int[] v) => true, (float[] v) => false) )); } // Delegate handlers @safe unittest { alias MySum = SumType!(int, float); int answer = 42; MySum x = MySum(42); MySum y = MySum(3.14); assert(x.match!((int v) => v == answer, (float v) => v == answer)); assert(!y.match!((int v) => v == answer, (float v) => v == answer)); } // Generic handler @safe unittest { import std.math: approxEqual; alias MySum = SumType!(int, float); MySum x = MySum(42); MySum y = MySum(3.14); assert(x.match!(v => v*2) == 84); assert(y.match!(v => v*2).approxEqual(6.28)); } // Fallback to generic handler @safe unittest { import std.conv: to; alias MySum = SumType!(int, float, string); MySum x = MySum(42); MySum y = MySum("42"); assert(x.match!((string v) => v.to!int, v => v*2) == 84); assert(y.match!((string v) => v.to!int, v => v*2) == 42); } // Multiple non-overlapping generic handlers @safe unittest { import std.math: approxEqual; alias MySum = SumType!(int, float, int[], char[]); MySum x = MySum(42); MySum y = MySum(3.14); MySum z = MySum([1, 2, 3]); MySum w = MySum(['a', 'b', 'c']); assert(x.match!(v => v*2, v => v.length) == 84); assert(y.match!(v => v*2, v => v.length).approxEqual(6.28)); assert(w.match!(v => v*2, v => v.length) == 3); assert(z.match!(v => v*2, v => v.length) == 3); } // Structural matching @safe unittest { struct S1 { int x; } struct S2 { int y; } alias MySum = SumType!(S1, S2); MySum a = MySum(S1(0)); MySum b = MySum(S2(0)); assert(a.match!(s1 => s1.x + 1, s2 => s2.y - 1) == 1); assert(b.match!(s1 => s1.x + 1, s2 => s2.y - 1) == -1); } // Separate opCall handlers @safe unittest { struct IntHandler { bool opCall(int arg) { return true; } } struct FloatHandler { bool opCall(float arg) { return false; } } alias MySum = SumType!(int, float); MySum x = MySum(42); MySum y = MySum(3.14); IntHandler handleInt; FloatHandler handleFloat; assert(x.match!(handleInt, handleFloat)); assert(!y.match!(handleInt, handleFloat)); } // Compound opCall handler @safe unittest { struct CompoundHandler { bool opCall(int arg) { return true; } bool opCall(float arg) { return false; } } alias MySum = SumType!(int, float); MySum x = MySum(42); MySum y = MySum(3.14); CompoundHandler handleBoth; assert(x.match!handleBoth); assert(!y.match!handleBoth); } // Ordered matching @safe unittest { alias MySum = SumType!(int, float); MySum x = MySum(42); assert(x.match!((int v) => true, v => false)); } // Non-exhaustive matching @system unittest { import std.exception: assertThrown, assertNotThrown; alias MySum = SumType!(int, float); MySum x = MySum(42); MySum y = MySum(3.14); assertNotThrown!MatchException(x.tryMatch!((int n) => true)); assertThrown!MatchException(y.tryMatch!((int n) => true)); } // Non-exhaustive matching in @safe code @safe unittest { SumType!(int, float) x; assert(__traits(compiles, x.tryMatch!( (int n) => n + 1, ) )); } // Handlers with ref parameters @safe unittest { import std.math: approxEqual; import std.meta: staticIndexOf; alias Value = SumType!(long, double); auto value = Value(3.14); value.match!( (long) {}, (ref double d) { d *= 2; } ); assert(value.trustedGet!double.approxEqual(6.28)); } // Unreachable handlers @safe unittest { alias MySum = SumType!(int, string); MySum s; assert(!__traits(compiles, s.match!( (int _) => 0, (string _) => 1, (double _) => 2 ) )); assert(!__traits(compiles, s.match!( _ => 0, (int _) => 1 ) )); } // Unsafe handlers unittest { SumType!(int, char*) x; assert(!__traits(compiles, () @safe { x.match!( (ref int n) => &n, _ => null, ); })); assert(__traits(compiles, () @system { return x.match!( (ref int n) => &n, _ => null ); })); } // Overloaded handlers @safe unittest { static struct OverloadSet { static string fun(int i) { return "int"; } static string fun(double d) { return "double"; } } alias MySum = SumType!(int, double); MySum a = 42; MySum b = 3.14; assert(a.match!(OverloadSet.fun) == "int"); assert(b.match!(OverloadSet.fun) == "double"); } // Overload sets that include SumType arguments @safe unittest { alias Inner = SumType!(int, double); alias Outer = SumType!(Inner, string); static struct OverloadSet { @safe: static string fun(int i) { return "int"; } static string fun(double d) { return "double"; } static string fun(string s) { return "string"; } static string fun(Inner i) { return i.match!fun; } static string fun(Outer o) { return o.match!fun; } } Outer a = Inner(42); Outer b = Inner(3.14); Outer c = "foo"; assert(OverloadSet.fun(a) == "int"); assert(OverloadSet.fun(b) == "double"); assert(OverloadSet.fun(c) == "string"); }
D
/* * Copyright (c) 2012-2018 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.tree.Tree; /** * The basic notion of a tree has a parent, a payload, and a list of children. * It is the most abstract interface for all the trees used by ANTLR. */ interface Tree { /** * The parent of this node. If the return value is null, then this * node is the root of the tree. */ public Tree getParent(); /** * This method returns whatever object represents the data at this node. For * example, for parse trees, the payload can be a {@link Token} representing * a leaf node or a {@link RuleContext} object representing a rule * invocation. For abstract syntax trees (ASTs), this is a {@link Token} * object. */ public Object getPayload(); /** * If there are children, get the {@code i}th value indexed from 0. */ public Tree getChild(int i); /** * How many children are there? If there is none, then this * node represents a leaf node. */ public int getChildCount(); /** * Print out a whole tree, not just a node, in LISP format * {@code (root child1 .. childN)}. Print just a node if this is a leaf. */ public string toStringTree(); }
D
/home/bigdata/Documents/projects/snake_game/target/rls/debug/deps/snake_game-62a2687ac37212b5.rmeta: src/main.rs /home/bigdata/Documents/projects/snake_game/target/rls/debug/deps/snake_game-62a2687ac37212b5.d: src/main.rs src/main.rs:
D
/* * types.d * * This module defines common language types. * */ module runtime.types; // Figure out the size of a pointer static if ((ubyte*).sizeof == 8) { version = Arch64; } else static if ((ubyte*).sizeof == 4) { version = Arch32; } // Pointer sizes version(Arch32) { alias uint size_t; alias int ptrdiff_t; alias uint hash_t; } else { alias ulong size_t; alias long ptrdiff_t; alias ulong hash_t; } // String types alias char[] string; alias wchar[] wstring; alias dchar[] dstring;
D
// Copyright © 2011, Jakob Bornecrantz. All rights reserved. // See copyright notice in src/charge/charge.d (GPLv2 only). module charge.core; import charge.sys.properties; enum coreFlag { CTL = (1 << 0), GFX = (1 << 1), SFX = (1 << 2), NET = (1 << 3), PHY = (1 << 4), AUTO = (1 << 5), } /** * Get a new core created with the given flags. */ extern(C) Core chargeCore(CoreOptions opts); /** * Signal a quit a condition, this function mearly pushes * a quit event on the event queue and then returns. */ extern(C) void chargeQuit(); /** * Options at initialization. */ class CoreOptions { public: string title; coreFlag flags; public: this() { this.flags = coreFlag.AUTO; this.title = Core.defaultTitle; } } /** * Class holding the entire thing together. */ abstract class Core { public: const int defaultWidth = 800; const int defaultHeight = 600; const bool defaultFullscreen = false; const bool defaultFullscreenAutoSize = true; const string defaultTitle = "Charge Game Engine"; const bool defaultForceResizeEnable = false; coreFlag flags; bool resizeSupported; protected: static void function()[] initFuncs; static void function()[] closeFuncs; public: static Core opCall() { assert(instance !is null); return instance; } static Core opCall(CoreOptions opts) in { assert(opts !is null); assert(instance is null); assert(opts.flags != 0); assert(opts.title !is null); } body { instance = chargeCore(opts); return instance; } /** * Shutsdown everything, make sure you have freed all resources before * calling this function. It is not supported to initialize Core again * after a call to this function. */ abstract void close(); /** * Initialize a subsystem. Only a single subsystem can be initialized * a time. Will throw Exception upon failure. * * XXX: Most Cores are bit picky when it comes which subsystems can be * initialized after a general initialization, generally speaking * SFX and PHY should always work. */ abstract void initSubSystem(coreFlag flags); /** * These functions are run just after Core is initialize and * right before Core is closed. */ static void addInitAndCloseRunners(void function() init, void function() close) { if (init !is null) initFuncs ~= init; if (close !is null) closeFuncs ~= close; } /* * * Misc * */ /** * Returns text from the clipboard, should any be in it. */ abstract string getClipboardText(); abstract void resize(uint w, uint h); abstract void resize(uint w, uint h, bool fullscreen); abstract void size(out uint w, out uint h, out bool fullscreen); abstract void screenShot(); abstract Properties properties(); protected: this(coreFlag flags) { this.flags = flags; } private: static Core instance; }
D
/Users/kimhyewon/Documents/Server/tennis/build/tennis.build/Debug/Socks.build/Objects-normal/x86_64/SynchronousUDPServer.o : /Users/kimhyewon/Documents/Server/tennis/Packages/Socks-1.2.0/Sources/Socks/Socks.swift /Users/kimhyewon/Documents/Server/tennis/Packages/Socks-1.2.0/Sources/Socks/SynchronousTCPServer.swift /Users/kimhyewon/Documents/Server/tennis/Packages/Socks-1.2.0/Sources/Socks/SynchronousUDPServer.swift /Users/kimhyewon/Documents/Server/tennis/Packages/Socks-1.2.0/Sources/Socks/TCPClient.swift /Users/kimhyewon/Documents/Server/tennis/Packages/Socks-1.2.0/Sources/Socks/UDPClient.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/kimhyewon/Documents/Server/tennis/build/Debug/SocksCore.framework/Modules/SocksCore.swiftmodule/x86_64.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/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/kimhyewon/Documents/Server/tennis/build/tennis.build/Debug/Socks.build/Objects-normal/x86_64/SynchronousUDPServer~partial.swiftmodule : /Users/kimhyewon/Documents/Server/tennis/Packages/Socks-1.2.0/Sources/Socks/Socks.swift /Users/kimhyewon/Documents/Server/tennis/Packages/Socks-1.2.0/Sources/Socks/SynchronousTCPServer.swift /Users/kimhyewon/Documents/Server/tennis/Packages/Socks-1.2.0/Sources/Socks/SynchronousUDPServer.swift /Users/kimhyewon/Documents/Server/tennis/Packages/Socks-1.2.0/Sources/Socks/TCPClient.swift /Users/kimhyewon/Documents/Server/tennis/Packages/Socks-1.2.0/Sources/Socks/UDPClient.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/kimhyewon/Documents/Server/tennis/build/Debug/SocksCore.framework/Modules/SocksCore.swiftmodule/x86_64.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/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/kimhyewon/Documents/Server/tennis/build/tennis.build/Debug/Socks.build/Objects-normal/x86_64/SynchronousUDPServer~partial.swiftdoc : /Users/kimhyewon/Documents/Server/tennis/Packages/Socks-1.2.0/Sources/Socks/Socks.swift /Users/kimhyewon/Documents/Server/tennis/Packages/Socks-1.2.0/Sources/Socks/SynchronousTCPServer.swift /Users/kimhyewon/Documents/Server/tennis/Packages/Socks-1.2.0/Sources/Socks/SynchronousUDPServer.swift /Users/kimhyewon/Documents/Server/tennis/Packages/Socks-1.2.0/Sources/Socks/TCPClient.swift /Users/kimhyewon/Documents/Server/tennis/Packages/Socks-1.2.0/Sources/Socks/UDPClient.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/kimhyewon/Documents/Server/tennis/build/Debug/SocksCore.framework/Modules/SocksCore.swiftmodule/x86_64.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/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule
D
// URL: https://atcoder.jp/contests/abc110/tasks/abc110_a import std.algorithm, std.container, std.conv, std.math, std.range, std.typecons, std.stdio, std.string; auto rdsp(){return readln.splitter;} void pick(R,T)(ref R r,ref T t){t=r.front.to!T;r.popFront;} void pickV(R,T...)(ref R r,ref T t){foreach(ref v;t)pick(r,v);} void readV(T...)(ref T t){auto r=rdsp;foreach(ref v;t)pick(r,v);} void readA(T)(size_t n,ref T[]t){t=new T[](n);auto r=rdsp;foreach(ref v;t)pick(r,v);} void readM(T)(size_t r,size_t c,ref T[][]t){t=new T[][](r);foreach(ref v;t)readA(c,v);} void readC(T...)(size_t n,ref T t){foreach(ref v;t)v=new typeof(v)(n);foreach(i;0..n){auto r=rdsp;foreach(ref v;t)pick(r,v[i]);}} void readS(T)(size_t n,ref T t){t=new T(n);foreach(ref v;t){auto r=rdsp;foreach(ref j;v.tupleof)pick(r,j);}} void writeA(T)(size_t n,T t){foreach(i,v;t.enumerate){write(v);if(i<n-1)write(" ");}writeln;} version(unittest) {} else void main() { int a, b, c; readV(a, b, c); writeln(max(a*10+b+c, a+b*10+c, a+b+c*10)); }
D
module menu.browser.select; /* class BrowserHighlightSelect * * Guarantee for all inherited classes: onFileHighlight will be called * for every file on which possibly on_file_select could be called later. * Whenever on_file_select is called, onFileHighlight has been called * on the same filename before, and no other onFileHighlight calls have * been made in the meantime. * Implemented by private BrowserHighlightSelect._fileRecent. */ import std.conv; static import std.file; import optional; import basics.user; // hotkeys import file.filename; import file.language; import file.log; import gui; import gui.picker; import hardware.keyboard; // up/down change of highlighted file import hardware.sound; import menu.browser.highli; class BrowserHighlightSelect : BrowserHighlight { private: MutFilename _fileRecent; // highlight, not select. May be in different dir. // May not point to a directory. Optional!MutFilename _upDownTo; // Last-highlit dir or file with up/down keys. // We need this because it may point to dirs. TextButton _buttonPlay; public: // See constructor comment in menu.browser.highli. this(SomeTiler)( in string title, Filename baseDir, PickerConfig!SomeTiler cfg ) { super(title, baseDir, cfg); _buttonPlay = new TextButton(new Geom(infoX, 20, infoXl/2, 40, From.BOTTOM_LEFT), Lang.browserPlay.transl); _buttonPlay.hotkey = basics.user.keyMenuOkay; addChildren(_buttonPlay); } @property auto fileRecent() inout { return _fileRecent; } final void highlightNone() { _buttonPlay.hide(); // keep _fileRecent as it is, we might highlight that again later onHighlightNone(); } final void highlight(Filename fn) in { assert (fn, "call highlightNone() instead"); } body { if (super.navigateToAndHighlightFile(fn)) { _buttonPlay.show(); _fileRecent = fn; _upDownTo = some(MutFilename(fn)); onHighlight(fn); } else highlightNone(); } protected: abstract void onHighlightNone(); abstract void onHighlight(Filename); abstract void onPlay(Filename); final void buttonPlayYFromBottom(in float newY) { _buttonPlay.move(_buttonPlay.geom.x, newY); } final void buttonPlayText(in string s) { _buttonPlay.text = s; } final void deleteFileRecentHighlightNeighbor() { if (auto newFn = super.deleteFileHighlightNeighbor(_fileRecent).unwrap) highlight(*newFn); else highlightNone(); _upDownTo = none; playLoud(Sound.SCISSORS); } final override void onPickerExecuteFile(Filename executeFileFilename) { MutFilename clicked = executeFileFilename; assert (clicked !is null); if (clicked != _fileRecent) highlight(clicked); else onPlay(_fileRecent); } final override void onPickerExecuteDir() { highlightIfInCurrentDir(_fileRecent); _upDownTo = none; } override void calcSelf() { super.calcSelf(); if (gotoMainMenu) { return; } else if (_buttonPlay.execute) { assert (_fileRecent !is null); onPlay(_fileRecent); } else if (keyMenuOkay.keyTapped && _upDownTo.unwrap) { super.navigateTo(*_upDownTo.unwrap); highlightIfInCurrentDir(_fileRecent); _upDownTo = none; } else { immutable moveBy = keyMenuUpBy1 .keyTappedAllowingRepeats * -1 + keyMenuUpBy5 .keyTappedAllowingRepeats * -5 + keyMenuDownBy1.keyTappedAllowingRepeats * 1 + keyMenuDownBy5.keyTappedAllowingRepeats * 5; if (moveBy != 0) { _upDownTo = some(MutFilename(super.moveHighlightBy( _upDownTo.unwrap ? *_upDownTo.unwrap : _fileRecent, moveBy))); highlightIfInCurrentDir( _upDownTo.unwrap ? *_upDownTo.unwrap : null); } } } private: @property void highlightIfInCurrentDir(Filename fn) { if (fn && fn.dirRootless == currentDir.dirRootless) highlight(fn); else highlightNone(); } }
D
/* * Copyright 2018-present Amazon.com, Inc. or its affiliates. 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. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /// module aws.lambda_runtime.version_; /// Returns the major component of the library version. uint get_version_major() { return 0; } /// Returns the minor component of the library version. uint get_version_minor() { return 1; } /// Returns the patch component of the library version. uint get_version_patch() { return 0; } /// Returns the semantic version of the library in the form Major.Minor.Patch string getVersion() { import std.conv : text; return get_version_major().text ~ "." ~ get_version_minor().text ~ "." ~ get_version_patch().text; }
D
@compute(CompileFor.hostAndDevice) module dcompute.std.index; import ldc.dcompute; private import ocl = dcompute.std.opencl.index; private import cuda = dcompute.std.cuda.index; /* Index Terminology DCompute CUDA OpenCL GlobalDimension.xyz gridDim*blockDim get_global_size() GlobalIndex.xyz blockDim*blockIdx+threadIdx get_global_id() GroupDimension.zyx gridDim get_num_groups() GroupIndex.xyz blockIdx get_group_id() SharedDimension.xyz blockDim get_local_size() SharedIndex.xyz threadIdx get_local_id() GlobalIndex.linear A nasty calcualion get_global_linear_id() SharedIndex.linear Ditto get_local_linear_id() Notes: *Index.{x,y,z} are bounded by *Dimension.{x,y,z} Use SharedIndex's to index Shared Memory and GlobalIndex's to index Global Memory A Group is the ratio of Global to Shared. GroupDimension is NOT the size of a single group, (thats SharedDimension) rather it is the number of groups along e.g the x dimension. Similarly GroupIndex is how many units of the SharedDimension along a given dimension is. By default *Index.linear is the linearisation of 3D memory. Use *Index.linear!N where N is 1, 2 or 3 to use a linearisation of ND memory (for e.g. efficiency/documentation). */ pure: nothrow: @nogc: struct GlobalDimension { pragma(inline,true); @property static size_t x()() { if(__dcompute_reflect(ReflectTarget.OpenCL,0)) return ocl.get_global_size(0); else if(__dcompute_reflect(ReflectTarget.CUDA,0)) return cuda.ntid_x()*cuda.nctaid_x(); else assert(0); } pragma(inline,true); @property static size_t y()() { if(__dcompute_reflect(ReflectTarget.OpenCL,0)) return ocl.get_global_size(1); else if(__dcompute_reflect(ReflectTarget.CUDA,0)) return cuda.ntid_y()*cuda.nctaid_y(); else assert(0); } pragma(inline,true); @property static size_t z()() { if(__dcompute_reflect(ReflectTarget.OpenCL,0)) return ocl.get_global_size(2); else if(__dcompute_reflect(ReflectTarget.CUDA,0)) return cuda.ntid_z()*cuda.nctaid_z(); else assert(0); } } struct GlobalIndex { pragma(inline,true); @property static size_t x()() { if(__dcompute_reflect(ReflectTarget.OpenCL,0)) return ocl.get_global_id(0); else if(__dcompute_reflect(ReflectTarget.CUDA,0)) return cuda.ctaid_x()*cuda.ntid_x() + cuda.tid_x(); else assert(0); } pragma(inline,true); @property static size_t y()() { if(__dcompute_reflect(ReflectTarget.OpenCL,0)) return ocl.get_global_id(1); else if(__dcompute_reflect(ReflectTarget.CUDA,0)) return cuda.ctaid_y()*cuda.ntid_y() + cuda.tid_y(); else assert(0); } pragma(inline,true); @property static size_t z()() { if(__dcompute_reflect(ReflectTarget.OpenCL,0)) return ocl.get_global_id(2); else if(__dcompute_reflect(ReflectTarget.CUDA,0)) return cuda.ctaid_z()*cuda.ntid_z() + cuda.tid_z(); else assert(0); } pragma(inline,true); @property static size_t linearImpl(int dim = 3)() if(dim >= 1 && dim <= 3) { static if (dim == 3) return (z * GlobalDimension.y * GlobalDimension.x) + (y * GlobalDimension.x) + x; else static if (dim == 2) return (y * GlobalDimension.x) + x; else return x; } pragma(inline,true); @property static size_t linear(int dim = 3)() if(dim >= 1 && dim <= 3) { //Foward to the intrinsic to help memoisation for the comsumer. if(__dcompute_reflect(ReflectTarget.OpenCL,200)) return ocl.get_global_linear_id(); else if(__dcompute_reflect(ReflectTarget.OpenCL,210)) return ocl.get_global_linear_id(); else if(__dcompute_reflect(ReflectTarget.OpenCL,220)) return ocl.get_global_linear_id(); else return linearImpl!dim; } } struct GroupDimension { pragma(inline,true); @property static size_t x()() { if(__dcompute_reflect(ReflectTarget.OpenCL,0)) return ocl.get_num_groups(0); else if(__dcompute_reflect(ReflectTarget.CUDA,0)) return cuda.nctaid_x(); else assert(0); } pragma(inline,true); @property static size_t y()() { if(__dcompute_reflect(ReflectTarget.OpenCL,0)) return ocl.get_num_groups(1); else if(__dcompute_reflect(ReflectTarget.CUDA,0)) return cuda.nctaid_y(); else assert(0); } pragma(inline,true); @property static size_t z()() { if(__dcompute_reflect(ReflectTarget.OpenCL,0)) return ocl.get_num_groups(2); else if(__dcompute_reflect(ReflectTarget.CUDA,0)) return cuda.nctaid_z(); else assert(0); } } struct GroupIndex { pragma(inline,true); @property static size_t x()() { if(__dcompute_reflect(ReflectTarget.OpenCL,0)) return ocl.get_group_id(0); else if(__dcompute_reflect(ReflectTarget.CUDA,0)) return cuda.ntid_x(); else assert(0); } pragma(inline,true); @property static size_t y()() { if(__dcompute_reflect(ReflectTarget.OpenCL,0)) return ocl.get_group_id(1); else if(__dcompute_reflect(ReflectTarget.CUDA,0)) return cuda.ntid_y(); else assert(0); } pragma(inline,true); @property static size_t z()() { if(__dcompute_reflect(ReflectTarget.OpenCL,0)) return ocl.get_group_id(2); else if(__dcompute_reflect(ReflectTarget.CUDA,0)) return cuda.ntid_z(); else assert(0); } } struct SharedDimension { pragma(inline,true); @property static size_t x()() { if(__dcompute_reflect(ReflectTarget.OpenCL,0)) return ocl.get_local_size(0); else if(__dcompute_reflect(ReflectTarget.CUDA,0)) return cuda.ntid_x(); else assert(0); } pragma(inline,true); @property static size_t y()() { if(__dcompute_reflect(ReflectTarget.OpenCL,0)) return ocl.get_local_size(1); else if(__dcompute_reflect(ReflectTarget.CUDA,0)) return cuda.ntid_y(); else assert(0); } pragma(inline,true); @property static size_t z()() { if(__dcompute_reflect(ReflectTarget.OpenCL,0)) return ocl.get_local_size(2); else if(__dcompute_reflect(ReflectTarget.CUDA,0)) return cuda.ntid_z(); else assert(0); } } struct SharedIndex { pragma(inline,true); @property static size_t x()() { if(__dcompute_reflect(ReflectTarget.OpenCL,0)) return ocl.get_local_id(0); else if(__dcompute_reflect(ReflectTarget.CUDA,0)) return cuda.tid_x(); else assert(0); } pragma(inline,true); @property static size_t y()() { if(__dcompute_reflect(ReflectTarget.OpenCL,0)) return ocl.get_local_id(1); else if(__dcompute_reflect(ReflectTarget.CUDA,0)) return cuda.tid_y(); else assert(0); } pragma(inline,true); @property static size_t z()() { if(__dcompute_reflect(ReflectTarget.OpenCL,0)) return ocl.get_local_id(2); else if(__dcompute_reflect(ReflectTarget.CUDA,0)) return cuda.tid_z(); else assert(0); } pragma(inline,true); @property static size_t linearImpl(int dim = 3)() if(dim >= 1 && dim <= 3) { static if (dim == 3) return (z * SharedDimension.y * SharedDimension.x) + (y * SharedDimension.x) + x; else static if (dim == 2) return (y * SharedDimension.x) + x; else return x; } pragma(inline,true); @property static size_t linear(int dim = 3)() if(dim >= 1 && dim <= 3) { //Foward to the intrinsic to help memoisation for the comsumer. if(__dcompute_reflect(ReflectTarget.OpenCL,200)) return ocl.get_local_linear_id(); else if(__dcompute_reflect(ReflectTarget.OpenCL,210)) return ocl.get_local_linear_id(); else if(__dcompute_reflect(ReflectTarget.OpenCL,220)) return ocl.get_local_linear_id(); else return linearImpl!dim; } } private import std.traits; struct AutoIndexed(T) //if (isInstanceOf(T,Pointer)) { T p = void; enum n = TemplateArgsOf!(T)[0]; alias U = TemplateArgsOf!(T)[1]; static assert(n == AddrSpace.Global || n == AddrSpace.Shared); @property U index() { static if (n == AddrSpace.Global) return p[GlobalIndex.linear]; else static if (n == AddrSpace.Shared) return p[SharedIndex.linear]; } @property void index(U t) { static if (n == AddrSpace.Global) p[GlobalIndex.linear] = t; else static if (n == AddrSpace.Shared) p[SharedIndex.linear] = t; } @disable this(); alias index this; }
D
/* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 3.0.0 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ module vtkFieldDataToAttributeDataFilter; static import vtkd_im; static import core.stdc.config; static import std.conv; static import std.string; static import std.conv; static import std.string; static import vtkObjectBase; static import SWIGTYPE_p_p_vtkDataArray; static import vtkDataArray; static import vtkFieldData; static import vtkObject; static import vtkInformation; static import SWIGTYPE_p_p_vtkInformationVector; static import vtkInformationVector; static import vtkDataSetAlgorithm; class vtkFieldDataToAttributeDataFilter : vtkDataSetAlgorithm.vtkDataSetAlgorithm { private void* swigCPtr; public this(void* cObject, bool ownCObject) { super(vtkd_im.vtkFieldDataToAttributeDataFilter_Upcast(cObject), ownCObject); swigCPtr = cObject; } public static void* swigGetCPtr(vtkFieldDataToAttributeDataFilter obj) { return (obj is null) ? null : obj.swigCPtr; } mixin vtkd_im.SwigOperatorDefinitions; public override void dispose() { synchronized(this) { if (swigCPtr !is null) { if (swigCMemOwn) { swigCMemOwn = false; throw new object.Exception("C++ destructor does not have public access"); } swigCPtr = null; super.dispose(); } } } public static int IsTypeOf(string type) { auto ret = vtkd_im.vtkFieldDataToAttributeDataFilter_IsTypeOf((type ? std.string.toStringz(type) : null)); return ret; } public static vtkFieldDataToAttributeDataFilter SafeDownCast(vtkObjectBase.vtkObjectBase o) { void* cPtr = vtkd_im.vtkFieldDataToAttributeDataFilter_SafeDownCast(vtkObjectBase.vtkObjectBase.swigGetCPtr(o)); vtkFieldDataToAttributeDataFilter ret = (cPtr is null) ? null : new vtkFieldDataToAttributeDataFilter(cPtr, false); return ret; } public vtkFieldDataToAttributeDataFilter NewInstance() const { void* cPtr = vtkd_im.vtkFieldDataToAttributeDataFilter_NewInstance(cast(void*)swigCPtr); vtkFieldDataToAttributeDataFilter ret = (cPtr is null) ? null : new vtkFieldDataToAttributeDataFilter(cPtr, false); return ret; } alias vtkDataSetAlgorithm.vtkDataSetAlgorithm.NewInstance NewInstance; public static vtkFieldDataToAttributeDataFilter New() { void* cPtr = vtkd_im.vtkFieldDataToAttributeDataFilter_New(); vtkFieldDataToAttributeDataFilter ret = (cPtr is null) ? null : new vtkFieldDataToAttributeDataFilter(cPtr, false); return ret; } public void SetInputField(int _arg) { vtkd_im.vtkFieldDataToAttributeDataFilter_SetInputField(cast(void*)swigCPtr, _arg); } public int GetInputField() { auto ret = vtkd_im.vtkFieldDataToAttributeDataFilter_GetInputField(cast(void*)swigCPtr); return ret; } public void SetInputFieldToDataObjectField() { vtkd_im.vtkFieldDataToAttributeDataFilter_SetInputFieldToDataObjectField(cast(void*)swigCPtr); } public void SetInputFieldToPointDataField() { vtkd_im.vtkFieldDataToAttributeDataFilter_SetInputFieldToPointDataField(cast(void*)swigCPtr); } public void SetInputFieldToCellDataField() { vtkd_im.vtkFieldDataToAttributeDataFilter_SetInputFieldToCellDataField(cast(void*)swigCPtr); } public void SetOutputAttributeData(int _arg) { vtkd_im.vtkFieldDataToAttributeDataFilter_SetOutputAttributeData(cast(void*)swigCPtr, _arg); } public int GetOutputAttributeData() { auto ret = vtkd_im.vtkFieldDataToAttributeDataFilter_GetOutputAttributeData(cast(void*)swigCPtr); return ret; } public void SetOutputAttributeDataToCellData() { vtkd_im.vtkFieldDataToAttributeDataFilter_SetOutputAttributeDataToCellData(cast(void*)swigCPtr); } public void SetOutputAttributeDataToPointData() { vtkd_im.vtkFieldDataToAttributeDataFilter_SetOutputAttributeDataToPointData(cast(void*)swigCPtr); } public void SetScalarComponent(int comp, string arrayName, int arrayComp, int min, int max, int normalize) { vtkd_im.vtkFieldDataToAttributeDataFilter_SetScalarComponent__SWIG_0(cast(void*)swigCPtr, comp, (arrayName ? std.string.toStringz(arrayName) : null), arrayComp, min, max, normalize); } public void SetScalarComponent(int comp, string arrayName, int arrayComp) { vtkd_im.vtkFieldDataToAttributeDataFilter_SetScalarComponent__SWIG_1(cast(void*)swigCPtr, comp, (arrayName ? std.string.toStringz(arrayName) : null), arrayComp); } public string GetScalarComponentArrayName(int comp) { string ret = std.conv.to!string(vtkd_im.vtkFieldDataToAttributeDataFilter_GetScalarComponentArrayName(cast(void*)swigCPtr, comp)); return ret; } public int GetScalarComponentArrayComponent(int comp) { auto ret = vtkd_im.vtkFieldDataToAttributeDataFilter_GetScalarComponentArrayComponent(cast(void*)swigCPtr, comp); return ret; } public int GetScalarComponentMinRange(int comp) { auto ret = vtkd_im.vtkFieldDataToAttributeDataFilter_GetScalarComponentMinRange(cast(void*)swigCPtr, comp); return ret; } public int GetScalarComponentMaxRange(int comp) { auto ret = vtkd_im.vtkFieldDataToAttributeDataFilter_GetScalarComponentMaxRange(cast(void*)swigCPtr, comp); return ret; } public int GetScalarComponentNormalizeFlag(int comp) { auto ret = vtkd_im.vtkFieldDataToAttributeDataFilter_GetScalarComponentNormalizeFlag(cast(void*)swigCPtr, comp); return ret; } public void SetVectorComponent(int comp, string arrayName, int arrayComp, int min, int max, int normalize) { vtkd_im.vtkFieldDataToAttributeDataFilter_SetVectorComponent__SWIG_0(cast(void*)swigCPtr, comp, (arrayName ? std.string.toStringz(arrayName) : null), arrayComp, min, max, normalize); } public void SetVectorComponent(int comp, string arrayName, int arrayComp) { vtkd_im.vtkFieldDataToAttributeDataFilter_SetVectorComponent__SWIG_1(cast(void*)swigCPtr, comp, (arrayName ? std.string.toStringz(arrayName) : null), arrayComp); } public string GetVectorComponentArrayName(int comp) { string ret = std.conv.to!string(vtkd_im.vtkFieldDataToAttributeDataFilter_GetVectorComponentArrayName(cast(void*)swigCPtr, comp)); return ret; } public int GetVectorComponentArrayComponent(int comp) { auto ret = vtkd_im.vtkFieldDataToAttributeDataFilter_GetVectorComponentArrayComponent(cast(void*)swigCPtr, comp); return ret; } public int GetVectorComponentMinRange(int comp) { auto ret = vtkd_im.vtkFieldDataToAttributeDataFilter_GetVectorComponentMinRange(cast(void*)swigCPtr, comp); return ret; } public int GetVectorComponentMaxRange(int comp) { auto ret = vtkd_im.vtkFieldDataToAttributeDataFilter_GetVectorComponentMaxRange(cast(void*)swigCPtr, comp); return ret; } public int GetVectorComponentNormalizeFlag(int comp) { auto ret = vtkd_im.vtkFieldDataToAttributeDataFilter_GetVectorComponentNormalizeFlag(cast(void*)swigCPtr, comp); return ret; } public void SetNormalComponent(int comp, string arrayName, int arrayComp, int min, int max, int normalize) { vtkd_im.vtkFieldDataToAttributeDataFilter_SetNormalComponent__SWIG_0(cast(void*)swigCPtr, comp, (arrayName ? std.string.toStringz(arrayName) : null), arrayComp, min, max, normalize); } public void SetNormalComponent(int comp, string arrayName, int arrayComp) { vtkd_im.vtkFieldDataToAttributeDataFilter_SetNormalComponent__SWIG_1(cast(void*)swigCPtr, comp, (arrayName ? std.string.toStringz(arrayName) : null), arrayComp); } public string GetNormalComponentArrayName(int comp) { string ret = std.conv.to!string(vtkd_im.vtkFieldDataToAttributeDataFilter_GetNormalComponentArrayName(cast(void*)swigCPtr, comp)); return ret; } public int GetNormalComponentArrayComponent(int comp) { auto ret = vtkd_im.vtkFieldDataToAttributeDataFilter_GetNormalComponentArrayComponent(cast(void*)swigCPtr, comp); return ret; } public int GetNormalComponentMinRange(int comp) { auto ret = vtkd_im.vtkFieldDataToAttributeDataFilter_GetNormalComponentMinRange(cast(void*)swigCPtr, comp); return ret; } public int GetNormalComponentMaxRange(int comp) { auto ret = vtkd_im.vtkFieldDataToAttributeDataFilter_GetNormalComponentMaxRange(cast(void*)swigCPtr, comp); return ret; } public int GetNormalComponentNormalizeFlag(int comp) { auto ret = vtkd_im.vtkFieldDataToAttributeDataFilter_GetNormalComponentNormalizeFlag(cast(void*)swigCPtr, comp); return ret; } public void SetTensorComponent(int comp, string arrayName, int arrayComp, int min, int max, int normalize) { vtkd_im.vtkFieldDataToAttributeDataFilter_SetTensorComponent__SWIG_0(cast(void*)swigCPtr, comp, (arrayName ? std.string.toStringz(arrayName) : null), arrayComp, min, max, normalize); } public void SetTensorComponent(int comp, string arrayName, int arrayComp) { vtkd_im.vtkFieldDataToAttributeDataFilter_SetTensorComponent__SWIG_1(cast(void*)swigCPtr, comp, (arrayName ? std.string.toStringz(arrayName) : null), arrayComp); } public string GetTensorComponentArrayName(int comp) { string ret = std.conv.to!string(vtkd_im.vtkFieldDataToAttributeDataFilter_GetTensorComponentArrayName(cast(void*)swigCPtr, comp)); return ret; } public int GetTensorComponentArrayComponent(int comp) { auto ret = vtkd_im.vtkFieldDataToAttributeDataFilter_GetTensorComponentArrayComponent(cast(void*)swigCPtr, comp); return ret; } public int GetTensorComponentMinRange(int comp) { auto ret = vtkd_im.vtkFieldDataToAttributeDataFilter_GetTensorComponentMinRange(cast(void*)swigCPtr, comp); return ret; } public int GetTensorComponentMaxRange(int comp) { auto ret = vtkd_im.vtkFieldDataToAttributeDataFilter_GetTensorComponentMaxRange(cast(void*)swigCPtr, comp); return ret; } public int GetTensorComponentNormalizeFlag(int comp) { auto ret = vtkd_im.vtkFieldDataToAttributeDataFilter_GetTensorComponentNormalizeFlag(cast(void*)swigCPtr, comp); return ret; } public void SetTCoordComponent(int comp, string arrayName, int arrayComp, int min, int max, int normalize) { vtkd_im.vtkFieldDataToAttributeDataFilter_SetTCoordComponent__SWIG_0(cast(void*)swigCPtr, comp, (arrayName ? std.string.toStringz(arrayName) : null), arrayComp, min, max, normalize); } public void SetTCoordComponent(int comp, string arrayName, int arrayComp) { vtkd_im.vtkFieldDataToAttributeDataFilter_SetTCoordComponent__SWIG_1(cast(void*)swigCPtr, comp, (arrayName ? std.string.toStringz(arrayName) : null), arrayComp); } public string GetTCoordComponentArrayName(int comp) { string ret = std.conv.to!string(vtkd_im.vtkFieldDataToAttributeDataFilter_GetTCoordComponentArrayName(cast(void*)swigCPtr, comp)); return ret; } public int GetTCoordComponentArrayComponent(int comp) { auto ret = vtkd_im.vtkFieldDataToAttributeDataFilter_GetTCoordComponentArrayComponent(cast(void*)swigCPtr, comp); return ret; } public int GetTCoordComponentMinRange(int comp) { auto ret = vtkd_im.vtkFieldDataToAttributeDataFilter_GetTCoordComponentMinRange(cast(void*)swigCPtr, comp); return ret; } public int GetTCoordComponentMaxRange(int comp) { auto ret = vtkd_im.vtkFieldDataToAttributeDataFilter_GetTCoordComponentMaxRange(cast(void*)swigCPtr, comp); return ret; } public int GetTCoordComponentNormalizeFlag(int comp) { auto ret = vtkd_im.vtkFieldDataToAttributeDataFilter_GetTCoordComponentNormalizeFlag(cast(void*)swigCPtr, comp); return ret; } public void SetDefaultNormalize(int _arg) { vtkd_im.vtkFieldDataToAttributeDataFilter_SetDefaultNormalize(cast(void*)swigCPtr, _arg); } public int GetDefaultNormalize() { auto ret = vtkd_im.vtkFieldDataToAttributeDataFilter_GetDefaultNormalize(cast(void*)swigCPtr); return ret; } public void DefaultNormalizeOn() { vtkd_im.vtkFieldDataToAttributeDataFilter_DefaultNormalizeOn(cast(void*)swigCPtr); } public void DefaultNormalizeOff() { vtkd_im.vtkFieldDataToAttributeDataFilter_DefaultNormalizeOff(cast(void*)swigCPtr); } public static int GetComponentsType(int numComp, SWIGTYPE_p_p_vtkDataArray.SWIGTYPE_p_p_vtkDataArray arrays) { auto ret = vtkd_im.vtkFieldDataToAttributeDataFilter_GetComponentsType(numComp, SWIGTYPE_p_p_vtkDataArray.SWIGTYPE_p_p_vtkDataArray.swigGetCPtr(arrays)); return ret; } public static int ConstructArray(vtkDataArray.vtkDataArray da, int comp, vtkDataArray.vtkDataArray frray, int fieldComp, long min, long max, int normalize) { auto ret = vtkd_im.vtkFieldDataToAttributeDataFilter_ConstructArray(vtkDataArray.vtkDataArray.swigGetCPtr(da), comp, vtkDataArray.vtkDataArray.swigGetCPtr(frray), fieldComp, min, max, normalize); return ret; } public static vtkDataArray.vtkDataArray GetFieldArray(vtkFieldData.vtkFieldData fd, string name, int comp) { void* cPtr = vtkd_im.vtkFieldDataToAttributeDataFilter_GetFieldArray(vtkFieldData.vtkFieldData.swigGetCPtr(fd), (name ? std.string.toStringz(name) : null), comp); vtkDataArray.vtkDataArray ret = (cPtr is null) ? null : new vtkDataArray.vtkDataArray(cPtr, false); return ret; } public static void SetArrayName(vtkObject.vtkObject self, string name, string newName) { vtkd_im.vtkFieldDataToAttributeDataFilter_SetArrayName(vtkObject.vtkObject.swigGetCPtr(self), (name ? std.string.toStringz(name) : null), (newName ? std.string.toStringz(newName) : null)); } public int RequestUpdateExtent(vtkInformation.vtkInformation arg0, SWIGTYPE_p_p_vtkInformationVector.SWIGTYPE_p_p_vtkInformationVector arg1, vtkInformationVector.vtkInformationVector arg2) { auto ret = vtkd_im.vtkFieldDataToAttributeDataFilter_RequestUpdateExtent(cast(void*)swigCPtr, vtkInformation.vtkInformation.swigGetCPtr(arg0), SWIGTYPE_p_p_vtkInformationVector.SWIGTYPE_p_p_vtkInformationVector.swigGetCPtr(arg1), vtkInformationVector.vtkInformationVector.swigGetCPtr(arg2)); return ret; } }
D
/Users/devinmcgloin/exercism/rust/leap/target/debug/leap-1b0acf439bd92215: tests/leap.rs /Users/devinmcgloin/exercism/rust/leap/target/debug/leap-1b0acf439bd92215.d: tests/leap.rs
D
module android.java.java.security.Principal; public import android.java.java.security.Principal_d_interface; import arsd.jni : ImportExportImpl; mixin ImportExportImpl!Principal; import import1 = android.java.java.lang.Class;
D
/Users/jonb/Documents/GitHub/rustapps/twitterplotter/target/debug/build/proc-macro2-4b2b336b51802001/build_script_build-4b2b336b51802001: /Users/jonb/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.4.30/build.rs /Users/jonb/Documents/GitHub/rustapps/twitterplotter/target/debug/build/proc-macro2-4b2b336b51802001/build_script_build-4b2b336b51802001.d: /Users/jonb/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.4.30/build.rs /Users/jonb/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.4.30/build.rs:
D
instance ItSe_XardasNotfallBeutel_MIS(C_Item) { name = "Very Strange Leather Satchel"; mainflag = ITEM_KAT_NONE; flags = ITEM_MULTI | ITEM_MISSION; value = 0; visual = "ItMi_Pocket.3ds"; scemeName = "MAPSEALED"; material = MAT_METAL; on_state[0] = Use_XardasNotfallBeutel; description = name; text[0] = ""; text[1] = "The bag seems to"; text[2] = "contain a hard object"; text[3] = "and a document."; text[4] = ""; text[5] = NAME_Value; count[5] = value; }; func void Use_XardasNotfallBeutel() { var string concatText; CreateInvItems(hero,ItWr_XardasErmahnungFuerIdioten_MIS,1); CreateInvItems(hero,ItMi_InnosEye_Discharged_Mis,1); concatText = ConcatStrings("2",PRINT_ItemsErhalten); Print(concatText); }; instance ItWr_XardasErmahnungFuerIdioten_MIS(C_Item) { name = "Xardas' Warning Letter"; mainflag = ITEM_KAT_DOCS; flags = ITEM_MISSION; value = 0; visual = "ItWr_Scroll_02.3DS"; material = MAT_LEATHER; on_state[0] = Use_XardasErmahnungFuerIdioten; scemeName = "MAP"; description = name; }; func void Use_XardasErmahnungFuerIdioten() { var int nDocID; nDocID = Doc_Create(); Doc_SetPages(nDocID,1); Doc_SetPage(nDocID,0,"letters.TGA",0); Doc_SetFont(nDocID,0,FONT_BookHeadline); Doc_SetMargins(nDocID,-1,50,50,50,50,1); Doc_SetFont(nDocID,0,FONT_Book); Doc_PrintLine(nDocID,0,""); Doc_PrintLine(nDocID,0,""); Doc_PrintLine(nDocID,0,""); Doc_PrintLines(nDocID,0,"My young protégé, you disappoint me greatly. How could you leave on the ship and not take the Eye of Innos?"); Doc_PrintLines(nDocID,0,"I can only hope that there are limits to your negligence. Otherwise you will never rid the world of Evil and I will be forced to personally execute you for your stupidity."); Doc_PrintLine(nDocID,0,""); Doc_PrintLine(nDocID,0,""); Doc_PrintLine(nDocID,0,""); Doc_PrintLine(nDocID,0,""); Doc_PrintLine(nDocID,0,""); Doc_PrintLine(nDocID,0," Xardas"); Doc_Show(nDocID); }; instance ItWr_Krypta_Garon(C_Item) { name = "Old letter"; mainflag = ITEM_KAT_DOCS; flags = ITEM_MISSION; value = 0; visual = "ItWr_Scroll_02.3DS"; material = MAT_LEATHER; on_state[0] = Use_Krypta_Garon; scemeName = "MAP"; description = name; text[3] = "in shaky handwriting."; }; func void Use_Krypta_Garon() { var int nDocID; nDocID = Doc_Create(); Doc_SetPages(nDocID,1); Doc_SetPage(nDocID,0,"letters.TGA",0); Doc_SetFont(nDocID,-1,FONT_Book); Doc_SetMargins(nDocID,-1,50,50,50,50,1); Doc_PrintLine(nDocID,0,""); Doc_PrintLines(nDocID,0,"I have failed. In vain I have tried to keep Inubis on the path of Good."); Doc_PrintLines(nDocID,0,"At first I believed I was dead. But there is strength left yet in Ivan's old bones."); Doc_PrintLines(nDocID,0,"Inubis has arisen from the dead. Banished by the ancient order of the paladins, he now seeks revenge for his curse."); Doc_PrintLines(nDocID,0,"Many of his followers are with him. I have no idea how a warlord like Inubis could become so evil."); Doc_PrintLines(nDocID,0,"I found his tomb in this crypt. But I am uncertain whether I will ever be able to report my find. Therefore I write these lines and hope that they may be found."); Doc_PrintLines(nDocID,0,"Be warned. A mighty enemy is reaching out for the souls of the just. Inubis will not be the last."); Doc_PrintLine(nDocID,0," "); Doc_PrintLine(nDocID,0,"May Innos save your souls."); Doc_PrintLine(nDocID,0,""); Doc_PrintLine(nDocID,0," Ivan"); Doc_PrintLine(nDocID,0,""); Doc_PrintLine(nDocID,0,""); Doc_SetMargins(nDocID,-1,200,50,50,50,1); Doc_Show(nDocID); }; instance ItKe_OrkKnastDI_MIS(C_Item) { name = "Key of the Orcish Colonel"; mainflag = ITEM_KAT_NONE; flags = ITEM_MISSION; value = Value_Key_01; visual = "ItKe_Key_01.3ds"; material = MAT_METAL; description = name; text[5] = NAME_Value; count[5] = value; }; instance ItKe_EVT_UNDEAD_01(C_Item) { name = "Key of Archol"; mainflag = ITEM_KAT_NONE; flags = ITEM_MISSION; value = Value_Key_03; visual = "ItKe_Key_03.3ds"; material = MAT_METAL; description = name; text[2] = name; }; instance ItKe_EVT_UNDEAD_02(C_Item) { name = "Key of the Key Master"; mainflag = ITEM_KAT_NONE; flags = ITEM_MISSION; value = Value_Key_03; visual = "ItKe_Key_02.3ds"; material = MAT_METAL; description = name; text[5] = NAME_Value; count[5] = value; }; instance ItKe_LastDoorToUndeadDrgDI_MIS(C_Item) { name = "Black Magician's Room Key"; mainflag = ITEM_KAT_NONE; flags = ITEM_MISSION; value = Value_Key_03; visual = "ItKe_Key_03.3ds"; material = MAT_METAL; description = name; text[5] = NAME_Value; count[5] = value; }; instance ItWr_LastDoorToUndeadDrgDI_MIS(C_Item) { name = "Black Magician's Scroll"; mainflag = ITEM_KAT_DOCS; flags = ITEM_MISSION; value = 0; visual = "ItWr_Scroll_02.3DS"; material = MAT_LEATHER; on_state[0] = Use_ItWr_LastDoorToUndeadDrgDI_MIS; scemeName = "MAP"; description = name; }; func void Use_ItWr_LastDoorToUndeadDrgDI_MIS() { var int nDocID; nDocID = Doc_Create(); Doc_SetPages(nDocID,1); Doc_SetPage(nDocID,0,"letters.TGA",0); Doc_SetFont(nDocID,-1,FONT_Book); Doc_SetMargins(nDocID,-1,50,50,50,50,1); Doc_PrintLines(nDocID,0,""); Doc_PrintLines(nDocID,0,""); Doc_PrintLines(nDocID,0,"KHADOSH "); Doc_PrintLines(nDocID,0,""); Doc_PrintLine(nDocID,0,"EMEM KADAR"); Doc_PrintLine(nDocID,0,""); Doc_PrintLine(nDocID,0,""); Doc_PrintLine(nDocID,0,"The Eye of Power illuminate your path."); Doc_PrintLine(nDocID,0,""); Doc_PrintLine(nDocID,0,""); Doc_SetMargins(nDocID,-1,200,50,50,50,1); Doc_Show(nDocID); //B_LogEntry(TOPIC_HallenVonIrdorath,"The black magician's scroll contained the words KHADOSH EMEM KADAR. It sounds like some kind of magic formula, but what is it used for - and what is the Eye of Power?"); }; instance ItKe_ChestMasterDementor_MIS(C_Item) { name = "Black Magician's Chest Key"; mainflag = ITEM_KAT_NONE; flags = ITEM_MISSION; value = Value_Key_03; visual = "ItKe_Key_01.3ds"; material = MAT_METAL; description = name; text[5] = NAME_Value; count[5] = value; }; instance ItWr_Rezept_MegaDrink_MIS(C_Item) { name = "Recipe"; mainflag = ITEM_KAT_DOCS; flags = ITEM_MISSION; value = 0; visual = "ItWr_Scroll_01.3DS"; material = MAT_LEATHER; on_state[0] = Use_RezeptFuerMegaTrank; scemeName = "MAP"; description = name; }; func void Use_RezeptFuerMegaTrank() { var int nDocID; nDocID = Doc_Create(); Doc_SetPages(nDocID,1); Doc_SetPage(nDocID,0,"letters.TGA",0); Doc_SetFont(nDocID,0,FONT_BookHeadline); Doc_SetMargins(nDocID,-1,50,50,50,50,1); Doc_SetFont(nDocID,0,FONT_Book); Doc_PrintLine(nDocID,0,""); Doc_PrintLines(nDocID,0,"I have revived an ancient art. I fear Feodaron would not be impressed with my achievement."); Doc_PrintLines(nDocID,0,"It means, quite simply, that I would have to mix his entire brood in my laboratory into a potion. If only he didn't sit on his eggs like some chicken all the time, I'd have tried it out. But he still inspires me with some respect."); Doc_PrintLine(nDocID,0,""); Doc_PrintLine(nDocID,0,"Embarla Firgasto:"); Doc_PrintLine(nDocID,0,""); Doc_PrintLines(nDocID,0,"11 dragon eggs, one powderized black pearl and a pinch of sulfur."); Doc_PrintLines(nDocID,0,"The emulsion is brought to the boil and must be stirred constantly as it passes through the distiller."); Doc_PrintLines(nDocID,0,"The elixir must be used with care. It has strong side effects and can upset the entire mana system."); Doc_Show(nDocID); PLAYER_TALENT_ALCHEMY[POTION_MegaDrink] = TRUE; }; instance ItWr_Diary_BlackNovice_MIS(C_Item) { name = "Diary"; mainflag = ITEM_KAT_DOCS; flags = 0; value = 100; visual = "ItWr_Book_02_04.3ds"; material = MAT_LEATHER; scemeName = "MAP"; description = name; text[5] = NAME_Value; count[5] = value; on_state[0] = Use_Diary_BlackNovice; }; func void Use_Diary_BlackNovice() { var int nDocID; nDocID = Doc_Create(); Doc_SetPages(nDocID,2); Doc_SetPage(nDocID,0,"BOOK_RED_L.tga",0); Doc_SetPage(nDocID,1,"BOOK_RED_R.tga",0); Doc_SetMargins(nDocID,0,275,20,30,20,1); Doc_SetFont(nDocID,0,FONT_BookHeadline); Doc_SetFont(nDocID,0,FONT_Book); Doc_PrintLine(nDocID,0,""); Doc_PrintLines(nDocID,0,"I've been waiting to be called up for 36 days now. I'm beginning to doubt they'll take me on. But I've done all they asked me to. I've fetched and carried for them like some old housemaid."); Doc_PrintLines(nDocID,0,"The key master instructed me to seal the bars. I still haven't gotten around to it. If things go on this way, anyone might just stroll in through the gate."); Doc_PrintLines(nDocID,0,"It's a shame I can't remember the combinations."); Doc_SetMargins(nDocID,-1,30,20,275,20,1); Doc_SetFont(nDocID,1,FONT_Book); Doc_PrintLine(nDocID,1,""); Doc_PrintLines(nDocID,1,"I'd have sneaked into the great Hall ages ago. I can hardly wait to see the Master. I wonder if they'll let me see him once I'm one of them."); Doc_PrintLine(nDocID,1,""); Doc_PrintLines(nDocID,1,"I tried my luck yesterday. But I failed the two lever chambers before I could even press the three switches in the west wing in the right order. That dog locked the chambers! Tomorrow I'm going to try and get the key off him ..."); Doc_Show(nDocID); //B_LogEntry(TOPIC_HallenVonIrdorath,"The diary of the novice black magician talks about lever chambers, key masters, switch combinations and other things. I should keep that in the back of my mind, it could be useful later."); }; instance ItWr_ZugBruecke_MIS(C_Item) { name = "Old letter"; mainflag = ITEM_KAT_DOCS; flags = ITEM_MISSION; value = 0; visual = "ItWr_Scroll_01.3DS"; material = MAT_LEATHER; on_state[0] = Use_ZugBruecke; scemeName = "MAP"; description = name; }; func void Use_ZugBruecke() { var int nDocID; nDocID = Doc_Create(); Doc_SetPages(nDocID,1); Doc_SetPage(nDocID,0,"letters.TGA",0); Doc_SetFont(nDocID,0,FONT_BookHeadline); Doc_PrintLine(nDocID,0,""); Doc_PrintLine(nDocID,0,""); Doc_PrintLine(nDocID,0," Last warning!"); Doc_SetMargins(nDocID,-1,50,50,70,50,1); Doc_SetFont(nDocID,0,FONT_Book); Doc_PrintLine(nDocID,0,""); Doc_PrintLine(nDocID,0,""); Doc_PrintLines(nDocID,0,"I don't care if you can cross the bridge from the other side or not. If I had any say, you'd all rot in hell."); Doc_PrintLines(nDocID,0,"I'm gonna leave the bridge drawn in as long as I'm in my domain. And if I catch one more person trying to hit the switches with a bow and arrow to get over, I will personally hang the idiot from the nearest tree!"); Doc_PrintLines(nDocID,0,""); Doc_PrintLine(nDocID,0,""); Doc_PrintLine(nDocID,0,""); Doc_PrintLine(nDocID,0," Archol"); Doc_Show(nDocID); }; instance ItMi_PowerEye(C_Item) { name = "Eye of Power"; mainflag = ITEM_KAT_NONE; flags = ITEM_MULTI | ITEM_MISSION; visual = "ItMi_DarkPearl.3ds"; material = MAT_METAL; wear = WEAR_EFFECT; effect = "SPELLFX_ITEMGLIMMER"; description = name; text[5] = NAME_Value; count[5] = value; inv_zbias = INVCAM_ENTF_MISC_STANDARD; };
D
interface Node { type: string; start: number; end: number; } interface IdNode extends Node { name: "window"; } interface KeyNode extends Node { name: "clickLog" } // 普通标示符 interface IdentifierNode extends Node { name: string; } // jsx标示符 interface JSXIdentifierNode extends IdentifierNode {} // es6 解构赋值 interface ObjectPatternNode extends Node { properties: Array<PropertyNode>; } interface ReturnStatementNode extends Node { argument: IdentifierNode; } interface BlockStatementNode extends Node { body: Array<ReturnStatementNode>; } interface RootNode extends Node { body: Array<any>; sourceType: "module"; } interface VariableDeclaratorNode extends Node { declarations: Array<any>; kind?: "const"; id: {}; init: {}; } interface ExportDefaultDeclarationNode extends Node { // 声明 declaration: ArrowFunctionExpressionNode; } // 对象表达式 interface ObjectExpressionNode extends Node { properties: Array<any>; } interface PropertyNode extends Node { method: boolean; // 速记? shorthand: boolean; computed: boolean; key: KeyNode; value: FunctionExpressionNode|IdentifierNode; kind: "init"; } interface ElementNode extends Node { name: JSXIdentifierNode; } interface OpeningElement extends ElementNode { selfClosing: boolean; attributes: Array<JSXAttributeNode>; } interface ClosingElement extends ElementNode {} interface JSXTextNode extends Node { value: string; raw: string; } interface LiteralNode extends Node { value: string; raw: string; } interface MemberExpressionNode extends Node { object: IdentifierNode; property: IdentifierNode; computed: boolean; } interface CallExpressionNode extends Node { callee: MemberExpressionNode; arguments: Array<ArrowFunctionExpressionNode> } interface JSXExpressionContainerNode extends Node { expression: CallExpressionNode; } interface JSXAttributeNode extends Node { name: JSXIdentifierNode; value: LiteralNode; } interface JSXElementNode extends Node { openingElement: OpeningElement; closingElement: ClosingElement; children: Array<JSXElementNode|JSXTextNode|JSXExpressionContainerNode>; } interface FunctionExpressionNode extends Node { id: null; expression: boolean; generator: boolean; async: boolean; params: Array<IdentifierNode>; body: BlockStatementNode|JSXElementNode; } interface ArrowFunctionExpressionNode extends FunctionExpressionNode {}
D
/** * Compiler implementation of the * $(LINK2 http://www.dlang.org, D programming language). * * Compute common subexpressions for non-optimized builds. * * Copyright: Copyright (C) 1985-1995 by Symantec * Copyright (C) 2000-2021 by The D Language Foundation, All Rights Reserved * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: https://github.com/dlang/dmd/blob/master/src/dmd/backend/cgcs.d * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/backend/cgcs.d */ module dmd.backend.cgcs; version (SPP) { } else { import core.stdc.stdio; import core.stdc.stdlib; import dmd.backend.cc; import dmd.backend.cdef; import dmd.backend.code; import dmd.backend.el; import dmd.backend.global; import dmd.backend.oper; import dmd.backend.ty; import dmd.backend.type; import dmd.backend.barray; import dmd.backend.dlist; import dmd.backend.dvec; nothrow: /******************************* * Eliminate common subexpressions across extended basic blocks. * String together as many blocks as we can. */ public extern (C++) void comsubs() { //static int xx; //printf("comsubs() %d\n", ++xx); //debugx = (xx == 37); debug if (debugx) printf("comsubs(%p)\n",startblock); // No longer do we just compute Bcount. We now eliminate unreachable // blocks. block_compbcount(); // eliminate unreachable blocks version (SCPP) { if (errcnt) return; } if (!csvec) { csvec = vec_calloc(CSVECDIM); } block* bln; for (block* bl = startblock; bl; bl = bln) { bln = bl.Bnext; if (!bl.Belem) continue; /* if no expression or no parents */ // Count up n, the number of blocks in this extended basic block (EBB) int n = 1; // always at least one block in EBB auto blc = bl; while (bln && list_nitems(bln.Bpred) == 1 && ((blc.BC == BCiftrue && blc.nthSucc(1) == bln) || (blc.BC == BCgoto && blc.nthSucc(0) == bln) ) && bln.BC != BCasm // no CSE's extending across ASM blocks ) { n++; // add block to EBB blc = bln; bln = blc.Bnext; } vec_clear(csvec); hcstab.setLength(0); hcsarray.touchstari = 0; hcsarray.touchfunci[0] = 0; hcsarray.touchfunci[1] = 0; bln = bl; while (n--) // while more blocks in EBB { debug if (debugx) printf("cses for block %p\n",bln); if (bln.Belem) ecom(&bln.Belem); // do the tree bln = bln.Bnext; } } debug if (debugx) printf("done with comsubs()\n"); } /******************************* */ public extern (C++) void cgcs_term() { vec_free(csvec); csvec = null; debug debugw && printf("freeing hcstab\n"); //hcstab.dtor(); // cache allocation for next iteration } /***********************************************************************/ private: alias hash_t = uint; // for hash values /********************************* * Struct for each elem: * Helem pointer to elem * Hhash hash value for the elem */ struct HCS { elem* Helem; hash_t Hhash; } struct HCSArray { uint touchstari; uint[2] touchfunci; } __gshared { Barray!HCS hcstab; // array of hcs's HCSArray hcsarray; // Use a bit vector for quick check if expression is possibly in hcstab[]. // This results in much faster compiles when hcstab[] gets big. vec_t csvec; // vector of used entries enum CSVECDIM = 16_001; //8009 //3001 // dimension of csvec (should be prime) } /************************* * Eliminate common subexpressions for an element. */ void ecom(elem **pe) { auto e = *pe; assert(e); elem_debug(e); debug assert(e.Ecount == 0); //assert(e.Ecomsub == 0); const tym = tybasic(e.Ety); const op = e.Eoper; switch (op) { case OPconst: case OPrelconst: break; case OPvar: if (e.EV.Vsym.ty() & mTYshared) return; // don't cache shared variables break; case OPstreq: case OPpostinc: case OPpostdec: case OPeq: case OPaddass: case OPminass: case OPmulass: case OPdivass: case OPmodass: case OPshrass: case OPashrass: case OPshlass: case OPandass: case OPxorass: case OPorass: case OPvecsto: /* Reverse order of evaluation for double op=. This is so that */ /* the pushing of the address of the second operand is easier. */ /* However, with the 8087 we don't need the kludge. */ if (op != OPeq && tym == TYdouble && !config.inline8087) { if (!OTleaf(e.EV.E1.Eoper)) ecom(&e.EV.E1.EV.E1); ecom(&e.EV.E2); } else { /* Don't mark the increment of an i++ or i-- as a CSE, if it */ /* can be done with an INC or DEC instruction. */ if (!(OTpost(op) && elemisone(e.EV.E2))) ecom(&e.EV.E2); /* evaluate 2nd operand first */ case OPnegass: if (!OTleaf(e.EV.E1.Eoper)) /* if lvalue is an operator */ { if (e.EV.E1.Eoper != OPind) elem_print(e); assert(e.EV.E1.Eoper == OPind); ecom(&(e.EV.E1.EV.E1)); } } touchlvalue(e.EV.E1); if (!OTpost(op)) /* lvalue of i++ or i-- is not a cse*/ { const hash = cs_comphash(e.EV.E1); vec_setbit(hash % CSVECDIM,csvec); addhcstab(e.EV.E1,hash); // add lvalue to hcstab[] } return; case OPbtc: case OPbts: case OPbtr: case OPcmpxchg: ecom(&e.EV.E1); ecom(&e.EV.E2); touchfunc(0); // indirect assignment return; case OPandand: case OPoror: { ecom(&e.EV.E1); const lengthSave = hcstab.length; auto hcsarraySave = hcsarray; ecom(&e.EV.E2); hcsarray = hcsarraySave; // no common subs by E2 hcstab.setLength(lengthSave); return; /* if comsub then logexp() will */ } case OPcond: { ecom(&e.EV.E1); const lengthSave = hcstab.length; auto hcsarraySave = hcsarray; ecom(&e.EV.E2.EV.E1); // left condition hcsarray = hcsarraySave; // no common subs by E2 hcstab.setLength(lengthSave); ecom(&e.EV.E2.EV.E2); // right condition hcsarray = hcsarraySave; // no common subs by E2 hcstab.setLength(lengthSave); return; // can't be a common sub } case OPcall: case OPcallns: ecom(&e.EV.E2); /* eval right first */ goto case OPucall; case OPucall: case OPucallns: ecom(&e.EV.E1); touchfunc(1); return; case OPstrpar: /* so we don't break logexp() */ case OPinp: /* never CSE the I/O instruction itself */ case OPprefetch: // don't CSE E2 or the instruction ecom(&e.EV.E1); goto case OPasm; case OPasm: case OPstrthis: // don't CSE these case OPframeptr: case OPgot: case OPctor: case OPdtor: case OPdctor: case OPmark: return; case OPddtor: touchall(); ecom(&e.EV.E1); touchall(); return; case OPparam: case OPoutp: ecom(&e.EV.E1); goto case OPinfo; case OPinfo: ecom(&e.EV.E2); return; case OPcomma: ecom(&e.EV.E1); ecom(&e.EV.E2); return; case OPremquo: ecom(&e.EV.E1); ecom(&e.EV.E2); break; case OPvp_fp: case OPcvp_fp: ecom(&e.EV.E1); touchaccess(hcstab, e); break; case OPind: ecom(&e.EV.E1); /* Generally, CSEing a *(double *) results in worse code */ if (tyfloating(tym)) return; if (tybasic(e.EV.E1.Ety) == TYsharePtr) return; break; case OPstrcpy: case OPstrcat: case OPmemcpy: case OPmemset: ecom(&e.EV.E2); goto case OPsetjmp; case OPsetjmp: ecom(&e.EV.E1); touchfunc(0); return; default: /* other operators */ if (!OTbinary(e.Eoper)) WROP(e.Eoper); assert(OTbinary(e.Eoper)); goto case OPadd; case OPadd: case OPmin: case OPmul: case OPdiv: case OPor: case OPxor: case OPand: case OPeqeq: case OPne: case OPscale: case OPyl2x: case OPyl2xp1: ecom(&e.EV.E1); ecom(&e.EV.E2); break; case OPstring: case OPaddr: case OPbit: WROP(e.Eoper); elem_print(e); assert(0); /* optelem() should have removed these */ /* NOTREACHED */ // Explicitly list all the unary ops for speed case OPnot: case OPcom: case OPneg: case OPuadd: case OPabs: case OPrndtol: case OPrint: case OPpreinc: case OPpredec: case OPbool: case OPstrlen: case OPs16_32: case OPu16_32: case OPs32_d: case OPu32_d: case OPd_s16: case OPs16_d: case OP32_16: case OPf_d: case OPld_d: case OPc_r: case OPc_i: case OPu8_16: case OPs8_16: case OP16_8: case OPu32_64: case OPs32_64: case OP64_32: case OPmsw: case OPu64_128: case OPs64_128: case OP128_64: case OPs64_d: case OPd_u64: case OPu64_d: case OPstrctor: case OPu16_d: case OPd_u16: case OParrow: case OPvoid: case OPbsf: case OPbsr: case OPbswap: case OPpopcnt: case OPvector: case OPld_u64: case OPsqrt: case OPsin: case OPcos: case OPoffset: case OPnp_fp: case OPnp_f16p: case OPf16p_np: case OPvecfill: case OPtoprec: ecom(&e.EV.E1); break; case OPd_ld: return; case OPd_f: { const op1 = e.EV.E1.Eoper; if (config.fpxmmregs && (op1 == OPs32_d || I64 && (op1 == OPs64_d || op1 == OPu32_d)) ) ecom(&e.EV.E1.EV.E1); // e and e1 ops are fused (see xmmcnvt()) else ecom(&e.EV.E1); break; } case OPd_s32: case OPd_u32: case OPd_s64: if (e.EV.E1.Eoper == OPf_d && config.fpxmmregs) ecom(&e.EV.E1.EV.E1); // e and e1 ops are fused (see xmmcnvt()); else ecom(&e.EV.E1); break; case OPhalt: return; } /* don't CSE structures or unions or volatile stuff */ if (tym == TYstruct || tym == TYvoid || e.Ety & mTYvolatile) return; if (tyfloating(tym) && config.inline8087) { /* can CSE XMM code, but not x87 */ if (!(config.fpxmmregs && tyxmmreg(tym))) return; } const hash = cs_comphash(e); /* must be AFTER leaves are done */ /* Search for a match in hcstab[]. * Search backwards, as most likely matches will be towards the end * of the list. */ debug if (debugx) printf("elem: %p hash: %6d\n",e,hash); int csveci = hash % CSVECDIM; if (vec_testbit(csveci,csvec)) { foreach_reverse (i, ref hcs; hcstab[]) { debug if (debugx) printf("i: %2d Hhash: %6d Helem: %p\n", cast(int) i,hcs.Hhash,hcs.Helem); elem* ehash; if (hash == hcs.Hhash && (ehash = hcs.Helem) != null) { /* if elems are the same and we still have room for more */ if (el_match(e,ehash) && ehash.Ecount < 0xFF) { /* Make sure leaves are also common subexpressions * to avoid false matches. */ if (!OTleaf(op)) { if (!e.EV.E1.Ecount) continue; if (OTbinary(op) && !e.EV.E2.Ecount) continue; } ehash.Ecount++; *pe = ehash; debug if (debugx) printf("**MATCH** %p with %p\n",e,*pe); el_free(e); return; } } } } else vec_setbit(csveci,csvec); addhcstab(e,hash); // add this elem to hcstab[] } /************************** * Compute hash function for elem e. */ hash_t cs_comphash(const elem *e) { elem_debug(e); const op = e.Eoper; hash_t hash = (e.Ety & (mTYbasic | mTYconst | mTYvolatile)) + (op << 8); if (!OTleaf(op)) { hash += cast(size_t) e.EV.E1; if (OTbinary(op)) hash += cast(size_t) e.EV.E2; } else { hash += e.EV.Vint; if (op == OPvar || op == OPrelconst) hash += cast(size_t) e.EV.Vsym; } return hash; } /**************************** * Add an elem to the common subexpression table. */ void addhcstab(elem *e, hash_t hash) { hcstab.push(HCS(e, hash)); } /*************************** * "touch" the elem. * If it is a pointer, "touch" all the suspects * who could be pointed to. * Eliminate common subs that are indirect loads. */ void touchlvalue(elem *e) { if (e.Eoper == OPind) /* if indirect store */ { /* NOTE: Some types of array assignments do not need * to touch all variables. (Like a[5], where a is an * array instead of a pointer.) */ touchfunc(0); return; } foreach_reverse (ref hcs; hcstab[]) { if (hcs.Helem && hcs.Helem.EV.Vsym == e.EV.Vsym) hcs.Helem = null; } if (!(e.Eoper == OPvar || e.Eoper == OPrelconst)) elem_print(e); assert(e.Eoper == OPvar || e.Eoper == OPrelconst); switch (e.EV.Vsym.Sclass) { case SCregpar: case SCregister: case SCpseudo: break; case SCauto: case SCparameter: case SCfastpar: case SCshadowreg: case SCbprel: if (e.EV.Vsym.Sflags & SFLunambig) break; goto case SCstatic; case SCstatic: case SCextern: case SCglobal: case SClocstat: case SCcomdat: case SCinline: case SCsinline: case SCeinline: case SCcomdef: touchstar(); break; default: elem_print(e); symbol_print(e.EV.Vsym); assert(0); } } /************************** * "touch" variables that could be changed by a function call or * an indirect assignment. * Eliminate any subexpressions that are "starred" (they need to * be recomputed). * Params: * flag = If 1, then this is a function call. * If 0, then this is an indirect assignment. */ void touchfunc(int flag) { //printf("touchfunc(%d)\n", flag); HCS *petop = hcstab.ptr + hcstab.length; //pe = &hcstab[0]; printf("pe = %p, petop = %p\n",pe,petop); assert(hcsarray.touchfunci[flag] <= hcstab.length); for (HCS *pe = hcstab.ptr + hcsarray.touchfunci[flag]; pe < petop; pe++) { elem *he = pe.Helem; if (!he) continue; switch (he.Eoper) { case OPvar: if (Symbol_isAffected(*he.EV.Vsym)) { pe.Helem = null; continue; } break; case OPind: if (tybasic(he.EV.E1.Ety) == TYimmutPtr) break; goto Ltouch; case OPstrlen: case OPstrcmp: case OPmemcmp: case OPbt: goto Ltouch; case OPvp_fp: case OPcvp_fp: if (flag == 0) /* function calls destroy vptrfptr's, */ break; /* not indirect assignments */ Ltouch: pe.Helem = null; break; default: break; } } hcsarray.touchfunci[flag] = cast(uint)hcstab.length; } /******************************* * Eliminate all common subexpressions that * do any indirection ("starred" elems). */ void touchstar() { foreach (ref hcs; hcstab[hcsarray.touchstari .. $]) { const e = hcs.Helem; if (e && (e.Eoper == OPind && tybasic(e.EV.E1.Ety) != TYimmutPtr || e.Eoper == OPbt) ) hcs.Helem = null; } hcsarray.touchstari = cast(uint)hcstab.length; } /******************************* * Eliminate all common subexpressions. */ void touchall() { foreach (ref hcs; hcstab[]) { hcs.Helem = null; } hcsarray.touchstari = cast(uint)hcstab.length; hcsarray.touchfunci[0] = cast(uint)hcstab.length; hcsarray.touchfunci[1] = cast(uint)hcstab.length; } /***************************************** * Eliminate any common subexpressions that could be modified * if a handle pointer access occurs. */ void touchaccess(ref Barray!HCS hcstab, const elem *ev) pure nothrow { const ev1 = ev.EV.E1; foreach (ref hcs; hcstab[]) { const e = hcs.Helem; /* Invalidate any previous handle pointer accesses that */ /* are not accesses of ev. */ if (e && (e.Eoper == OPvp_fp || e.Eoper == OPcvp_fp) && e.EV.E1 != ev1) hcs.Helem = null; } } }
D
/** * Copyright: Copyright (c) 2011 Jacob Carlborg. All rights reserved. * Authors: Jacob Carlborg * Version: Initial created: Jan 19, 2011 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0) */ module dvm.commands.DvmInstall; import std.algorithm : each, filter, find, map; import std.array : array, join; import std.exception : assumeUnique; import std.file : append, exists, thisExePath; import std.path : buildPath; import std.stdio : writeln; import tango.io.device.File; import tango.sys.HomeFolder; import Path = dvm.io.Path; import dvm.commands.Command; import dvm.dvm.Exceptions; import dvm.dvm.ShellScript; import dvm.dvm.Options; import dvm.util.Util; version (Windows) import DvmRegistry = dvm.util.DvmRegistry; version (Windows) import dvm.util.Windows; class DvmInstall : Command { private { enum postInstallInstructions = import("post_install_instructions.txt"); enum failedInstallInstructions = import("failed_install_instructions.txt"); version (Posix) enum dvmScript = import("dvm.sh"); else enum dvmScript = import("dvm.bat"); } override void execute () { install; } private: void install () { if (Path.exists(options.path.dvm)) return update; verbose("Installing dvm to: ", options.path.dvm); createPaths; copyExecutable; writeScript; version (Posix) { setPermissions; installBashInclude(createBashInclude); } version (Windows) setupRegistry; } void update () { createPaths; copyExecutable; writeScript; setPermissions; version (Windows) setupRegistry; } void createPaths () { verbose("Creating paths:"); createPath(options.path.dvm); createPath(options.path.archives); createPath(Path.join(options.path.dvm, options.path.bin).assumeUnique); createPath(options.path.compilers); createPath(options.path.env); createPath(options.path.scripts); verbose(); } void copyExecutable () { verbose("Copying executable:"); verbose("thisExePath: ", thisExePath); copy(thisExePath, options.path.dvmExecutable); } void writeScript () { verbose("Writing script to: ", options.path.dvmScript); File.set(options.path.dvmScript, dvmScript); } void setPermissions () { verbose("Setting permissions:"); permission(options.path.dvmScript, "+x"); permission(options.path.dvmExecutable, "+x"); } version (Posix) void installBashInclude (ShellScript sh) { static string defaultProfile() { with(Shell) switch (Options.instance.shell) { case bash: return ".bash_profile"; case zsh: return ".zprofile"; default: throw new DvmException("Failed to identify a " ~ "default shell profile file", __FILE__, __LINE__); } } enum potentialShellProfileFiles = [ [".bashrc", ".bash_profile"], [".zshrc", ".zprofile"] ]; const home = homeFolder.assumeUnique; alias toFullPath = path => home.buildPath(path); auto existingPofilePaths = potentialShellProfileFiles .map!(files => files.map!toFullPath) .map!(files => files.find!exists) .filter!(files => !files.empty) .map!(files => files.front); auto profilePaths = existingPofilePaths.empty ? [home.buildPath(defaultProfile)] : existingPofilePaths.array; verbose("Installing dvm in the shell loading file(s): ", profilePaths.join(", ")); profilePaths.each!(path => append(path, sh.content)); writeln(postInstallInstructions); } void createPath (string path) { verbose(options.indentation, path); if(!Path.exists(path)) Path.createFolder(path); } void permission (string path, string mode) { version (Posix) { verbose(options.indentation, "mode: " ~ mode); verbose(options.indentation, "file: " ~ path, '\n'); Path.permission(path, mode); } } void copy (string source, string destination) { verbose(options.indentation, "source: ", source); verbose(options.indentation, "destination: ", destination, '\n'); Path.copy(source, destination); } ShellScript createBashInclude () { auto sh = new ShellScript; sh.nl.nl; sh.comment("This loads DVM into a shell session.").nl; sh.ifFileIsNotEmpty(options.path.dvmScript, { sh.source(options.path.dvmScript); }); return sh; } version (Windows) void setupRegistry () { auto defaultCompilerPath = DvmRegistry.getDefaultCompilerPath(); DvmRegistry.updateEnvironment(options.path.binDir, defaultCompilerPath); DvmRegistry.checkSystemPath(); broadcastSettingChange("Environment"); println("DVM has now been installed."); println("To use dvm, you may need to open a new command prompt."); } }
D
/Users/cansoykarafakili/Desktop/Hello/build/Intermediates/Hello.build/Debug/Node.build/Objects-normal/x86_64/FuzzyConverter.o : /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredData/StructuredData.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredData/StructuredData+Polymorphic.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredDataWrapper/StructuredDataWrapper+Polymorphic.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredDataWrapper/StructuredDataWrapper+Convenience.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Core/Node.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredData/StructuredData+Equatable.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredDataWrapper/StructuredDataWrapper+Equatable.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Core/NodeRepresentable.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredData/StructuredData+PathIndexable.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredDataWrapper/StructuredDataWrapper+PathIndexable.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Core/NodeInitializable.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Convertibles/UUID+Convertible.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Convertibles/Schema+Convertible.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Convertibles/Date+Convertible.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Convertibles/String+Convertible.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Fuzzy/Optional+Convertible.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Convertibles/Bool+Convertible.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Convertibles/Integer+Convertible.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Convertibles/UnsignedInteger+Convertible.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Convertibles/SchemaWrapper+Convertible.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Fuzzy/Set+Convertible.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Convertibles/FloatingPoint+Convertible.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Fuzzy/Array+Convertible.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Fuzzy/Dictionary+Convertible.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Core/NodeConvertible.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Number/Number.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Utilities/Identifier.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredDataWrapper/StructuredDataWrapper.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Fuzzy/FuzzyConverter.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredDataWrapper/StructuredDataWrapper+Cases.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredDataWrapper/StructuredDataWrapper+Literals.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Accessors/Getters.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Accessors/Setters.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Utilities/Errors.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Utilities/Exports.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredData/StructuredData+Init.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Core/Context.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Fuzzy/Fuzzy+Any.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/PathIndexable.framework/Modules/PathIndexable.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/Bits.framework/Modules/Bits.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/Node.build/Objects-normal/x86_64/FuzzyConverter~partial.swiftmodule : /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredData/StructuredData.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredData/StructuredData+Polymorphic.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredDataWrapper/StructuredDataWrapper+Polymorphic.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredDataWrapper/StructuredDataWrapper+Convenience.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Core/Node.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredData/StructuredData+Equatable.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredDataWrapper/StructuredDataWrapper+Equatable.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Core/NodeRepresentable.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredData/StructuredData+PathIndexable.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredDataWrapper/StructuredDataWrapper+PathIndexable.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Core/NodeInitializable.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Convertibles/UUID+Convertible.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Convertibles/Schema+Convertible.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Convertibles/Date+Convertible.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Convertibles/String+Convertible.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Fuzzy/Optional+Convertible.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Convertibles/Bool+Convertible.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Convertibles/Integer+Convertible.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Convertibles/UnsignedInteger+Convertible.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Convertibles/SchemaWrapper+Convertible.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Fuzzy/Set+Convertible.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Convertibles/FloatingPoint+Convertible.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Fuzzy/Array+Convertible.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Fuzzy/Dictionary+Convertible.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Core/NodeConvertible.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Number/Number.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Utilities/Identifier.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredDataWrapper/StructuredDataWrapper.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Fuzzy/FuzzyConverter.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredDataWrapper/StructuredDataWrapper+Cases.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredDataWrapper/StructuredDataWrapper+Literals.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Accessors/Getters.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Accessors/Setters.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Utilities/Errors.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Utilities/Exports.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredData/StructuredData+Init.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Core/Context.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Fuzzy/Fuzzy+Any.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/PathIndexable.framework/Modules/PathIndexable.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/Bits.framework/Modules/Bits.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/Node.build/Objects-normal/x86_64/FuzzyConverter~partial.swiftdoc : /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredData/StructuredData.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredData/StructuredData+Polymorphic.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredDataWrapper/StructuredDataWrapper+Polymorphic.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredDataWrapper/StructuredDataWrapper+Convenience.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Core/Node.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredData/StructuredData+Equatable.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredDataWrapper/StructuredDataWrapper+Equatable.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Core/NodeRepresentable.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredData/StructuredData+PathIndexable.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredDataWrapper/StructuredDataWrapper+PathIndexable.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Core/NodeInitializable.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Convertibles/UUID+Convertible.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Convertibles/Schema+Convertible.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Convertibles/Date+Convertible.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Convertibles/String+Convertible.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Fuzzy/Optional+Convertible.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Convertibles/Bool+Convertible.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Convertibles/Integer+Convertible.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Convertibles/UnsignedInteger+Convertible.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Convertibles/SchemaWrapper+Convertible.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Fuzzy/Set+Convertible.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Convertibles/FloatingPoint+Convertible.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Fuzzy/Array+Convertible.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Fuzzy/Dictionary+Convertible.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Core/NodeConvertible.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Number/Number.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Utilities/Identifier.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredDataWrapper/StructuredDataWrapper.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Fuzzy/FuzzyConverter.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredDataWrapper/StructuredDataWrapper+Cases.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredDataWrapper/StructuredDataWrapper+Literals.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Accessors/Getters.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Accessors/Setters.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Utilities/Errors.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Utilities/Exports.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/StructuredData/StructuredData+Init.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Core/Context.swift /Users/cansoykarafakili/Desktop/Hello/.build/checkouts/node.git-9175390252000121167/Sources/Node/Fuzzy/Fuzzy+Any.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/PathIndexable.framework/Modules/PathIndexable.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/Bits.framework/Modules/Bits.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
module android.java.java.util.concurrent.Semaphore_d_interface; import arsd.jni : IJavaObjectImplementation, JavaPackageId, JavaName, IJavaObject, ImportExportImpl, JavaInterfaceMembers; static import arsd.jni; import import1 = android.java.java.lang.Class_d_interface; import import0 = android.java.java.util.concurrent.TimeUnit_d_interface; final class Semaphore : IJavaObject { static immutable string[] _d_canCastTo = [ "java/io/Serializable", ]; @Import this(int); @Import this(int, bool); @Import void acquire(); @Import void acquireUninterruptibly(); @Import bool tryAcquire(); @Import bool tryAcquire(long, import0.TimeUnit); @Import void release(); @Import void acquire(int); @Import void acquireUninterruptibly(int); @Import bool tryAcquire(int); @Import bool tryAcquire(int, long, import0.TimeUnit); @Import void release(int); @Import int availablePermits(); @Import int drainPermits(); @Import bool isFair(); @Import bool hasQueuedThreads(); @Import int getQueueLength(); @Import @JavaName("toString") string toString_(); override string toString() { return arsd.jni.javaObjectToString(this); } @Import import1.Class getClass(); @Import int hashCode(); @Import bool equals(IJavaObject); @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 = "Ljava/util/concurrent/Semaphore;"; }
D
module arraylist; //TODO REMOVE ME, USE std.container.array instead public class ArrayList(V) { V[] array; private int lastIndex; /** * Constructs an ArrayList with the default starting size, * which is currently 10. */ public this() { this(10); } /** * Constructs an ArrayList with the specified starting size * Params: * size = the starting size */ public this(uint size) { array = new V[size]; lastIndex = -1; } private this(V[] arr, uint lastIndex) { array = arr; this.lastIndex = lastIndex; } /** * Adds an item to the end of the ArrayList * Params: * item = the item to add to the ArrayList * Returns: a reference to the ArrayList */ public ArrayList!(V) push(V item) { if(lastIndex == array.length - 1) { grow(); } array[++lastIndex] = item; return this; } private void grow() { array.length = array.length * 2; } /** * Returns the number of elements in the ArrayList */ size_t size() { return lastIndex + 1; } /** * Returns the current length of the ArrayList * if this size is exceeded, the ArrayList will grow */ size_t capacity() { return array.length; } /** * Returns true if the ArrayList is empty */ bool isEmpty() { return lastIndex == -1; } /** * Returns a shallow copy of the ArrayList */ ArrayList!(V) dup() { return new ArrayList!(V)(array.dup, lastIndex); } /** * Removes all elements from the ArrayList * Returns a reference to the ArrayList */ ArrayList!(V) clear() { for(int i = 0; i <= lastIndex; i++) { //I don't see what I would do here with nonobjects... array[i] = V.init; } return this; } /** * Returns true if the ArrayList contains the specified value */ bool contains(V value) { for(int i = 0; i <= lastIndex; i++) { if(array[i] == value) return true; } return false; } V opIndex(uint i) { return array[i]; } V opIndexAssign(V item, uint i) { return item; } alias opIndex get; alias opIndexAssign set; //this may be somewhat conterintuitive as set(index, item) feels more natural? }
D
//--------------------------------------------------------------------- // Item Werte //--------------------------------------------------------------------- const int Value_Goldnugget = 18; const int Value_WhitePearl = 120; const int Value_GreatPearl = 500; const int Value_Addon_Joint_01 = 60; //--------------------------------------------------------------------- // Goldbrocken //--------------------------------------------------------------------- INSTANCE ItMi_GoldNugget_Addon(C_Item) { name = "Goldbrocken"; mainflag = ITEM_KAT_NONE; flags = ITEM_MULTI; value = Value_Goldnugget; visual = "ItMi_GoldNugget_01.3ds"; material = MAT_STONE; description = name; TEXT[5] = NAME_Value; COUNT[5] = value; INV_ZBIAS = INVCAM_ENTF_MISC2_STANDARD; }; //--------------------------------------------------------------------- // Weiße Perle //--------------------------------------------------------------------- INSTANCE ItMi_Addon_WhitePearl (C_Item) { name = "Perle"; mainflag = ITEM_KAT_NONE; flags = ITEM_MULTI; value = Value_WhitePearl; visual = "ItMi_WhitePearl_01.3ds"; material = MAT_STONE; description = name; TEXT[5] = NAME_Value; COUNT[5] = value; INV_ZBIAS = INVCAM_ENTF_MISC_STANDARD; }; //--------------------------------------------------------------------- // Weiße Perle //--------------------------------------------------------------------- INSTANCE ItMi_GreatPearl (C_Item) { name = "Große Perle"; mainflag = ITEM_KAT_NONE; flags = ITEM_MULTI; value = Value_GreatPearl; visual = "ItMi_GreatPearl_01.3ds"; material = MAT_STONE; description = name; TEXT[5] = NAME_Value; COUNT[5] = value; INV_ZBIAS = INVCAM_ENTF_MISC_STANDARD; }; //--------------------------------------------------------------------- // Grüner Novize //--------------------------------------------------------------------- INSTANCE ItMi_Addon_Joint_01(C_Item) { name = "Grüner Novize"; mainflag = ITEM_KAT_NONE; flags = ITEM_MULTI; value = Value_Addon_Joint_01; visual = "ItMi_Joint_US.3ds"; material = MAT_LEATHER; scemeName = "JOINT"; on_state[0] = Use_Addon_Joint_01; description = name; TEXT[5] = NAME_Value; COUNT[5] = value; INV_ZBIAS = INVCAM_ENTF_RING_STANDARD; }; var int FirstJoint; func void Use_Addon_Joint_01() { if (Npc_IsPlayer (self)) { if (FirstJoint == FALSE) { FirstJoint = TRUE; B_GivePlayerXP (5); }; Wld_PlayEffect ("SLOW_TIME", self, self, 0, 0, 0, FALSE); Mod_JointCounter += 1; }; }; INSTANCE ItMi_Addon_Joint_02(C_Item) { name = "Schwarzer Weiser"; mainflag = ITEM_KAT_NONE; flags = ITEM_MULTI; value = Value_Addon_Joint_01; visual = "ItMi_Joint_US.3ds"; material = MAT_LEATHER; scemeName = "JOINT"; on_state[0] = Use_Addon_Joint_02; description = name; TEXT[5] = NAME_Value; COUNT[5] = value; INV_ZBIAS = INVCAM_ENTF_RING_STANDARD; }; var int First2Joint; func void Use_Addon_Joint_02() { if (Npc_IsPlayer (self)) { if (First2Joint == FALSE) { First2Joint = TRUE; B_GivePlayerXP (5); }; Mod_JointCounter += 1; }; }; //**************************************************************************** // Baltrams Lieferung von Akil // --------------------------------------------- //**************************************************************************** INSTANCE ItMi_BaltramPaket(C_Item) { name = "Baltram's Lieferung"; mainflag = ITEM_KAT_NONE; flags = ITEM_MISSION|ITEM_SHOW; value = 200; visual = "ItMi_Packet.3ds"; material = MAT_LEATHER; description = name; TEXT[2] = "Ein schweres Paket"; TEXT[3] = "voller guter Sachen"; TEXT[4] = "vom Bauern Akil"; }; //**************************************************************************** // Baltrams Lieferung für Skip // --------------------------------------------- //**************************************************************************** INSTANCE ItMi_Packet_Baltram4Skip_Addon (C_Item) { name = "Paket für Skip"; mainflag = ITEM_KAT_NONE; flags = ITEM_MISSION|ITEM_SHOW; value = 200; visual = "ItMi_Packet.3ds"; material = MAT_LEATHER; description = name; TEXT[2] = "Dieses schwere Paket"; TEXT[3] = "voller guter Sachen"; TEXT[4] = "ist für den Piraten Skip bestimmt"; }; /******************************************************************************************/ INSTANCE ItMi_BromorsGeld_Addon (C_Item) { name = "Bromors Goldene Schale"; mainflag = ITEM_KAT_NONE; flags = ITEM_MULTI|ITEM_MISSION; value = Value_Nugget; visual = "ItMi_GoldChalice.3DS"; material = MAT_METAL; description = name; TEXT[2] = "Der Name 'Bromor' ist mit"; TEXT[3] = "einem scharfen Gegenstand in den"; TEXT[4] = "Boden der Schale geritzt worden."; TEXT[5] = NAME_Value; COUNT[5] = value; }; INSTANCE ItSe_ADDON_CavalornsBeutel (C_Item) { name = "Cavalorns Lederbeutel"; mainflag = ITEM_KAT_NONE; flags = ITEM_MULTI|ITEM_MISSION; value = Value_Nugget; visual = "ItMi_Pocket.3ds"; scemename = "MAPSEALED"; material = MAT_LEATHER; on_state[0] = Use_CavalornsBeutel; description = name; TEXT[0] = ""; TEXT[1] = "Am Bund hängt ein Schild"; TEXT[2] = "mit dem Namen 'Cavalorn'"; TEXT[3] = "1 Brocken Erz befinden sich darin"; TEXT[4] = ""; TEXT[5] = NAME_Value; COUNT[5] = value; }; FUNC VOID Use_CavalornsBeutel () { CreateInvItems (hero, ItMi_Nugget ,1); Print (PRINT_FoundOreNugget); SC_OpenedCavalornsBeutel = TRUE; Log_CreateTopic (TOPIC_Addon_CavalornTheHut, LOG_MISSION); B_SetTopicStatus(TOPIC_Addon_CavalornTheHut, LOG_RUNNING); B_LogEntry (TOPIC_Addon_CavalornTheHut,"Bei Cavalorns Hütte im Minental habe ich einen Beutel mit einem Erzbrocken gefunden. Cavalorn, der alte Gauner, hat ihn hier bestimmt vergessen."); }; INSTANCE ItMi_Scavengerdung (C_Item) { name = "Scavengerdung"; mainflag = ITEM_KAT_NONE; flags = ITEM_MULTI|ITEM_MISSION|ITEM_SHOW; value = Value_Nugget; visual = "ItMi_Pocket.3ds"; material = MAT_LEATHER; description = name; TEXT[0] = ""; TEXT[1] = "Ein Beutel mit Scavengerdung"; TEXT[4] = ""; TEXT[5] = NAME_Value; COUNT[5] = value; }; //************************************** // Diverser Kleinkram //************************************** instance ItMi_Skull(C_Item) { name = "Schädel"; mainflag = ITEM_KAT_NONE; flags = ITEM_MISSION|ITEM_MULTI; value = 10; visual = "DT_SKELETON_V01_HEAD.3ds"; material = MAT_LEATHER; description = name; }; //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- // INEXTREMO ITEMS //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- INSTANCE ItMi_IECello(C_Item) { name = "Cello"; mainflag = ITEM_KAT_NONE; flags = ITEM_MULTI; value = 1; visual = "Itmi_IE_Cello.3ds"; material = MAT_WOOD; scemeName = "CELLO"; on_state[0] = Use_Cello; description = name; }; func void Use_Cello() { }; INSTANCE ItMi_IECelloBow(C_Item) { name = "CelloBow"; mainflag = ITEM_KAT_NONE; flags = ITEM_MULTI; value = 1; visual = "Itmi_IE_CelloBow.3ds"; material = MAT_WOOD; description = name; }; INSTANCE ItMi_IEDrum(C_Item) { name = "Drum"; mainflag = ITEM_KAT_NONE; flags = ITEM_MULTI; value = 1; visual = "Itmi_IE_Drum.3ds"; material = MAT_WOOD; scemeName = "PAUKE"; on_state[0] = Use_Drum; description = name; }; func void Use_Drum() { }; INSTANCE ItMi_IEDrumScheit(C_Item) { name = "Drumscheit"; mainflag = ITEM_KAT_NONE; flags = ITEM_MULTI; value = 1; visual = "Itmi_IE_Drumscheit.3ds"; material = MAT_WOOD; scemeName = "DRUMSCHEIT"; on_state[0] = Use_Drumscheit; description = name; }; func void Use_Drumscheit() { }; INSTANCE ItMi_IEDrumStick(C_Item) { name = "DrumStick"; mainflag = ITEM_KAT_NONE; flags = ITEM_MULTI; value = 1; visual = "Itmi_IE_DrumStick.3ds"; material = MAT_WOOD; description = name; }; INSTANCE ItMi_IEDudelBlau(C_Item) { name = "Blauer Dudelsack"; mainflag = ITEM_KAT_NONE; flags = ITEM_MULTI; value = 1; visual = "Itmi_IE_DudelBlau.3ds"; material = MAT_WOOD; scemeName = "DUDEL"; on_state[0] = Use_Dudel; description = name; }; func void Use_Dudel() { }; INSTANCE ItMi_IEDudelGelb(C_Item) { name = "Gelber Dudelsack"; mainflag = ITEM_KAT_NONE; flags = ITEM_MULTI; value = 1; visual = "Itmi_IE_DudelGelb.3ds"; material = MAT_WOOD; scemeName = "DUDEL"; on_state[0] = Use_Dudel; description = name; }; INSTANCE ItMi_IEHarfe(C_Item) { name = "Harfe"; mainflag = ITEM_KAT_NONE; flags = ITEM_MULTI; value = 1; visual = "Itmi_IE_Harfe.3ds"; material = MAT_WOOD; scemeName = "HARFE"; on_state[0] = Use_Harfe; description = name; }; func void Use_Harfe() { }; INSTANCE ItMi_IELaute(C_Item) { name = "Laute"; mainflag = ITEM_KAT_NONE; flags = ITEM_MULTI; value = 1; visual = "Itmi_IE_Laute.3ds"; material = MAT_WOOD; scemeName = "IELAUTE"; on_state[0] = Use_Laute; description = name; }; func void Use_Laute() { }; //**************************************************************************** // Lennar'S Dietrich Paket // --------------------------------------------- //**************************************************************************** INSTANCE ItMi_Addon_Lennar_Paket(C_Item) { name = "Klimperndes Paket"; mainflag = ITEM_KAT_NONE; flags = ITEM_MISSION; value = 300; visual = "ItMi_Packet.3ds"; scemename = "MAPSEALED"; on_state[0] = Use_LennarPaket; material = MAT_LEATHER; description = name; TEXT[2] = "Da sind Dietriche drin"; TEXT[3] = ""; TEXT[4] = "Viele Dietriche"; TEXT[5] = NAME_Value; COUNT[5] = value; }; FUNC VOID Use_LennarPaket() { B_PlayerFindItem (ItKE_lockpick,Lennar_picklock_amount); Snd_Play ("Geldbeutel"); LennarPaket_Open = TRUE; }; instance ItMi_Erzbrocken_Seltsam(C_Item) { name = "Merkwürdiger Erzbrocken"; mainflag = ITEM_KAT_POTIONS; flags = ITEM_MULTI|ITEM_SHOW; value = 0; visual = "ItMi_Zeitspalt_Addon.3DS"; material = MAT_STONE; wear = WEAR_EFFECT; effect = "SPELLFX_WEAKGLIMMER"; description = name; INV_ZBIAS = INVCAM_ENTF_MISC_STANDARD; }; instance ItMi_SchwarzesErz_Trent(C_Item) { name = "Schwarzer Erzbrocken von der Erznagerkönigin"; mainflag = ITEM_KAT_POTIONS; flags = ITEM_MULTI|ITEM_SHOW; value = 0; visual = "ItMi_Zeitspalt_Addon.3DS"; material = MAT_STONE; wear = WEAR_EFFECT; effect = "SPELLFX_WEAKGLIMMER"; description = name; INV_ZBIAS = INVCAM_ENTF_MISC_STANDARD; }; instance ItMi_Zeitspalt_Addon(C_Item) { name = "Schwarzes Erz"; mainflag = ITEM_KAT_POTIONS; flags = ITEM_MULTI; value = 0; visual = "ItMi_Zeitspalt_Addon.3DS"; scemename = "MAPSEALED"; on_state[0] = Use_Zeitspalt_Addon; material = MAT_STONE; wear = WEAR_EFFECT; effect = "SPELLFX_WEAKGLIMMER"; description = name; TEXT[3] = "Wirkung unbekannt"; INV_ZBIAS = INVCAM_ENTF_MISC_STANDARD; }; func void Use_Zeitspalt_Addon() { if (Npc_IsPlayer(self)) { Wld_PlayEffect("spellFX_BELIARSRAGE", self, self, 0, 0, 0, FALSE); // FIXME_Nico: DropUnconscious (DropDead funktioniert bereits) //Npc_ChangeAttribute(self, ATR_MANA, -self.attribute[ATR_MANA]); //Npc_ChangeAttribute(self, ATR_HITPOINTS, -self.attribute[ATR_HITPOINTS] + 2); // Bereits laufenden Effekt beenden, damit die Kamera nicht ausrastet... // (beim Wechsel immer noch starker Morph-Effekt, aber nicht mehr andauernd) Wld_StopEffect("SLOW_MOTION"); Wld_PlayEffect("SLOW_MOTION", self, self, 0, 0, 0, FALSE); }; };
D