code stringlengths 3 10M | language stringclasses 31 values |
|---|---|
/Users/MohamedNawar/Desktop/appointment/build/appointment.build/Debug-iphonesimulator/appointment.build/Objects-normal/x86_64/SceneDelegate.o : /Users/MohamedNawar/Desktop/appointment/appointment/ApplicationModules/MainWeatherView/View/AppointmentVC.swift /Users/MohamedNawar/Desktop/appointment/appointment/Extensions/AppStoryboard.swift /Users/MohamedNawar/Desktop/appointment/appointment/Resources/SceneDelegate.swift /Users/MohamedNawar/Desktop/appointment/appointment/Resources/AppDelegate.swift /Users/MohamedNawar/Desktop/appointment/appointment/ApplicationModules/MainWeatherView/View/Cells/employeeDataCell.swift /Users/MohamedNawar/Desktop/appointment/appointment/ApplicationModules/MainWeatherView/View/Cells/DetailsCell.swift /Users/MohamedNawar/Desktop/appointment/appointment/ApplicationModules/MainWeatherView/View/Cells/employeeTableViewCell.swift /Users/MohamedNawar/Desktop/appointment/appointment/Extensions/ViewExtension.swift /Users/MohamedNawar/Desktop/appointment/appointment/Extensions/UITableViewExtension.swift /Users/MohamedNawar/Desktop/appointment/appointment/Extensions/ErrorHandler.swift /Users/MohamedNawar/Desktop/appointment/appointment/ApplicationModules/MainWeatherView/Interactor/AppointmentInteractor.swift /Users/MohamedNawar/Desktop/appointment/appointment/Resources/NetworkRequest.swift /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/ObjectiveC.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/CoreImage.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/QuartzCore.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Accelerate.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Dispatch.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Metal.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Darwin.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Foundation.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/CoreFoundation.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/CoreGraphics.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/os.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Swift.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/UIKit.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/SwiftOnoneSupport.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/Combine.framework/Modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/ObjectiveC.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreImage.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/QuartzCore.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Accelerate.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Dispatch.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Metal.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Darwin.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Foundation.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreFoundation.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreGraphics.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/os.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Swift.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/UIKit.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64.swiftmodule /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/PKHUD/PKHUD.framework/Modules/PKHUD.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/Alamofire/Alamofire.framework/Modules/Alamofire.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/Kingfisher/Kingfisher.framework/Modules/Kingfisher.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/PKHUD/PKHUD.framework/Headers/PKHUD.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/PKHUD/PKHUD.framework/Headers/PKHUD-umbrella.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/Alamofire/Alamofire.framework/Headers/Alamofire-umbrella.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/FSCalendar/FSCalendar.framework/Headers/FSCalendar-umbrella.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/Kingfisher/Kingfisher.framework/Headers/Kingfisher-umbrella.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/FSCalendar/FSCalendar.framework/Headers/FSCalendarAppearance.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/FSCalendar/FSCalendar.framework/Headers/FSCalendarCell.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/FSCalendar/FSCalendar.framework/Headers/FSCalendar.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/FSCalendar/FSCalendar.framework/Headers/FSCalendarDynamicHeader.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/FSCalendar/FSCalendar.framework/Headers/FSCalendarStickyHeader.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/Kingfisher/Kingfisher.framework/Headers/Kingfisher.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/FSCalendar/FSCalendar.framework/Headers/FSCalendarCalculator.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/FSCalendar/FSCalendar.framework/Headers/FSCalendarTransitionCoordinator.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/FSCalendar/FSCalendar.framework/Headers/FSCalendarExtensions.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/FSCalendar/FSCalendar.framework/Headers/FSCalendarConstants.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/PKHUD/PKHUD.framework/Headers/PKHUD-Swift.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/Alamofire/Alamofire.framework/Headers/Alamofire-Swift.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/Kingfisher/Kingfisher.framework/Headers/Kingfisher-Swift.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/FSCalendar/FSCalendar.framework/Headers/FSCalendarCollectionViewLayout.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/FSCalendar/FSCalendar.framework/Headers/FSCalendarSeparatorDecorationView.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/FSCalendar/FSCalendar.framework/Headers/FSCalendarCollectionView.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/FSCalendar/FSCalendar.framework/Headers/FSCalendarHeaderView.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/FSCalendar/FSCalendar.framework/Headers/FSCalendarWeekdayView.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/FSCalendar/FSCalendar.framework/Headers/FSCalendarDelegationFactory.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/FSCalendar/FSCalendar.framework/Headers/FSCalendarDelegationProxy.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/PKHUD/PKHUD.framework/Modules/module.modulemap /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/Alamofire/Alamofire.framework/Modules/module.modulemap /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/FSCalendar/FSCalendar.framework/Modules/module.modulemap /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/Kingfisher/Kingfisher.framework/Modules/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/Accelerate.framework/Headers/Accelerate.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/os.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/MohamedNawar/Desktop/appointment/build/appointment.build/Debug-iphonesimulator/appointment.build/Objects-normal/x86_64/SceneDelegate~partial.swiftmodule : /Users/MohamedNawar/Desktop/appointment/appointment/ApplicationModules/MainWeatherView/View/AppointmentVC.swift /Users/MohamedNawar/Desktop/appointment/appointment/Extensions/AppStoryboard.swift /Users/MohamedNawar/Desktop/appointment/appointment/Resources/SceneDelegate.swift /Users/MohamedNawar/Desktop/appointment/appointment/Resources/AppDelegate.swift /Users/MohamedNawar/Desktop/appointment/appointment/ApplicationModules/MainWeatherView/View/Cells/employeeDataCell.swift /Users/MohamedNawar/Desktop/appointment/appointment/ApplicationModules/MainWeatherView/View/Cells/DetailsCell.swift /Users/MohamedNawar/Desktop/appointment/appointment/ApplicationModules/MainWeatherView/View/Cells/employeeTableViewCell.swift /Users/MohamedNawar/Desktop/appointment/appointment/Extensions/ViewExtension.swift /Users/MohamedNawar/Desktop/appointment/appointment/Extensions/UITableViewExtension.swift /Users/MohamedNawar/Desktop/appointment/appointment/Extensions/ErrorHandler.swift /Users/MohamedNawar/Desktop/appointment/appointment/ApplicationModules/MainWeatherView/Interactor/AppointmentInteractor.swift /Users/MohamedNawar/Desktop/appointment/appointment/Resources/NetworkRequest.swift /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/ObjectiveC.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/CoreImage.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/QuartzCore.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Accelerate.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Dispatch.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Metal.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Darwin.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Foundation.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/CoreFoundation.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/CoreGraphics.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/os.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Swift.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/UIKit.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/SwiftOnoneSupport.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/Combine.framework/Modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/ObjectiveC.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreImage.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/QuartzCore.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Accelerate.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Dispatch.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Metal.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Darwin.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Foundation.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreFoundation.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreGraphics.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/os.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Swift.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/UIKit.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64.swiftmodule /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/PKHUD/PKHUD.framework/Modules/PKHUD.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/Alamofire/Alamofire.framework/Modules/Alamofire.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/Kingfisher/Kingfisher.framework/Modules/Kingfisher.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/PKHUD/PKHUD.framework/Headers/PKHUD.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/PKHUD/PKHUD.framework/Headers/PKHUD-umbrella.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/Alamofire/Alamofire.framework/Headers/Alamofire-umbrella.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/FSCalendar/FSCalendar.framework/Headers/FSCalendar-umbrella.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/Kingfisher/Kingfisher.framework/Headers/Kingfisher-umbrella.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/FSCalendar/FSCalendar.framework/Headers/FSCalendarAppearance.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/FSCalendar/FSCalendar.framework/Headers/FSCalendarCell.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/FSCalendar/FSCalendar.framework/Headers/FSCalendar.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/FSCalendar/FSCalendar.framework/Headers/FSCalendarDynamicHeader.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/FSCalendar/FSCalendar.framework/Headers/FSCalendarStickyHeader.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/Kingfisher/Kingfisher.framework/Headers/Kingfisher.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/FSCalendar/FSCalendar.framework/Headers/FSCalendarCalculator.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/FSCalendar/FSCalendar.framework/Headers/FSCalendarTransitionCoordinator.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/FSCalendar/FSCalendar.framework/Headers/FSCalendarExtensions.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/FSCalendar/FSCalendar.framework/Headers/FSCalendarConstants.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/PKHUD/PKHUD.framework/Headers/PKHUD-Swift.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/Alamofire/Alamofire.framework/Headers/Alamofire-Swift.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/Kingfisher/Kingfisher.framework/Headers/Kingfisher-Swift.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/FSCalendar/FSCalendar.framework/Headers/FSCalendarCollectionViewLayout.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/FSCalendar/FSCalendar.framework/Headers/FSCalendarSeparatorDecorationView.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/FSCalendar/FSCalendar.framework/Headers/FSCalendarCollectionView.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/FSCalendar/FSCalendar.framework/Headers/FSCalendarHeaderView.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/FSCalendar/FSCalendar.framework/Headers/FSCalendarWeekdayView.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/FSCalendar/FSCalendar.framework/Headers/FSCalendarDelegationFactory.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/FSCalendar/FSCalendar.framework/Headers/FSCalendarDelegationProxy.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/PKHUD/PKHUD.framework/Modules/module.modulemap /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/Alamofire/Alamofire.framework/Modules/module.modulemap /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/FSCalendar/FSCalendar.framework/Modules/module.modulemap /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/Kingfisher/Kingfisher.framework/Modules/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/Accelerate.framework/Headers/Accelerate.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/os.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/MohamedNawar/Desktop/appointment/build/appointment.build/Debug-iphonesimulator/appointment.build/Objects-normal/x86_64/SceneDelegate~partial.swiftdoc : /Users/MohamedNawar/Desktop/appointment/appointment/ApplicationModules/MainWeatherView/View/AppointmentVC.swift /Users/MohamedNawar/Desktop/appointment/appointment/Extensions/AppStoryboard.swift /Users/MohamedNawar/Desktop/appointment/appointment/Resources/SceneDelegate.swift /Users/MohamedNawar/Desktop/appointment/appointment/Resources/AppDelegate.swift /Users/MohamedNawar/Desktop/appointment/appointment/ApplicationModules/MainWeatherView/View/Cells/employeeDataCell.swift /Users/MohamedNawar/Desktop/appointment/appointment/ApplicationModules/MainWeatherView/View/Cells/DetailsCell.swift /Users/MohamedNawar/Desktop/appointment/appointment/ApplicationModules/MainWeatherView/View/Cells/employeeTableViewCell.swift /Users/MohamedNawar/Desktop/appointment/appointment/Extensions/ViewExtension.swift /Users/MohamedNawar/Desktop/appointment/appointment/Extensions/UITableViewExtension.swift /Users/MohamedNawar/Desktop/appointment/appointment/Extensions/ErrorHandler.swift /Users/MohamedNawar/Desktop/appointment/appointment/ApplicationModules/MainWeatherView/Interactor/AppointmentInteractor.swift /Users/MohamedNawar/Desktop/appointment/appointment/Resources/NetworkRequest.swift /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/ObjectiveC.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/CoreImage.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/QuartzCore.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Accelerate.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Dispatch.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Metal.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Darwin.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Foundation.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/CoreFoundation.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/CoreGraphics.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/os.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/Swift.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/UIKit.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/lib/swift/SwiftOnoneSupport.swiftmodule/x86_64.swiftinterface /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/Combine.framework/Modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftinterface /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/ObjectiveC.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreImage.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/QuartzCore.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Accelerate.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Dispatch.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Metal.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Darwin.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Foundation.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreFoundation.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreGraphics.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/os.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Swift.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/UIKit.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64.swiftmodule /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/PKHUD/PKHUD.framework/Modules/PKHUD.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/Alamofire/Alamofire.framework/Modules/Alamofire.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/Kingfisher/Kingfisher.framework/Modules/Kingfisher.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/PKHUD/PKHUD.framework/Headers/PKHUD.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/PKHUD/PKHUD.framework/Headers/PKHUD-umbrella.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/Alamofire/Alamofire.framework/Headers/Alamofire-umbrella.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/FSCalendar/FSCalendar.framework/Headers/FSCalendar-umbrella.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/Kingfisher/Kingfisher.framework/Headers/Kingfisher-umbrella.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/FSCalendar/FSCalendar.framework/Headers/FSCalendarAppearance.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/FSCalendar/FSCalendar.framework/Headers/FSCalendarCell.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/FSCalendar/FSCalendar.framework/Headers/FSCalendar.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/FSCalendar/FSCalendar.framework/Headers/FSCalendarDynamicHeader.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/FSCalendar/FSCalendar.framework/Headers/FSCalendarStickyHeader.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/Kingfisher/Kingfisher.framework/Headers/Kingfisher.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/FSCalendar/FSCalendar.framework/Headers/FSCalendarCalculator.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/FSCalendar/FSCalendar.framework/Headers/FSCalendarTransitionCoordinator.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/FSCalendar/FSCalendar.framework/Headers/FSCalendarExtensions.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/FSCalendar/FSCalendar.framework/Headers/FSCalendarConstants.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/PKHUD/PKHUD.framework/Headers/PKHUD-Swift.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/Alamofire/Alamofire.framework/Headers/Alamofire-Swift.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/Kingfisher/Kingfisher.framework/Headers/Kingfisher-Swift.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/FSCalendar/FSCalendar.framework/Headers/FSCalendarCollectionViewLayout.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/FSCalendar/FSCalendar.framework/Headers/FSCalendarSeparatorDecorationView.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/FSCalendar/FSCalendar.framework/Headers/FSCalendarCollectionView.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/FSCalendar/FSCalendar.framework/Headers/FSCalendarHeaderView.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/FSCalendar/FSCalendar.framework/Headers/FSCalendarWeekdayView.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/FSCalendar/FSCalendar.framework/Headers/FSCalendarDelegationFactory.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/FSCalendar/FSCalendar.framework/Headers/FSCalendarDelegationProxy.h /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/PKHUD/PKHUD.framework/Modules/module.modulemap /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/Alamofire/Alamofire.framework/Modules/module.modulemap /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/FSCalendar/FSCalendar.framework/Modules/module.modulemap /Users/MohamedNawar/Desktop/appointment/build/Debug-iphonesimulator/Kingfisher/Kingfisher.framework/Modules/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/Accelerate.framework/Headers/Accelerate.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/os.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
| D |
any of numerous small green nonvascular plants of the class Hepaticopsida growing in wet places and resembling green seaweeds or leafy mosses
| D |
/*
* Collie - An asynchronous event-driven network framework using Dlang development
*
* Copyright (C) 2015-2017 Shanghai Putao Technology Co., Ltd
*
* Developer: putao's Dlang team
*
* Licensed under the Apache-2.0 License.
*
*/
module collie.codec.http.headers.httpcommonheaders;
import collie.utils.string;
enum HTTPHeaderCode : ubyte {
// code reserved to indicate the absence of an HTTP header
NONE = 0,
// code for any HTTP header name not in the list of common headers
OTHER = 1,
ACCEPT = 2,
ACCEPT_CHARSET = 3,
ACCEPT_DATETIME = 4,
ACCEPT_ENCODING = 5,
ACCEPT_LANGUAGE = 6,
ACCEPT_RANGES = 7,
ACCESS_CONTROL_ALLOW_CREDENTIALS = 8,
ACCESS_CONTROL_ALLOW_HEADERS = 9,
ACCESS_CONTROL_ALLOW_METHODS = 10,
ACCESS_CONTROL_ALLOW_ORIGIN = 11,
ACCESS_CONTROL_EXPOSE_HEADERS = 12,
ACCESS_CONTROL_MAX_AGE = 13,
ACCESS_CONTROL_REQUEST_HEADERS = 14,
ACCESS_CONTROL_REQUEST_METHOD = 15,
AGE = 16,
ALLOW = 17,
ALT_SVC = 18,
AUTHORIZATION = 19,
CACHE_CONTROL = 20,
CONNECTION = 21,
CONTENT_DISPOSITION = 22,
CONTENT_ENCODING = 23,
CONTENT_LANGUAGE = 24,
CONTENT_LENGTH = 25,
CONTENT_LOCATION = 26,
CONTENT_MD5 = 27,
CONTENT_RANGE = 28,
CONTENT_TYPE = 29,
COOKIE = 30,
DNT = 31,
DATE = 32,
ETAG = 33,
EXPECT = 34,
EXPIRES = 35,
FROM = 36,
FRONT_END_HTTPS = 37,
HOST = 38,
IF_MATCH = 39,
IF_MODIFIED_SINCE = 40,
IF_NONE_MATCH = 41,
IF_RANGE = 42,
IF_UNMODIFIED_SINCE = 43,
KEEP_ALIVE = 44,
LAST_MODIFIED = 45,
LINK = 46,
LOCATION = 47,
MAX_FORWARDS = 48,
ORIGIN = 49,
P3P = 50,
PRAGMA = 51,
PROXY_AUTHENTICATE = 52,
PROXY_AUTHORIZATION = 53,
PROXY_CONNECTION = 54,
RANGE = 55,
REFERER = 56,
REFRESH = 57,
RETRY_AFTER = 58,
SERVER = 59,
SET_COOKIE = 60,
STRICT_TRANSPORT_SECURITY = 61,
TE = 62,
TIMESTAMP = 63,
TRAILER = 64,
TRANSFER_ENCODING = 65,
UPGRADE = 66,
USER_AGENT = 67,
VIP = 68,
VARY = 69,
VIA = 70,
WWW_AUTHENTICATE = 71,
WARNING = 72,
X_ACCEL_REDIRECT = 73,
X_CONTENT_SECURITY_POLICY_REPORT_ONLY = 74,
X_CONTENT_TYPE_OPTIONS = 75,
X_FORWARDED_FOR = 76,
X_FORWARDED_PROTO = 77,
X_FRAME_OPTIONS = 78,
X_POWERED_BY = 79,
X_REAL_IP = 80,
X_REQUESTED_WITH = 81,
X_UA_COMPATIBLE = 82,
X_WAP_PROFILE = 83,
X_XSS_PROTECTION = 84,
SEC_WEBSOCKET_KEY = 85,
SEC_WEBSOCKET_VERSION = 86,
SEC_WEBSOCKET_LOCATION = 87,
SEC_WEBSOCKET_ACCEPT = 88
}
mixin(buildEnum!HTTPHeaderCode());
string capitalizeHeader(string name)
{
import std.uni;
import std.array;
import std.string;
string[] parts = name.split("_");
for (int i = 0; i < parts.length; i++)
{
parts[i] = parts[i].capitalize;
}
return join(parts, "-");
}
private:
string buildEnum(T)()
{
import std.uni;
import std.array;
import std.conv;
struct TMPV{
string name;
string value;
}
TMPV[][] list;
list.length = ubyte.max;
string codename = "enum string[] HTTPHeaderCodeName = [";
foreach(m; __traits(derivedMembers,T))
{
string str = capitalizeHeader(m);
str = str.replace("_","-");
codename ~= "\"" ~ str ~ "\",";
list[str.length] ~= TMPV(str,m);
}
codename = codename[0..codename.length - 1];
codename ~= "];\n ";
string funn = "HTTPHeaderCode headersHash(string name){\n HTTPHeaderCode code = HTTPHeaderCode.OTHER; \n switch (name.length) {\n";
foreach(size_t index,TMPV[] ls; list)
{
if(ls.length > 0) {
funn ~= "case " ~ to!string(index) ~ " : {\n";
foreach(ref TMPV st;ls)
{
funn ~= "if(isSameIngnoreLowUp(name,\"" ~ st.name ~ "\" )){ code = HTTPHeaderCode."~ st.value ~ "; break;}\n";
}
funn ~= "\n} break;\n";
}
}
funn ~= "default: break;}\n return code;}\n";
return codename ~ funn;
}
unittest
{
assert(headersHash("age") == HTTPHeaderCode.AGE);
assert(headersHash("Age") == HTTPHeaderCode.AGE);
assert(headersHash("MY-HEADER") == HTTPHeaderCode.OTHER);
assert(headersHash("DNT") == HTTPHeaderCode.DNT);
} | D |
module libpng.png;
public import libpng.types;
public import libpng.png_manual_wrap;
public import libpng.generated.png_nsj;
// Do not import libpng.png_wrap_utils.d: it is not intended to be called externally.
| D |
import std.stdio;
import std.process;
void main()
{
writeln("Hello from D!");
stdout.flush();
auto pid = spawnProcess("./pascal.exe");
wait(pid);
writeln("Goodbye from D!");
}
| D |
/Users/zecheng/iosDevelop/secondHand/DerivedData/secondHand/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SnapKit.build/Objects-normal/x86_64/Constraint.o : /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintLayoutGuideDSL.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintDSL.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintLayoutSupportDSL.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintViewDSL.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintLayoutGuide.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintMakerExtendable.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintMakerRelatable.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintMakerEditable.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintMakerFinalizable.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintMakerPriortizable.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintConfig.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/Debugging.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintItem.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/LayoutConstraintItem.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintRelation.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintDescription.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintMaker.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/Typealiases.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintAttributes.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintLayoutGuide+Extensions.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/UILayoutSupport+Extensions.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintView+Extensions.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintInsets.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintRelatableTarget.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintMultiplierTarget.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintOffsetTarget.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintInsetTarget.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintConstantTarget.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintPriorityTarget.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/Constraint.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/LayoutConstraint.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintLayoutSupport.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintView.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintPriority.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/zecheng/iosDevelop/secondHand/Pods/Target\ Support\ Files/SnapKit/SnapKit-umbrella.h /Users/zecheng/iosDevelop/secondHand/DerivedData/secondHand/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SnapKit.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes
/Users/zecheng/iosDevelop/secondHand/DerivedData/secondHand/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SnapKit.build/Objects-normal/x86_64/Constraint~partial.swiftmodule : /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintLayoutGuideDSL.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintDSL.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintLayoutSupportDSL.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintViewDSL.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintLayoutGuide.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintMakerExtendable.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintMakerRelatable.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintMakerEditable.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintMakerFinalizable.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintMakerPriortizable.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintConfig.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/Debugging.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintItem.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/LayoutConstraintItem.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintRelation.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintDescription.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintMaker.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/Typealiases.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintAttributes.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintLayoutGuide+Extensions.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/UILayoutSupport+Extensions.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintView+Extensions.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintInsets.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintRelatableTarget.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintMultiplierTarget.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintOffsetTarget.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintInsetTarget.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintConstantTarget.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintPriorityTarget.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/Constraint.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/LayoutConstraint.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintLayoutSupport.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintView.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintPriority.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/zecheng/iosDevelop/secondHand/Pods/Target\ Support\ Files/SnapKit/SnapKit-umbrella.h /Users/zecheng/iosDevelop/secondHand/DerivedData/secondHand/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SnapKit.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes
/Users/zecheng/iosDevelop/secondHand/DerivedData/secondHand/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SnapKit.build/Objects-normal/x86_64/Constraint~partial.swiftdoc : /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintLayoutGuideDSL.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintDSL.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintLayoutSupportDSL.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintViewDSL.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintLayoutGuide.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintMakerExtendable.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintMakerRelatable.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintMakerEditable.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintMakerFinalizable.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintMakerPriortizable.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintConfig.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/Debugging.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintItem.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/LayoutConstraintItem.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintRelation.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintDescription.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintMaker.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/Typealiases.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintAttributes.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintLayoutGuide+Extensions.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/UILayoutSupport+Extensions.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintView+Extensions.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintInsets.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintRelatableTarget.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintMultiplierTarget.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintOffsetTarget.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintInsetTarget.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintConstantTarget.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintPriorityTarget.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/Constraint.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/LayoutConstraint.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintLayoutSupport.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintView.swift /Users/zecheng/iosDevelop/secondHand/Pods/SnapKit/Source/ConstraintPriority.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/zecheng/iosDevelop/secondHand/Pods/Target\ Support\ Files/SnapKit/SnapKit-umbrella.h /Users/zecheng/iosDevelop/secondHand/DerivedData/secondHand/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SnapKit.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes
| D |
module voxelman.remotecontrol.plugininfo;
enum id = "voxelman.remotecontrol";
enum semver = "0.5.0";
enum deps = [];
enum clientdeps = [];
enum serverdeps = [];
| D |
rich and superior in quality
having the rank of or befitting a prince
| D |
/**
* Support for 64-bit longs.
*
* Copyright: Copyright Digital Mars 2000 - 2012.
* License: Distributed under the
* $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0).
* (See accompanying file LICENSE)
* Authors: Walter Bright, Sean Kelly
* Source: $(DRUNTIMESRC rt/_llmath.d)
*/
module rt.llmath;
version (LDC) {} else:
extern (C):
/***************************************
* Unsigned long divide.
* Input:
* [EDX,EAX],[ECX,EBX]
* Output:
* [EDX,EAX] = [EDX,EAX] / [ECX,EBX]
* [ECX,EBX] = [EDX,EAX] % [ECX,EBX]
*/
void __ULDIV2__()
{
version (D_InlineAsm_X86)
{
asm
{
naked ;
mov EBX,4[ESP] ; // the only difference between this and __ULDIV__
test ECX,ECX ;
jz uldiv ;
// if ECX > EDX, then quotient is 0 and remainder is [EDX,EAX]
cmp ECX,EDX ;
ja quo0 ;
test ECX,ECX ;
js Lleft ;
/* We have n>d, and know that n/d will fit in 32 bits.
* d will be left justified if we shift it left s bits.
* [d1,d0] <<= s
* [n2,n1,n0] = [n1,n0] << s
*
* Use one divide, by this reasoning:
* ([n2,n1]<<32 + n0)/(d1<<32 + d0)
* becomes:
* ([n2,n1]<<32)/(d1<<32 + d0) + n0/(d1<<32 + d0)
* The second divide is always 0.
* Ignore the d0 in the first divide, which will yield a quotient
* that might be too high by 1 (because d1 is left justified).
* We can tell if it's too big if:
* q*[d1,d0] > [n2,n1,n0]
* which is:
* q*[d1,d0] > [[q*[d1,0]+q%[d1,0],n1,n0]
* If we subtract q*[d1,0] from both sides, we get:
* q*d0 > [[n2,n1]%d1,n0]
* So if it is too big by one, reduce q by one to q'=q-one.
* Compute remainder as:
* r = ([n1,n0] - q'*[d1,d0]) >> s
* Again, we can subtract q*[d1,0]:
* r = ([n1,n0] - q*[d1,0] - (q'*[d1,d0] - q*[d1,0])) >> s
* r = ([[n2,n1]%d1,n0] + (q*[d1,0] - (q - one)*[d1,d0])) >> s
* r = ([[n2,n1]%d1,n0] + (q*[d1,0] - [d1 *(q-one),d0*(1-q)])) >> s
* r = ([[n2,n1]%d1,n0] + [d1 *one,d0*(one-q)])) >> s
*/
push EBP ;
push ESI ;
push EDI ;
mov ESI,EDX ;
mov EDI,EAX ;
mov EBP,ECX ;
bsr EAX,ECX ; // EAX is now 30..0
xor EAX,0x1F ; // EAX is now 1..31
mov CH,AL ;
neg EAX ;
add EAX,32 ;
mov CL,AL ;
mov EAX,EBX ;
shr EAX,CL ;
xchg CH,CL ;
shl EBP,CL ;
or EBP,EAX ;
shl EBX,CL ;
mov EDX,ESI ;
xchg CH,CL ;
shr EDX,CL ;
mov EAX,EDI ;
shr EAX,CL ;
xchg CH,CL ;
shl EDI,CL ;
shl ESI,CL ;
or EAX,ESI ;
div EBP ;
push EBP ;
mov EBP,EAX ;
mov ESI,EDX ;
mul EBX ;
cmp EDX,ESI ;
ja L1 ;
jb L2 ;
cmp EAX,EDI ;
jbe L2 ;
L1: dec EBP ;
sub EAX,EBX ;
sbb EDX,0[ESP] ;
L2:
add ESP,4 ;
sub EDI,EAX ;
sbb ESI,EDX ;
mov EAX,ESI ;
xchg CH,CL ;
shl EAX,CL ;
xchg CH,CL ;
shr EDI,CL ;
or EDI,EAX ;
shr ESI,CL ;
mov EBX,EDI ;
mov ECX,ESI ;
mov EAX,EBP ;
xor EDX,EDX ;
pop EDI ;
pop ESI ;
pop EBP ;
ret ;
uldiv: test EDX,EDX ;
jnz D3 ;
// Both high words are 0, we can use the DIV instruction
div EBX ;
mov EBX,EDX ;
mov EDX,ECX ; // EDX = ECX = 0
ret ;
even ;
D3: // Divide [EDX,EAX] by EBX
mov ECX,EAX ;
mov EAX,EDX ;
xor EDX,EDX ;
div EBX ;
xchg ECX,EAX ;
div EBX ;
// ECX,EAX = result
// EDX = remainder
mov EBX,EDX ;
mov EDX,ECX ;
xor ECX,ECX ;
ret ;
quo0: // Quotient is 0
// Remainder is [EDX,EAX]
mov EBX,EAX ;
mov ECX,EDX ;
xor EAX,EAX ;
xor EDX,EDX ;
ret ;
Lleft: // The quotient is 0 or 1 and EDX >= ECX
cmp EDX,ECX ;
ja quo1 ; // [EDX,EAX] > [ECX,EBX]
// EDX == ECX
cmp EAX,EBX ;
jb quo0 ;
quo1: // Quotient is 1
// Remainder is [EDX,EAX] - [ECX,EBX]
sub EAX,EBX ;
sbb EDX,ECX ;
mov EBX,EAX ;
mov ECX,EDX ;
mov EAX,1 ;
xor EDX,EDX ;
ret ;
}
}
else version (D_InlineAsm_X86_64)
assert(0);
else
static assert(0);
}
void __ULDIV__()
{
version (D_InlineAsm_X86)
{
asm
{
naked ;
test ECX,ECX ;
jz uldiv ;
// if ECX > EDX, then quotient is 0 and remainder is [EDX,EAX]
cmp ECX,EDX ;
ja quo0 ;
test ECX,ECX ;
js Lleft ;
/* We have n>d, and know that n/d will fit in 32 bits.
* d will be left justified if we shift it left s bits.
* [d1,d0] <<= s
* [n2,n1,n0] = [n1,n0] << s
*
* Use one divide, by this reasoning:
* ([n2,n1]<<32 + n0)/(d1<<32 + d0)
* becomes:
* ([n2,n1]<<32)/(d1<<32 + d0) + n0/(d1<<32 + d0)
* The second divide is always 0.
* Ignore the d0 in the first divide, which will yield a quotient
* that might be too high by 1 (because d1 is left justified).
* We can tell if it's too big if:
* q*[d1,d0] > [n2,n1,n0]
* which is:
* q*[d1,d0] > [[q*[d1,0]+q%[d1,0],n1,n0]
* If we subtract q*[d1,0] from both sides, we get:
* q*d0 > [[n2,n1]%d1,n0]
* So if it is too big by one, reduce q by one to q'=q-one.
* Compute remainder as:
* r = ([n1,n0] - q'*[d1,d0]) >> s
* Again, we can subtract q*[d1,0]:
* r = ([n1,n0] - q*[d1,0] - (q'*[d1,d0] - q*[d1,0])) >> s
* r = ([[n2,n1]%d1,n0] + (q*[d1,0] - (q - one)*[d1,d0])) >> s
* r = ([[n2,n1]%d1,n0] + (q*[d1,0] - [d1 *(q-one),d0*(1-q)])) >> s
* r = ([[n2,n1]%d1,n0] + [d1 *one,d0*(one-q)])) >> s
*/
push EBP ;
push ESI ;
push EDI ;
mov ESI,EDX ;
mov EDI,EAX ;
mov EBP,ECX ;
bsr EAX,ECX ; // EAX is now 30..0
xor EAX,0x1F ; // EAX is now 1..31
mov CH,AL ;
neg EAX ;
add EAX,32 ;
mov CL,AL ;
mov EAX,EBX ;
shr EAX,CL ;
xchg CH,CL ;
shl EBP,CL ;
or EBP,EAX ;
shl EBX,CL ;
mov EDX,ESI ;
xchg CH,CL ;
shr EDX,CL ;
mov EAX,EDI ;
shr EAX,CL ;
xchg CH,CL ;
shl EDI,CL ;
shl ESI,CL ;
or EAX,ESI ;
div EBP ;
push EBP ;
mov EBP,EAX ;
mov ESI,EDX ;
mul EBX ;
cmp EDX,ESI ;
ja L1 ;
jb L2 ;
cmp EAX,EDI ;
jbe L2 ;
L1: dec EBP ;
sub EAX,EBX ;
sbb EDX,0[ESP] ;
L2:
add ESP,4 ;
sub EDI,EAX ;
sbb ESI,EDX ;
mov EAX,ESI ;
xchg CH,CL ;
shl EAX,CL ;
xchg CH,CL ;
shr EDI,CL ;
or EDI,EAX ;
shr ESI,CL ;
mov EBX,EDI ;
mov ECX,ESI ;
mov EAX,EBP ;
xor EDX,EDX ;
pop EDI ;
pop ESI ;
pop EBP ;
ret ;
uldiv: test EDX,EDX ;
jnz D3 ;
// Both high words are 0, we can use the DIV instruction
div EBX ;
mov EBX,EDX ;
mov EDX,ECX ; // EDX = ECX = 0
ret ;
even ;
D3: // Divide [EDX,EAX] by EBX
mov ECX,EAX ;
mov EAX,EDX ;
xor EDX,EDX ;
div EBX ;
xchg ECX,EAX ;
div EBX ;
// ECX,EAX = result
// EDX = remainder
mov EBX,EDX ;
mov EDX,ECX ;
xor ECX,ECX ;
ret ;
quo0: // Quotient is 0
// Remainder is [EDX,EAX]
mov EBX,EAX ;
mov ECX,EDX ;
xor EAX,EAX ;
xor EDX,EDX ;
ret ;
Lleft: // The quotient is 0 or 1 and EDX >= ECX
cmp EDX,ECX ;
ja quo1 ; // [EDX,EAX] > [ECX,EBX]
// EDX == ECX
cmp EAX,EBX ;
jb quo0 ;
quo1: // Quotient is 1
// Remainder is [EDX,EAX] - [ECX,EBX]
sub EAX,EBX ;
sbb EDX,ECX ;
mov EBX,EAX ;
mov ECX,EDX ;
mov EAX,1 ;
xor EDX,EDX ;
ret ;
}
}
else version (D_InlineAsm_X86_64)
assert(0);
else
static assert(0);
}
/***************************************
* Signed long divide.
* Input:
* [EDX,EAX],[ECX,EBX]
* Output:
* [EDX,EAX] = [EDX,EAX] / [ECX,EBX]
* [ECX,EBX] = [EDX,EAX] % [ECX,EBX]
* ESI,EDI destroyed
*/
void __LDIV2__()
{
version (D_InlineAsm_X86)
{
asm
{
naked ;
test EDX,EDX ; // [EDX,EAX] negative?
jns L10 ; // no
//neg64 EDX,EAX ; // [EDX,EAX] = -[EDX,EAX]
neg EDX ;
neg EAX ;
sbb EDX,0 ;
test ECX,ECX ; // [ECX,EBX] negative?
jns L11 ; // no
//neg64 ECX,EBX ;
neg ECX ;
neg dword ptr 4[ESP] ;
sbb ECX,0 ;
push dword ptr 4[ESP] ;
call __ULDIV2__ ;
add ESP,4 ;
//neg64 ECX,EBX ; // remainder same sign as dividend
neg ECX ;
neg EBX ;
sbb ECX,0 ;
ret ;
L11:
push dword ptr 4[ESP] ;
call __ULDIV2__ ;
add ESP,4 ;
//neg64 ECX,EBX ; // remainder same sign as dividend
neg ECX ;
neg EBX ;
sbb ECX,0 ;
//neg64 EDX,EAX ; // quotient is negative
neg EDX ;
neg EAX ;
sbb EDX,0 ;
ret ;
L10: test ECX,ECX ; // [ECX,EBX] negative?
jns L12 ; // no (all is positive)
//neg64 ECX,EBX ;
neg ECX ;
neg dword ptr 4[ESP] ;
sbb ECX,0 ;
push dword ptr 4[ESP] ;
call __ULDIV2__ ;
add ESP,4 ;
//neg64 EDX,EAX ; // quotient is negative
neg EDX ;
neg EAX ;
sbb EDX,0 ;
ret ;
L12: jmp __ULDIV2__ ;
}
}
else version (D_InlineAsm_X86_64)
assert(0);
else
static assert(0);
}
void __LDIV__()
{
version (D_InlineAsm_X86)
{
asm
{
naked ;
test EDX,EDX ; // [EDX,EAX] negative?
jns L10 ; // no
//neg64 EDX,EAX ; // [EDX,EAX] = -[EDX,EAX]
neg EDX ;
neg EAX ;
sbb EDX,0 ;
test ECX,ECX ; // [ECX,EBX] negative?
jns L11 ; // no
//neg64 ECX,EBX ;
neg ECX ;
neg EBX ;
sbb ECX,0 ;
call __ULDIV__ ;
//neg64 ECX,EBX ; // remainder same sign as dividend
neg ECX ;
neg EBX ;
sbb ECX,0 ;
ret ;
L11: call __ULDIV__ ;
//neg64 ECX,EBX ; // remainder same sign as dividend
neg ECX ;
neg EBX ;
sbb ECX,0 ;
//neg64 EDX,EAX ; // quotient is negative
neg EDX ;
neg EAX ;
sbb EDX,0 ;
ret ;
L10: test ECX,ECX ; // [ECX,EBX] negative?
jns L12 ; // no (all is positive)
//neg64 ECX,EBX ;
neg ECX ;
neg EBX ;
sbb ECX,0 ;
call __ULDIV__ ;
//neg64 EDX,EAX ; // quotient is negative
neg EDX ;
neg EAX ;
sbb EDX,0 ;
ret ;
L12: jmp __ULDIV__ ;
}
}
else version (D_InlineAsm_X86_64)
assert(0);
else
static assert(0);
}
version (Win32) version (CRuntime_Microsoft)
{
extern(C) void _alldiv();
extern(C) void _aulldiv();
extern(C) void _allrem();
extern(C) void _aullrem();
void _ms_alldiv()
{
asm
{
naked ;
push ECX ;
push EBX ;
push EDX ;
push EAX ;
call _alldiv ;
ret ;
}
}
void _ms_aulldiv()
{
asm
{
naked ;
push ECX ;
push EBX ;
push EDX ;
push EAX ;
call _aulldiv ;
ret ;
}
}
void _ms_allrem()
{
asm
{
naked ;
push ECX ;
push EBX ;
push EDX ;
push EAX ;
call _allrem ;
mov EBX,EAX ;
mov ECX,EDX ;
ret ;
}
}
void _ms_aullrem()
{
asm
{
naked ;
push ECX ;
push EBX ;
push EDX ;
push EAX ;
call _aullrem ;
mov EBX,EAX ;
mov ECX,EDX ;
ret ;
}
}
}
| D |
/*******************************************************************************
Provide a web-based administrative interface to the node
To ease administration and configuration, users can interact with the node
using a web interface. This interface is served by Vibe.d,
usually on a port adjacent to the node port (2827 by default).
Copyright:
Copyright (c) 2019-2021 BOSAGORA Foundation
All rights reserved.
License:
MIT License. See LICENSE for details.
*******************************************************************************/
module agora.node.admin.AdminInterface;
import agora.api.Admin;
import agora.common.Types;
import agora.consensus.data.PreImageInfo;
import agora.consensus.EnrollmentManager;
import agora.crypto.Hash;
import agora.crypto.Key;
import agora.crypto.Schnorr;
import agora.utils.Log;
import agora.network.Clock;
import vibe.core.core;
import vibe.data.json;
import vibe.http.router;
import vibe.http.server;
import barcode;
import std.datetime : SysTime, unixTimeToStdTime, UTC;
import std.format;
import std.meta;
import std.traits;
import std.typecons;
import core.time : days;
/*******************************************************************************
Class for Admin interface
If admin is enabled this interface listens by AdminConfig's address
of config
Contains services that include authentication QR.
This interface must be in a path accessible only to the owner of the node.
This will added by node management and monitoring interfaces.
API:
GET /loginQR : Respond with QR code containing login information.
GET /encryptionKeyQR : Respond with QR code containing EncryptionKey.
*******************************************************************************/
public class AdminInterface : NodeControlAPI
{
/// Logger instance
protected Logger log;
/// The keypair of this node
private const KeyPair key_pair;
/// Clock instance
private Clock clock;
/// Enrollment manager
private EnrollmentManager enroll_man;
/***************************************************************************
Constructor
Params:
key_pair = the keypair of this node
clock = clock instance
enroll_man = the enrollmentManager
***************************************************************************/
public this (const KeyPair key_pair, Clock clock, EnrollmentManager enroll_man)
{
this.log = Logger(__MODULE__);
this.key_pair = key_pair;
this.clock = clock;
this.enroll_man = enroll_man;
}
///
public override void postLogger (string name, bool propagate,
Nullable!(LogLevel) level, Nullable!bool additive,
Nullable!bool console, Nullable!string file) @trusted
{
LoggerConfig config;
config.name = name == "root" ? null : name;
if (!additive.isNull())
config.additive = additive.get();
if (!level.isNull())
config.level = level.get();
if (!console.isNull())
config.console = console.get();
if (!file.isNull())
config.file = file.get();
// No buffer_size
// If either parameter was provided, clear the list of appender
// It would be better if we had a way to remove a specific appender,
// e.g. set `console=false` would disable console but leave file intact,
// but the Logger API doesn't expose this. It would also complicate
// matters if we wanted to have multiple file outputs.
configureLogger(config, !console.isNull() || !file.isNull());
}
/***************************************************************************
Respond with QR code containing login information.
Enter the name of the APP where the login information will be
used as the get query.
Convert LoginInfo to JSON format and respond with the QR code
of SVG format.
All public key cryptography is done on Curve25519.
The signature of the vectorCard provides verification function in the SDK.
This LoginInfo has an expiration time.
It provide a randomly generated temporary private key encoded
in strings on demand.
In the future, there is a need to enter a temporary key.
***************************************************************************/
public override string loginQR (out string contentType, out string vary)
{
// The randomly generated temporary KeyPair
KeyPair temp_kp = KeyPair.random();
// A 'nonce' used to allow expiring (default: +90 days)
TimePoint expires = this.clock.utcTime() + 90.days;
LoginInfo login_info = LoginInfo(
temp_kp.secret.toString(PrintMode.Clear),
VoterCard(
this.key_pair.address,
temp_kp.address,
SysTime(unixTimeToStdTime(expires), UTC()).toISOExtString(),
)
);
login_info.voter_card.signature =
this.key_pair.sign(login_info.voter_card);
contentType = "image/svg+xml";
vary = "Accept-Encoding";
return this.createQRcode(login_info);
}
/***************************************************************************
Respond with QR code containing EncryptionKey.
Enter the name of the APP & height where the encryptionKey will be used
as the get query.
***************************************************************************/
public override string encryptionKeyQR (
string app, ulong height, out string contentType, out string vary)
{
// Gets the pre-image of the requested height.
Hash pre_image = this.enroll_man.getPreimage(Height(height)).hash;
// blake2b hashing
const Hash key = hashMulti(pre_image, app);
EncryptionKey encryptionKey = EncryptionKey(
app,
Height(height),
key,
this.key_pair.address,
);
encryptionKey.signature = this.key_pair.secret.sign(encryptionKey);
contentType = "image/svg+xml";
vary = "Accept-Encoding";
return this.createQRcode(encryptionKey);
}
/***************************************************************************
SVG format QR code generator
Use barcode library to make QR code of JSON format.
Convert the data structure to JSON and return the QR code image
of the SVG format.
Params:
t = Type of struct to QR code
Returns:
QR code of XML string
***************************************************************************/
private string createQRcode (T)(T t) const @trusted
if (is(T == struct))
{
auto str = serializeToJsonString(t);
auto svgDrawer = new BaseBarCodeSvgDrawer;
svgDrawer.fixSizeMode = true;
svgDrawer.W = 400;
svgDrawer.H = 400;
auto qr = new Qr;
auto bc = qr.encode(str);
return(svgDrawer.draw(bc));
}
}
/*******************************************************************************
Defines the LoginInfo.
This includes the user's credentials.
Includes a temporary private key used to prevent leakage of the
validator's private key.
*******************************************************************************/
public struct LoginInfo
{
// The randomly generated temporary private key encoded as string
public string private_key;
// The `Voter card`
public VoterCard voter_card;
}
/*******************************************************************************
Defines the VoterCard.
Voter card provided at login stage
The voter card contains an expiration date set at 90 days
from the time of creation.
The signature is signed with the validator's private key
*******************************************************************************/
public struct VoterCard
{
// Validator that this voter card represents
public PublicKey validator;
// Public key of the `private_key` field
public PublicKey address;
// A 'nonce' used to allow expiring / replacing credentials
// In this case, we just use an expiration date in ISO8601
public string expires;
// Finally, the signature, made using `validator_address` private key
// (IOW: the `Validator` private key) on this whole packet.
public Signature signature;
/***************************************************************************
Implements hashing support
Params:
dg = hashing function
***************************************************************************/
public void computeHash (scope HashDg dg) const scope
@safe pure nothrow @nogc
{
hashPart(this.validator, dg);
hashPart(this.address, dg);
hashPart(this.expires, dg);
}
}
/*******************************************************************************
Defines the EncryptionKey.
Define an app-specific unique encryption key by app.
The encryption key is hashed using the blake2 cryptographic hash function.
The encryption key is derived from the pre-image as follows:
Hash(pre_image, "APPNAME");
*******************************************************************************/
public struct EncryptionKey
{
// The app name
public string app;
// The block height
public Height height;
// Encryption key
public Hash value;
// Validator that owns this encryption key
public PublicKey validator;
// Signed the EncryptionKey with the validator private key
public Signature signature;
/***************************************************************************
Implements hashing support
Params:
dg = hashing function
***************************************************************************/
public void computeHash (scope HashDg dg) const scope
@safe pure nothrow @nogc
{
hashPart(this.app, dg);
hashPart(this.height.value, dg);
hashPart(this.value, dg);
hashPart(this.validator, dg);
}
}
unittest
{
import agora.utils.Test;
auto key_pair = WK.Keys.A;
string app = "Votera";
PreImageInfo pre_image;
EncryptionKey encryptionKey = EncryptionKey(
app,
Height(100),
hashMulti(pre_image, app),
key_pair.address,
);
Hash hash = hashFull(encryptionKey);
encryptionKey.signature = key_pair.secret.sign(hash);
assert(encryptionKey.validator.verify(encryptionKey.signature, hash));
}
unittest
{
struct S { int a = 1; }
S x;
const KeyPair kp = KeyPair.random();
auto clock = new MockClock(TimePoint.init);
auto qRCodeInterface = new AdminInterface(kp, clock, null);
string qr_svg = qRCodeInterface.createQRcode(x);
string sample_svg =
`<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 500 500">
<rect width="100%" height="100%" fill="#FFFFFF" stroke-width="0"/>
<path d="M50,50h133.333v19.0476h-133.333z M316.667,50h133.333v19.0476h-133.333z M50,69.0476h19.0476v19.0476h-19.0476z M164.286,69.0476h19.0476v19.0476h-19.0476z M278.571,69.0476h19.0476v19.0476h-19.0476z M316.667,69.0476h19.0476v19.0476h-19.0476z M430.952,69.0476h19.0476v19.0476h-19.0476z M50,88.0952h19.0476v19.0476h-19.0476z M88.0952,88.0952h57.1429v19.0476h-57.1429z M164.286,88.0952h19.0476v19.0476h-19.0476z M221.429,88.0952h38.0952v19.0476h-38.0952z M316.667,88.0952h19.0476v19.0476h-19.0476z M354.762,88.0952h57.1429v19.0476h-57.1429z M430.952,88.0952h19.0476v19.0476h-19.0476z M50,107.143h19.0476v19.0476h-19.0476z M88.0952,107.143h57.1429v19.0476h-57.1429z M164.286,107.143h19.0476v19.0476h-19.0476z M221.429,107.143h38.0952v19.0476h-38.0952z M278.571,107.143h19.0476v19.0476h-19.0476z M316.667,107.143h19.0476v19.0476h-19.0476z M354.762,107.143h57.1429v19.0476h-57.1429z M430.952,107.143h19.0476v19.0476h-19.0476z M50,126.19h19.0476v19.0476h-19.0476z M88.0952,126.19h57.1429v19.0476h-57.1429z M164.286,126.19h19.0476v19.0476h-19.0476z M202.381,126.19h57.1429v19.0476h-57.1429z M278.571,126.19h19.0476v19.0476h-19.0476z M316.667,126.19h19.0476v19.0476h-19.0476z M354.762,126.19h57.1429v19.0476h-57.1429z M430.952,126.19h19.0476v19.0476h-19.0476z M50,145.238h19.0476v19.0476h-19.0476z M164.286,145.238h19.0476v19.0476h-19.0476z M221.429,145.238h19.0476v19.0476h-19.0476z M259.524,145.238h38.0952v19.0476h-38.0952z M316.667,145.238h19.0476v19.0476h-19.0476z M430.952,145.238h19.0476v19.0476h-19.0476z M50,164.286h133.333v19.0476h-133.333z M202.381,164.286h19.0476v19.0476h-19.0476z M240.476,164.286h19.0476v19.0476h-19.0476z M278.571,164.286h19.0476v19.0476h-19.0476z M316.667,164.286h133.333v19.0476h-133.333z M202.381,183.333h38.0952v19.0476h-38.0952z M88.0952,202.381h38.0952v19.0476h-38.0952z M164.286,202.381h76.1905v19.0476h-76.1905z M297.619,202.381h38.0952v19.0476h-38.0952z M354.762,202.381h19.0476v19.0476h-19.0476z M88.0952,221.429h19.0476v19.0476h-19.0476z M126.19,221.429h19.0476v19.0476h-19.0476z M183.333,221.429h38.0952v19.0476h-38.0952z M335.714,221.429h19.0476v19.0476h-19.0476z M392.857,221.429h19.0476v19.0476h-19.0476z M430.952,221.429h19.0476v19.0476h-19.0476z M107.143,240.476h38.0952v19.0476h-38.0952z M164.286,240.476h19.0476v19.0476h-19.0476z M202.381,240.476h38.0952v19.0476h-38.0952z M259.524,240.476h19.0476v19.0476h-19.0476z M297.619,240.476h19.0476v19.0476h-19.0476z M373.81,240.476h38.0952v19.0476h-38.0952z M430.952,240.476h19.0476v19.0476h-19.0476z M69.0476,259.524h19.0476v19.0476h-19.0476z M126.19,259.524h38.0952v19.0476h-38.0952z M183.333,259.524h19.0476v19.0476h-19.0476z M221.429,259.524h57.1429v19.0476h-57.1429z M297.619,259.524h19.0476v19.0476h-19.0476z M335.714,259.524h57.1429v19.0476h-57.1429z M430.952,259.524h19.0476v19.0476h-19.0476z M50,278.571h76.1905v19.0476h-76.1905z M164.286,278.571h19.0476v19.0476h-19.0476z M221.429,278.571h19.0476v19.0476h-19.0476z M259.524,278.571h19.0476v19.0476h-19.0476z M354.762,278.571h19.0476v19.0476h-19.0476z M430.952,278.571h19.0476v19.0476h-19.0476z M202.381,297.619h19.0476v19.0476h-19.0476z M240.476,297.619h19.0476v19.0476h-19.0476z M297.619,297.619h19.0476v19.0476h-19.0476z M335.714,297.619h57.1429v19.0476h-57.1429z M411.905,297.619h19.0476v19.0476h-19.0476z M50,316.667h133.333v19.0476h-133.333z M202.381,316.667h19.0476v19.0476h-19.0476z M297.619,316.667h95.2381v19.0476h-95.2381z M50,335.714h19.0476v19.0476h-19.0476z M164.286,335.714h19.0476v19.0476h-19.0476z M221.429,335.714h19.0476v19.0476h-19.0476z M259.524,335.714h19.0476v19.0476h-19.0476z M392.857,335.714h57.1429v19.0476h-57.1429z M50,354.762h19.0476v19.0476h-19.0476z M88.0952,354.762h57.1429v19.0476h-57.1429z M164.286,354.762h19.0476v19.0476h-19.0476z M221.429,354.762h114.286v19.0476h-114.286z M373.81,354.762h76.1905v19.0476h-76.1905z M50,373.81h19.0476v19.0476h-19.0476z M88.0952,373.81h57.1429v19.0476h-57.1429z M164.286,373.81h19.0476v19.0476h-19.0476z M202.381,373.81h19.0476v19.0476h-19.0476z M259.524,373.81h38.0952v19.0476h-38.0952z M316.667,373.81h38.0952v19.0476h-38.0952z M411.905,373.81h19.0476v19.0476h-19.0476z M50,392.857h19.0476v19.0476h-19.0476z M88.0952,392.857h57.1429v19.0476h-57.1429z M164.286,392.857h19.0476v19.0476h-19.0476z M202.381,392.857h19.0476v19.0476h-19.0476z M240.476,392.857h76.1905v19.0476h-76.1905z M335.714,392.857h19.0476v19.0476h-19.0476z M50,411.905h19.0476v19.0476h-19.0476z M164.286,411.905h19.0476v19.0476h-19.0476z M240.476,411.905h38.0952v19.0476h-38.0952z M354.762,411.905h38.0952v19.0476h-38.0952z M430.952,411.905h19.0476v19.0476h-19.0476z M50,430.952h133.333v19.0476h-133.333z M240.476,430.952h19.0476v19.0476h-19.0476z M297.619,430.952h38.0952v19.0476h-38.0952z M373.81,430.952h38.0952v19.0476h-38.0952z" fill="#000000" stroke-width="0"/>
</svg>`;
assert(qr_svg == sample_svg);
}
| D |
/Users/monradajuycharoen/Desktop/DUP/Test2/build/Pods.build/Debug-iphonesimulator/paper-onboarding.build/Objects-normal/x86_64/PaperOnboardingDelegate.o : /Users/monradajuycharoen/Desktop/DUP/Test2/Pods/paper-onboarding/Source/PaperOnboardingDataSource.swift /Users/monradajuycharoen/Desktop/DUP/Test2/Pods/paper-onboarding/Source/PaperOnboardingDelegate.swift /Users/monradajuycharoen/Desktop/DUP/Test2/Pods/paper-onboarding/Source/PaperOnboarding.swift /Users/monradajuycharoen/Desktop/DUP/Test2/Pods/paper-onboarding/Source/Helpers/Configuring.swift /Users/monradajuycharoen/Desktop/DUP/Test2/Pods/paper-onboarding/Source/GestureControl/GestureControl.swift /Users/monradajuycharoen/Desktop/DUP/Test2/Pods/paper-onboarding/Source/PageView/Item/PageViewItem.swift /Users/monradajuycharoen/Desktop/DUP/Test2/Pods/paper-onboarding/Source/OnboardingContantView/Item/OnboardingContantViewItem.swift /Users/monradajuycharoen/Desktop/DUP/Test2/Pods/paper-onboarding/Source/PageView/PageContainerView/PageContainer.swift /Users/monradajuycharoen/Desktop/DUP/Test2/Pods/paper-onboarding/Source/Helpers/ConstraintsHalper.swift /Users/monradajuycharoen/Desktop/DUP/Test2/Pods/paper-onboarding/Source/PageView/PageView.swift /Users/monradajuycharoen/Desktop/DUP/Test2/Pods/paper-onboarding/Source/FillAnimatinView/FillAnimationView.swift /Users/monradajuycharoen/Desktop/DUP/Test2/Pods/paper-onboarding/Source/OnboardingContantView/OnboardingContentView.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/paper-onboarding/paper-onboarding-umbrella.h /Users/monradajuycharoen/Desktop/DUP/Test2/build/Pods.build/Debug-iphonesimulator/paper-onboarding.build/unextended-module.modulemap
/Users/monradajuycharoen/Desktop/DUP/Test2/build/Pods.build/Debug-iphonesimulator/paper-onboarding.build/Objects-normal/x86_64/PaperOnboardingDelegate~partial.swiftmodule : /Users/monradajuycharoen/Desktop/DUP/Test2/Pods/paper-onboarding/Source/PaperOnboardingDataSource.swift /Users/monradajuycharoen/Desktop/DUP/Test2/Pods/paper-onboarding/Source/PaperOnboardingDelegate.swift /Users/monradajuycharoen/Desktop/DUP/Test2/Pods/paper-onboarding/Source/PaperOnboarding.swift /Users/monradajuycharoen/Desktop/DUP/Test2/Pods/paper-onboarding/Source/Helpers/Configuring.swift /Users/monradajuycharoen/Desktop/DUP/Test2/Pods/paper-onboarding/Source/GestureControl/GestureControl.swift /Users/monradajuycharoen/Desktop/DUP/Test2/Pods/paper-onboarding/Source/PageView/Item/PageViewItem.swift /Users/monradajuycharoen/Desktop/DUP/Test2/Pods/paper-onboarding/Source/OnboardingContantView/Item/OnboardingContantViewItem.swift /Users/monradajuycharoen/Desktop/DUP/Test2/Pods/paper-onboarding/Source/PageView/PageContainerView/PageContainer.swift /Users/monradajuycharoen/Desktop/DUP/Test2/Pods/paper-onboarding/Source/Helpers/ConstraintsHalper.swift /Users/monradajuycharoen/Desktop/DUP/Test2/Pods/paper-onboarding/Source/PageView/PageView.swift /Users/monradajuycharoen/Desktop/DUP/Test2/Pods/paper-onboarding/Source/FillAnimatinView/FillAnimationView.swift /Users/monradajuycharoen/Desktop/DUP/Test2/Pods/paper-onboarding/Source/OnboardingContantView/OnboardingContentView.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/paper-onboarding/paper-onboarding-umbrella.h /Users/monradajuycharoen/Desktop/DUP/Test2/build/Pods.build/Debug-iphonesimulator/paper-onboarding.build/unextended-module.modulemap
/Users/monradajuycharoen/Desktop/DUP/Test2/build/Pods.build/Debug-iphonesimulator/paper-onboarding.build/Objects-normal/x86_64/PaperOnboardingDelegate~partial.swiftdoc : /Users/monradajuycharoen/Desktop/DUP/Test2/Pods/paper-onboarding/Source/PaperOnboardingDataSource.swift /Users/monradajuycharoen/Desktop/DUP/Test2/Pods/paper-onboarding/Source/PaperOnboardingDelegate.swift /Users/monradajuycharoen/Desktop/DUP/Test2/Pods/paper-onboarding/Source/PaperOnboarding.swift /Users/monradajuycharoen/Desktop/DUP/Test2/Pods/paper-onboarding/Source/Helpers/Configuring.swift /Users/monradajuycharoen/Desktop/DUP/Test2/Pods/paper-onboarding/Source/GestureControl/GestureControl.swift /Users/monradajuycharoen/Desktop/DUP/Test2/Pods/paper-onboarding/Source/PageView/Item/PageViewItem.swift /Users/monradajuycharoen/Desktop/DUP/Test2/Pods/paper-onboarding/Source/OnboardingContantView/Item/OnboardingContantViewItem.swift /Users/monradajuycharoen/Desktop/DUP/Test2/Pods/paper-onboarding/Source/PageView/PageContainerView/PageContainer.swift /Users/monradajuycharoen/Desktop/DUP/Test2/Pods/paper-onboarding/Source/Helpers/ConstraintsHalper.swift /Users/monradajuycharoen/Desktop/DUP/Test2/Pods/paper-onboarding/Source/PageView/PageView.swift /Users/monradajuycharoen/Desktop/DUP/Test2/Pods/paper-onboarding/Source/FillAnimatinView/FillAnimationView.swift /Users/monradajuycharoen/Desktop/DUP/Test2/Pods/paper-onboarding/Source/OnboardingContantView/OnboardingContentView.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/paper-onboarding/paper-onboarding-umbrella.h /Users/monradajuycharoen/Desktop/DUP/Test2/build/Pods.build/Debug-iphonesimulator/paper-onboarding.build/unextended-module.modulemap
| D |
module dlangui.platforms.dsfml.dsfmlapp;
public import dlangui.core.config;
static if (BACKEND_DSFML):
import dlangui.platforms.common.platform;
import dsfml.graphics;
import std.array;
import dlangui.core.collections;
import dlangui.core.logger;
import dlangui.widgets.widget;
import dlangui.widgets.popup;
import dlangui.graphics.drawbuf;
import dlangui.core.stdaction;
import dlangui.dialogs.msgbox;
private import dlangui.graphics.gldrawbuf;
/**
* Window abstraction layer. Widgets can be shown only inside window.
*
*/
class DSFMLWindow : dlangui.platforms.common.platform.Window {
private RenderWindow _wnd;
private bool _ownRenderWindow;
static private bool _gl3Reloaded = false;
@property RenderWindow wnd() { return _wnd; }
this(RenderWindow wnd, bool own) {
_wnd = wnd;
_ownRenderWindow = own;
super();
auto sz = wnd.size;
onResize(sz.x, sz.y);
}
~this() {
if (_ownRenderWindow) {
destroy(_wnd);
}
_wnd = null;
}
override void show() {
}
/// returns window caption
override @property dstring windowCaption() {
// TODO
return ""d;
}
/// sets window caption
override @property void windowCaption(dstring caption) {
// TODO
}
/// sets window icon
override @property void windowIcon(DrawBufRef icon) {
// TODO
}
/// request window redraw
override void invalidate() {
// TODO
}
/// close window
override void close() {
// TODO
}
void draw() {
paintUsingOpenGL();
}
private void paintUsingOpenGL() {
import derelict.opengl3.gl3;
import dlangui.graphics.gldrawbuf;
import dlangui.graphics.glsupport;
if (!_gl3Reloaded) {
DerelictGL3.reload();
_gl3Reloaded = true;
if (!glSupport.valid && !glSupport.initShaders()) {
Log.d("Cannot init opengl");
assert(0);
}
}
glDisable(GL_DEPTH_TEST);
glViewport(0, 0, _dx, _dy);
float a = 1.0f;
float r = ((_backgroundColor >> 16) & 255) / 255.0f;
float g = ((_backgroundColor >> 8) & 255) / 255.0f;
float b = ((_backgroundColor >> 0) & 255) / 255.0f;
//glClearColor(r, g, b, a);
//glClear(GL_COLOR_BUFFER_BIT);
GLDrawBuf buf = new GLDrawBuf(_dx, _dy, false);
buf.beforeDrawing();
onDraw(buf);
buf.afterDrawing();
}
private MouseButton translateButton(uint btn) {
switch(btn) with(Mouse.Button) {
default:
case Left:
return MouseButton.Left;
case Right:
return MouseButton.Right;
case Middle:
return MouseButton.Middle;
case XButton1:
return MouseButton.XButton1;
case XButton2:
return MouseButton.XButton2;
}
}
private uint translateKey(uint key) {
switch(key) with(Keyboard.Key)
{
case A: return KeyCode.KEY_A;
case B: return KeyCode.KEY_B;
case C: return KeyCode.KEY_C;
case D: return KeyCode.KEY_D;
case E: return KeyCode.KEY_E;
case F: return KeyCode.KEY_F;
case G: return KeyCode.KEY_G;
case H: return KeyCode.KEY_H;
case I: return KeyCode.KEY_I;
case J: return KeyCode.KEY_J;
case K: return KeyCode.KEY_K;
case L: return KeyCode.KEY_L;
case M: return KeyCode.KEY_M;
case N: return KeyCode.KEY_N;
case O: return KeyCode.KEY_O;
case P: return KeyCode.KEY_P;
case Q: return KeyCode.KEY_Q;
case R: return KeyCode.KEY_R;
case S: return KeyCode.KEY_S;
case T: return KeyCode.KEY_T;
case U: return KeyCode.KEY_U;
case V: return KeyCode.KEY_V;
case W: return KeyCode.KEY_W;
case X: return KeyCode.KEY_X;
case Y: return KeyCode.KEY_Y;
case Z: return KeyCode.KEY_Z;
case Num0: return KeyCode.KEY_0;
case Num1: return KeyCode.KEY_1;
case Num2: return KeyCode.KEY_2;
case Num3: return KeyCode.KEY_3;
case Num4: return KeyCode.KEY_4;
case Num5: return KeyCode.KEY_5;
case Num6: return KeyCode.KEY_6;
case Num7: return KeyCode.KEY_7;
case Num8: return KeyCode.KEY_8;
case Num9: return KeyCode.KEY_9;
case Escape: return KeyCode.ESCAPE;
case LControl: return KeyCode.LCONTROL;
case LShift: return KeyCode.LSHIFT;
case LAlt: return KeyCode.LALT;
case RControl: return KeyCode.RCONTROL;
case RShift: return KeyCode.RSHIFT;
case RAlt: return KeyCode.RALT;
///The [ key
case LBracket: return KeyCode.KEY_BRACKETOPEN;
///The ] key
case RBracket: return KeyCode.KEY_BRACKETCLOSE;
///The ; key
case SemiColon: return KeyCode.KEY_BRACKETOPEN;
///The , key
case Comma: return KeyCode.KEY_COMMA;
///The . key
case Period: return KeyCode.KEY_PERIOD;
///The ' key
case Quote: return KeyCode.QUOTE;
///The / key
case Slash: return KeyCode.KEY_DIVIDE;
///The \ key
case BackSlash: return KeyCode.BACKSLASH;
///The ~ key
case Tilde: return KeyCode.TILDE;
///The = key
case Equal: return KeyCode.EQUAL;
///The - key
case Dash: return KeyCode.SUB;
///The Space key
case Space: return KeyCode.SPACE;
case Numpad0: return KeyCode.NUM_0;
case Numpad1: return KeyCode.NUM_1;
case Numpad2: return KeyCode.NUM_2;
case Numpad3: return KeyCode.NUM_3;
case Numpad4: return KeyCode.NUM_4;
case Numpad5: return KeyCode.NUM_5;
case Numpad6: return KeyCode.NUM_6;
case Numpad7: return KeyCode.NUM_7;
case Numpad8: return KeyCode.NUM_8;
case Numpad9: return KeyCode.NUM_9;
case F1: return KeyCode.F1;
case F2: return KeyCode.F2;
case F3: return KeyCode.F3;
case F4: return KeyCode.F4;
case F5: return KeyCode.F5;
case F6: return KeyCode.F6;
case F7: return KeyCode.F7;
case F8: return KeyCode.F8;
case F9: return KeyCode.F9;
case F10: return KeyCode.F10;
case F11: return KeyCode.F11;
case F12: return KeyCode.F12;
case F13: return KeyCode.F13;
case F14: return KeyCode.F14;
case F15: return KeyCode.F15;
case Return: return KeyCode.RETURN;
case BackSpace: return KeyCode.BACK;
case Tab: return KeyCode.TAB;
case PageUp: return KeyCode.PAGEUP;
case PageDown: return KeyCode.PAGEDOWN;
case End: return KeyCode.END;
case Home: return KeyCode.HOME;
case Insert: return KeyCode.INS;
case Delete: return KeyCode.DEL;
case Add: return KeyCode.ADD;
case Subtract: return KeyCode.SUB;
case Multiply: return KeyCode.MUL;
case Divide: return KeyCode.DIV;
case Left: return KeyCode.LEFT;
case Right: return KeyCode.RIGHT;
case Up: return KeyCode.UP;
case Down: return KeyCode.DOWN;
default: return 0x8000_0000 | key;
}
}
private ushort mouseFlags;
private ushort keyFlags;
bool handleEvent(ref Event event) {
switch (event.type) with(event.EventType) {
case Closed: {
break;
}
case Resized: {
onResize(event.size.width, event.size.height);
break;
}
case MouseButtonPressed: {
auto btn = translateButton(event.mouseButton.button);
mouseFlags |= mouseButtonToFlag(btn);
MouseEvent ev = new MouseEvent(MouseAction.ButtonDown, btn, mouseFlags, cast(short)event.mouseButton.x, cast(short)event.mouseButton.y);
return dispatchMouseEvent(ev);
}
case MouseButtonReleased: {
auto btn = translateButton(event.mouseButton.button);
mouseFlags &= ~mouseButtonToFlag(btn);
MouseEvent ev = new MouseEvent(MouseAction.ButtonUp, btn, mouseFlags, cast(short)event.mouseButton.x, cast(short)event.mouseButton.y);
return dispatchMouseEvent(ev);
}
case MouseMoved: {
MouseEvent ev = new MouseEvent(MouseAction.Move, MouseButton.None, mouseFlags, cast(short)event.mouseMove.x, cast(short)event.mouseMove.y);
return dispatchMouseEvent(ev);
}
case MouseEntered: {
break;
}
case MouseLeft: {
mouseFlags = 0;
break;
}
case MouseWheelMoved: {
break;
}
case TextEntered: {
KeyEvent ev = new KeyEvent(KeyAction.Text, 0, 0, [event.text.unicode]);
return dispatchKeyEvent(ev);
}
case KeyReleased:
case KeyPressed: {
keyFlags = 0;
if (event.key.alt)
keyFlags |= KeyFlag.Alt;
if (event.key.control)
keyFlags |= KeyFlag.Control;
if (event.key.shift)
keyFlags |= KeyFlag.Shift;
KeyEvent ev = new KeyEvent(event.type == event.EventType.KeyPressed ? KeyAction.KeyDown : KeyAction.KeyUp, translateKey(event.key.code), keyFlags, [event.text.unicode]);
return dispatchKeyEvent(ev);
}
default:
break;
}
return true;
}
}
/**
* Platform abstraction layer.
*
* Represents application.
*
*/
class DSFMLPlatform : Platform {
private DSFMLWindow[] _activeWindows;
/// register DSFML window created outside dlangui
DSFMLWindow registerWindow(RenderWindow window) {
DSFMLWindow w = new DSFMLWindow(window, false);
_activeWindows ~= w;
return w;
}
/**
* create window
* Args:
* windowCaption = window caption text
* parent = parent Window, or null if no parent
* flags = WindowFlag bit set, combination of Resizable, Modal, Fullscreen
*
* Window w/o Resizable nor Fullscreen will be created with size based on measurement of its content widget
*/
override dlangui.platforms.common.platform.Window createWindow(dstring windowCaption,
dlangui.platforms.common.platform.Window parent,
uint flags = WindowFlag.Resizable, uint width = 0, uint height = 0) {
auto window = new RenderWindow(VideoMode(800, 600, 32), "Hello DSFML!", dsfml.window.window.Window.Style.Titlebar | dsfml.window.window.Window.Style.Close | dsfml.window.window.Window.Style.Resize);
window.setFramerateLimit(60);
DSFMLWindow w = new DSFMLWindow(window, true);
_activeWindows ~= w;
return w;
}
/**
* close window
*
* Closes window earlier created with createWindow()
*/
override void closeWindow(dlangui.platforms.common.platform.Window w) {
DSFMLWindow win = cast(DSFMLWindow)w;
// TODO: support more than one window
_activeWindows[0] = null;
_activeWindows.length = 0;// = _activeWindows.remove(win);
win.wnd.close();
}
/**
* Starts application message loop.
*
* When returned from this method, application is shutting down.
*/
override int enterMessageLoop() {
// TODO: support more than one window
if (_activeWindows.length < 1)
return 1;
DSFMLWindow w = _activeWindows[0];
RenderWindow window = w.wnd;
while (window.isOpen())
{
Event event;
while(window.pollEvent(event))
{
if(event.type == event.EventType.Closed)
{
closeWindow(w);
//window.close();
}
}
window.clear();
//window.draw(head);
//window.draw(leftEye);
//window.draw(rightEye);
//window.draw(smile);
//window.draw(smileCover);
window.display();
}
return 0;
}
/// retrieves text from clipboard (when mouseBuffer == true, use mouse selection clipboard - under linux)
override dstring getClipboardText(bool mouseBuffer = false) {
// TODO:
return ""d;
}
/// sets text to clipboard (when mouseBuffer == true, use mouse selection clipboard - under linux)
override void setClipboardText(dstring text, bool mouseBuffer = false) {
// TODO:
}
/// calls request layout for all windows
override void requestLayout() {
// TODO:
}
}
/// shortcut to current DSFMLPlatform instance
@property DSFMLPlatform dsfmlPlatform() {
return cast(DSFMLPlatform)Platform.instance;
}
// entry point
extern(C) int UIAppMain(string[] args);
void initDSFMLApp() {
initLogs();
Log.d("Initializing DSFML platform");
DSFMLPlatform p = new DSFMLPlatform();
Platform.setInstance(p);
initFontManager();
currentTheme = createDefaultTheme();
import derelict.opengl3.gl3;
import dlangui.graphics.glsupport;
DerelictGL3.load();
if (!_glSupport)
_glSupport = new GLSupport();
Platform.instance.uiTheme = "theme_dark";
}
void uninitDSFMLApp() {
Log.d("Destroying DSFML platform");
Platform.setInstance(null);
releaseResourcesOnAppExit();
}
| D |
// PERMUTE_ARGS:
// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh
/**
a
*/
enum
{
ONE
}
| D |
/// $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
/// Author: Walter Bright
module core.sys.windows.stat;
version (Windows):
extern (C) nothrow @nogc:
import core.sys.windows.stdc.time;
// Posix version is in core.sys.posix.sys.stat
enum S_IFMT = 0xF000;
enum S_IFDIR = 0x4000;
enum S_IFCHR = 0x2000;
enum S_IFIFO = 0x1000;
enum S_IFREG = 0x8000;
enum S_IREAD = 0x0100;
enum S_IWRITE = 0x0080;
enum S_IEXEC = 0x0040;
enum S_IFBLK = 0x6000;
enum S_IFNAM = 0x5000;
@safe pure
{
int S_ISREG(int m) { return (m & S_IFMT) == S_IFREG; }
int S_ISBLK(int m) { return (m & S_IFMT) == S_IFBLK; }
int S_ISNAM(int m) { return (m & S_IFMT) == S_IFNAM; }
int S_ISDIR(int m) { return (m & S_IFMT) == S_IFDIR; }
int S_ISCHR(int m) { return (m & S_IFMT) == S_IFCHR; }
}
version (CRuntime_DigitalMars)
{
struct struct_stat
{
short st_dev;
ushort st_ino;
ushort st_mode;
short st_nlink;
ushort st_uid;
ushort st_gid;
short st_rdev;
short dummy;
int st_size;
time_t st_atime;
time_t st_mtime;
time_t st_ctime;
}
int stat(const(char)*, struct_stat *);
int fstat(int, struct_stat *) @trusted;
int _wstat(const(wchar)*, struct_stat *);
}
else version (CRuntime_Microsoft)
{
struct struct_stat
{
uint st_dev;
ushort st_ino;
ushort st_mode;
short st_nlink;
short st_uid;
short st_gid;
uint st_rdev;
int st_size;
time_t st_atime;
time_t st_mtime;
time_t st_ctime;
}
// These assume time_t is 32 bits (which druntime's definition currently is)
// Add pragma(mangle) to use _stat64 etc. when time_t is made 64-bit
// See also: https://issues.dlang.org/show_bug.cgi?id=21134
int stat(const(char)*, struct_stat *);
int fstat(int, struct_stat *) @trusted;
int _wstat(const(wchar)*, struct_stat *);
}
| D |
/// Contains OpenGL state.
module opengl.window;
import std.stdio;
import std.typecons;
import std.exception : enforce, assumeWontThrow;
import std.string : toStringz, fromStringz;
import core.stdc.config;
import std.experimental.logger;
import derelict.glfw3.glfw3;
import derelict.opengl3.gl;
private {
extern(C) {
void errorCallback(int error, const(char)* description) nothrow {
assumeWontThrow(stderr.writeln("GLFW error: ", description.fromStringz));
}
void cursorCallback(GLFWwindow* window, double x, double y) nothrow {
assumeWontThrow(stderr.writeln("cursor pos: ", x, ", ", y));
}
// Copied+adapted from xlib. Need the struct to access the `fd` field, so that
// we can wait on window events as well as file and signals in libevent.
struct XDisplay {
void*ext_data; /* hook for extension to hang data */
void *private1;
int fd; /* Network socket. */
int private2;
int proto_major_version;/* major version of server's X protocol */
int proto_minor_version;/* minor version of servers X protocol */
char *vendor; /* vendor of the server hardware */
c_ulong private3;
c_ulong private4;
c_ulong private5;
int private6;
void function() resource_alloc;
int byte_order; /* screen byte order, LSBFirst, MSBFirst */
int bitmap_unit; /* padding and data requirements */
int bitmap_pad; /* padding requirements on bitmaps */
int bitmap_bit_order; /* LeastSignificant or MostSignificant */
int nformats; /* number of pixmap formats in list */
void *pixmap_format; /* pixmap format list */
int private8;
int release; /* release of the server */
void* private9;
void* private10;
int qlen; /* Length of input event queue */
c_ulong last_request_read; /* seq number of last event read */
c_ulong request; /* sequence number of last request. */
void* private11;
void* private12;
void* private13;
void* private14;
uint max_request_size; /* maximum number 32 bit words in request*/
void *db;
void function() private15;
char *display_name; /* "host:display" string used on this connect*/
int default_screen; /* default screen for operations */
int nscreens; /* number of screens on this server*/
void *screens; /* pointer to list of screens */
c_ulong motion_buffer; /* size of motion buffer */
c_ulong private16;
int min_keycode; /* minimum defined keycode */
int max_keycode; /* maximum defined keycode */
void* private17;
void* private18;
int private19;
char *xdefaults; /* contents of defaults from server */
/* there is more to this structure, but it is private to Xlib */
}
static assert(XDisplay.sizeof == 296); // Check that the XDisplay definition is correct. size measured from a test C program.
alias glfwGetX11Display_t = XDisplay* function();
}
__gshared glfwGetX11Display_t glfwGetX11Display;
// Replace derelict's GLFW loader with one that also loads the internal `glfwGetX11Display` function
class InternalGLFW3Loader : DerelictGLFW3Loader {
protected override void loadSymbols() {
super.loadSymbols();
bindFunc(cast(void**) &glfwGetX11Display, "glfwGetX11Display");
}
}
static this() {
DerelictGLFW3 = new InternalGLFW3Loader();
}
}
/// Initializes GLFW. Call once at startup.
void initGl() {
DerelictGL3.load();
DerelictGLFW3.load();
glfwSetErrorCallback(&errorCallback);
enforce(glfwInit() != 0, "Failed to initialize GLFW.");
}
/// Returns the file descriptor used by X11.
/// For use with `select`, `poll`, etc. only.
/// Requires `initGl` to have been called.
int x11EventsFd() @property {
return glfwGetX11Display().fd;
}
/++
+ Manages the OpenGL context and window.
++/
final class GlWindow {
private GLFWwindow* window;
/// Opens a window with the specified dimensions.
/// A window must not already have been opened.
void open(uint width, uint height) {
assert(!this.isOpen);
glfwWindowHint(GLFW_RESIZABLE, 0);
/*glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_COMPAT_PROFILE);
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2);*/
window = glfwCreateWindow(width, height, "TAS Window".toStringz, null, null);
enforce(window != null, "Failed to create window.");
glfwMakeContextCurrent(window);
DerelictGL3.reload();
//enforce(glfwExtensionSupported("EXT_direct_state_access".toStringz), "EXT_direct_state_access unsupported by this GPU.");
enforce(glGetNamedBufferParameterivEXT !is null, "EXT_direct_state_access unsupported by this GPU.");
glfwSetCursorPosCallback(window, &cursorCallback);
debug {
static extern(C) void gl_debug_cb(
GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length,
const(GLchar)* msg, void* userParam
) nothrow {
assumeWontThrow(info("OpenGL: ", msg[0..length]));
}
if(glDebugMessageCallback !is null) {
glDebugMessageCallback(&gl_debug_cb, null);
glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS);
trace("OpenGL debug logger installed");
}
}
}
/// ditto
void open(Tuple!(uint, uint) size) {
this.open(size[0], size[1]);
}
/// Closes a window.
/// A window must be opened.
void close() {
assert(this.isOpen);
glfwDestroyWindow(window);
window = null;
}
/// Returns true if a window is opened
bool isOpen() @property pure const nothrow @nogc {
return window !is null;
}
/// Resizes the window.
/// A window must be opened.
void resize(uint width, uint height) {
assert(this.isOpen);
glfwSetWindowSize(window, width, height);
}
/// ditto
void resize(Tuple!(uint, uint) size) {
this.resize(size[0], size[1]);
}
/// Returns the window size in pixels.
/// A window must be opened.
Tuple!(uint,uint) size() @property nothrow @nogc {
assert(this.isOpen);
int w,h;
glfwGetFramebufferSize(window, &w, &h);
return Tuple!(uint, uint)(w,h);
}
/// Polls input events using glfwPollEvents
void pollEvents() {
glfwPollEvents();
}
/// Swap window buffers
void swapBuffers() {
glfwSwapBuffers(this.window);
}
}
| D |
instance DIA_Addon_Skip_NW_EXIT(C_Info)
{
npc = PIR_1301_Addon_Skip_NW;
nr = 999;
condition = DIA_Addon_Skip_NW_EXIT_Condition;
information = DIA_Addon_Skip_NW_EXIT_Info;
permanent = TRUE;
description = Dialog_Ende;
};
func int DIA_Addon_Skip_NW_EXIT_Condition()
{
return TRUE;
};
func void DIA_Addon_Skip_NW_EXIT_Info()
{
AI_StopProcessInfos(self);
};
instance DIA_Addon_Skip_NW_Hallo(C_Info)
{
npc = PIR_1301_Addon_Skip_NW;
nr = 1;
condition = DIA_Addon_Skip_NW_Hallo_Condition;
information = DIA_Addon_Skip_NW_Hallo_Info;
important = TRUE;
};
func int DIA_Addon_Skip_NW_Hallo_Condition()
{
return TRUE;
};
func void DIA_Addon_Skip_NW_Hallo_Info()
{
AI_Output(self,other,"DIA_Addon_Skip_NW_Hallo_08_00"); //Ну наконец-то! Сколько тебя можно ждать?
AI_Output(self,other,"DIA_Addon_Skip_NW_Hallo_08_01"); //(удивленно) Минуточку, ты же не торговец из города, верно?
AI_Output(self,other,"DIA_Addon_Skip_NW_Hallo_08_02"); //А где Бальтрам?
};
instance DIA_Addon_Skip_NW_WerBistDu(C_Info)
{
npc = PIR_1301_Addon_Skip_NW;
nr = 5;
condition = DIA_Addon_Skip_NW_WerBistDu_Condition;
information = DIA_Addon_Skip_NW_WerBistDu_Info;
description = "Ты кто такой?";
};
func int DIA_Addon_Skip_NW_WerBistDu_Condition()
{
return TRUE;
};
func void DIA_Addon_Skip_NW_WerBistDu_Info()
{
AI_Output(other,self,"DIA_Addon_Skip_NW_WerBistDu_15_00"); //Ты кто такой?
AI_Output(self,other,"DIA_Addon_Skip_NW_WerBistDu_08_01"); //Не знаю, почему это должно тебя касаться. Но если уж тебе так интересно, то меня зовут Скип. Тебе знакомо это имя?
AI_Output(other,self,"DIA_Addon_Skip_NW_WerBistDu_15_02"); //Как-как тебя зовут?
AI_Output(self,other,"DIA_Addon_Skip_NW_WerBistDu_08_03"); //Неужели ты никогда не слышал о Скипе? Ты что, вырос на необитаемом острове, приятель?
AI_Output(self,other,"DIA_Addon_Skip_NW_WerBistDu_08_04"); //Я - один из самых опасных преступников Хориниса. Вместе со своими ребятами я наводил ужас на моряков, ходящих в этих водах.
AI_Output(self,other,"DIA_Addon_Skip_NW_WerBistDu_08_05"); //Да нет, ты должен был обо мне слышать.
Info_ClearChoices(DIA_Addon_Skip_NW_WerBistDu);
Info_AddChoice(DIA_Addon_Skip_NW_WerBistDu,"Ты пират?",DIA_Addon_Skip_NW_WerBistDu_pirat);
Info_AddChoice(DIA_Addon_Skip_NW_WerBistDu,"Я должен тебя знать?",DIA_Addon_Skip_NW_WerBistDu_keineAhnung);
Info_AddChoice(DIA_Addon_Skip_NW_WerBistDu,"Ну конечно! Теперь я вспоминаю!",DIA_Addon_Skip_NW_WerBistDu_ja);
};
func void DIA_Addon_Skip_NW_WerBistDu_ja()
{
AI_Output(other,self,"DIA_Addon_Skip_NW_WerBistDu_ja_15_00"); //Ну конечно! Теперь я вспоминаю!
AI_Output(self,other,"DIA_Addon_Skip_NW_WerBistDu_ja_08_01"); //Правда? Ты действительно обо мне слышал?
AI_Output(self,other,"DIA_Addon_Skip_NW_WerBistDu_ja_08_02"); //А я-то думал вернуться в город.
AI_Output(self,other,"DIA_Addon_Skip_NW_WerBistDu_ja_08_03"); //Хорошо, что я этого не сделал.
if((VisibleGuild(other) != GIL_MIL) && (VisibleGuild(other) != GIL_PAL))
{
AI_Output(self,other,"DIA_Addon_Skip_NW_WerBistDu_ja_08_04"); //Меня бы сразу бросили за решетку.
}
else
{
AI_Output(self,other,"DIA_Addon_Skip_NW_WerBistDu_ja_08_05"); //Кстати, ты же не арестовывать меня пришел?
AI_Output(other,self,"DIA_Addon_Skip_NW_WerBistDu_ja_15_06"); //Ну-у...
AI_Output(self,other,"DIA_Addon_Skip_NW_WerBistDu_ja_08_07"); //Это в твоих же интересах. Свяжись со стариком Скипом - и ты мертвец.
};
Info_ClearChoices(DIA_Addon_Skip_NW_WerBistDu);
};
func void DIA_Addon_Skip_NW_WerBistDu_keineAhnung()
{
AI_Output(other,self,"DIA_Addon_Skip_NW_WerBistDu_keineAhnung_15_00"); //Я должен тебя знать?
AI_Output(self,other,"DIA_Addon_Skip_NW_WerBistDu_keineAhnung_08_01"); //Следи за своим языком, приятель, иначе старику Скипу придется тебя проучить.
Info_ClearChoices(DIA_Addon_Skip_NW_WerBistDu);
};
func void DIA_Addon_Skip_NW_WerBistDu_pirat()
{
AI_Output(other,self,"DIA_Addon_Skip_NW_WerBistDu_pirat_15_00"); //Ты пират?
AI_Output(self,other,"DIA_Addon_Skip_NW_WerBistDu_pirat_08_01"); //Да, черт возьми. Это же очевидно. Пират, и причем знаменитый.
AI_Output(self,other,"DIA_Addon_Skip_NW_WerBistDu_pirat_08_02"); //Но сейчас мне так скучно, что я готов сожрать свою лодку.
Info_ClearChoices(DIA_Addon_Skip_NW_WerBistDu);
};
instance DIA_Addon_Skip_NW_Baltram(C_Info)
{
npc = PIR_1301_Addon_Skip_NW;
nr = 5;
condition = DIA_Addon_Skip_NW_Baltram_Condition;
information = DIA_Addon_Skip_NW_Baltram_Info;
description = "Бальтрам? Ты ждешь торговца?";
};
func int DIA_Addon_Skip_NW_Baltram_Condition()
{
if(Npc_KnowsInfo(other,DIA_Addon_Skip_NW_Hallo))
{
return TRUE;
};
};
func void DIA_Addon_Skip_NW_Baltram_Info()
{
AI_Output(other,self,"DIA_Addon_Skip_NW_Baltram_15_00"); //Бальтрам? Ты ждешь торговца?
AI_Output(self,other,"DIA_Addon_Skip_NW_Baltram_08_01"); //Догадливый паренек.
if(C_BodyStateContains(self,BS_SIT))
{
AI_Standup(self);
B_TurnToNpc(self,other);
};
AI_Output(self,other,"DIA_Addon_Skip_NW_Baltram_08_02"); //Я же только что сам об этом сказал.
AI_Output(self,other,"DIA_Addon_Skip_NW_Baltram_08_03"); //Этот никчемный торговец всяким хламом, похоже, забыл про нашу встречу.
AI_Output(self,other,"DIA_Addon_Skip_NW_Baltram_08_04"); //Если бы я только мог до него добраться...
MIS_Addon_Baltram_Paket4Skip = LOG_Running;
Log_CreateTopic(TOPIC_Addon_BaltramSkipTrade,LOG_MISSION);
Log_SetTopicStatus(TOPIC_Addon_BaltramSkipTrade,LOG_Running);
B_LogEntry(TOPIC_Addon_BaltramSkipTrade,"Пират Скип сообщил мне, что городской торговец Бальтрам сотрудничает с пиратами.");
};
func void B_Skip_GiveRumForBaltram()
{
CreateInvItems(self,ItFo_Addon_Rum,2);
B_GiveInvItems(self,other,ItFo_Addon_Rum,2);
if(MIS_Addon_Baltram_Paket4Skip == LOG_Running)
{
B_LogEntry(TOPIC_Addon_BaltramSkipTrade,"Скип дал мне ром, который я должен отнести Бальтраму.");
};
Skip_Rum4Baltram = TRUE;
B_GivePlayerXP(XP_Addon_Skip_BaltramPaket);
};
instance DIA_Addon_Skip_BaltramPaket(C_Info)
{
npc = PIR_1301_Addon_Skip_NW;
nr = 5;
condition = DIA_Addon_Skip_BaltramPaket_Condition;
information = DIA_Addon_Skip_BaltramPaket_Info;
description = "У меня для тебя посылка от Бальтрама.";
};
func int DIA_Addon_Skip_BaltramPaket_Condition()
{
if(Npc_HasItems(other,ItMi_Packet_Baltram4Skip_Addon))
{
return TRUE;
};
};
func void DIA_Addon_Skip_BaltramPaket_Info()
{
AI_Output(other,self,"DIA_Addon_Skip_BaltramPaket_15_00"); //У меня для тебя посылка от Бальтрама.
AI_Output(self,other,"DIA_Addon_Skip_BaltramPaket_08_01"); //Что? Он послал ко мне мальчика на побегушках?
AI_Output(self,other,"DIA_Addon_Skip_BaltramPaket_08_02"); //Думаю, он просто боится со мной встречаться. Что еще ожидать от этого жалкого скряги?
B_GiveInvItems(other,self,ItMi_Packet_Baltram4Skip_Addon,1);
AI_Output(other,self,"DIA_Addon_Skip_BaltramPaket_15_03"); //Он сказал, что ему нужны три бутылки рома.
AI_Output(self,other,"DIA_Addon_Skip_BaltramPaket_08_04"); //(смеется) Ну конечно! Сначала он заставляет меня ждать, потом не приходит на встречу, и у него еще хватает наглости чего-то требовать.
AI_Output(self,other,"DIA_Addon_Skip_BaltramPaket_08_05"); //Вот, передай ему две бутылки. Хватит с него.
B_Skip_GiveRumForBaltram();
};
instance DIA_Addon_Skip_NW_Woher(C_Info)
{
npc = PIR_1301_Addon_Skip_NW;
nr = 5;
condition = DIA_Addon_Skip_NW_Woher_Condition;
information = DIA_Addon_Skip_NW_Woher_Info;
description = "Откуда ты приплыл?";
};
func int DIA_Addon_Skip_NW_Woher_Condition()
{
if(Npc_KnowsInfo(other,DIA_Addon_Skip_NW_WerBistDu))
{
return TRUE;
};
};
func void DIA_Addon_Skip_NW_Woher_Info()
{
AI_Output(other,self,"DIA_Addon_Skip_NW_Woher_15_00"); //Откуда ты приплыл?
AI_Output(self,other,"DIA_Addon_Skip_NW_Woher_08_01"); //Ты хочешь знать, где наше убежище?
if(VisibleGuild(other) == GIL_MIL)
{
AI_Output(self,other,"DIA_Addon_Skip_NW_Woher_08_02"); //Это последнее, что я сказал бы солдату ополчения.
}
else
{
AI_Output(self,other,"DIA_Addon_Skip_NW_Woher_08_03"); //С таким же успехом я могу сам пойти и сдаться ополчению.
};
AI_Output(self,other,"DIA_Addon_Skip_NW_Woher_08_04"); //А если ты вдруг захочешь навестить нас, это все равно тебе не поможет.
AI_Output(self,other,"DIA_Addon_Skip_NW_Woher_08_05"); //Остров Хоринис довольно велик и никто и никогда не попадет туда, куда добрались мы. Если, конечно, они не наймут корабль.
AI_Output(self,other,"DIA_Addon_Skip_NW_Woher_08_06"); //Потом еще нужно будет пробраться через скалы, а там никто не пройдет, не зная секретного прохода.
AI_Output(self,other,"DIA_Addon_Skip_NW_Woher_08_07"); //Дорогу знают только два человека, а ты не похож ни на одного из них.
};
instance DIA_Addon_Skip_SCSawGreg(C_Info)
{
npc = PIR_1301_Addon_Skip_NW;
nr = 5;
condition = DIA_Addon_Skip_SCSawGreg_Condition;
information = DIA_Addon_Skip_SCSawGreg_Info;
description = "Ты не знаешь никого с повязкой на глазу?";
};
func int DIA_Addon_Skip_SCSawGreg_Condition()
{
if(Npc_KnowsInfo(other,DIA_Addon_Skip_NW_Woher) && (SC_KnowsConnectionSkipGreg == TRUE))
{
return TRUE;
};
};
func void DIA_Addon_Skip_SCSawGreg_Info()
{
AI_Output(other,self,"DIA_Addon_Skip_SCSawGreg_15_00"); //Ты не знаешь никого с повязкой на глазу?
AI_Output(self,other,"DIA_Addon_Skip_SCSawGreg_08_01"); //Я знаю много людей, у которых повязка на глазу.
AI_Output(other,self,"DIA_Addon_Skip_SCSawGreg_15_02"); //Кое-кто путешествует по землям Хориниса и, похоже, неплохо знает тебя.
AI_Output(self,other,"DIA_Addon_Skip_SCSawGreg_08_03"); //Мне никто не приходит в голову. Я не имею никаких дел с людьми, живущими на суше.
AI_Output(other,self,"DIA_Addon_Skip_SCSawGreg_15_04"); //Но...
AI_Output(self,other,"DIA_Addon_Skip_SCSawGreg_08_05"); //Прекрати, мне это не интересно.
B_GivePlayerXP(XP_Ambient);
};
instance DIA_Addon_Skip_NW_MissingPeople(C_Info)
{
npc = PIR_1301_Addon_Skip_NW;
nr = 2;
condition = DIA_Addon_Skip_NW_MissingPeople_Condition;
information = DIA_Addon_Skip_NW_MissingPeople_Info;
description = "Пропало много людей. И все улики указывают на то, что ты замешан в этом деле.";
};
func int DIA_Addon_Skip_NW_MissingPeople_Condition()
{
if(Npc_KnowsInfo(other,DIA_Addon_Skip_NW_Woher) && (MIS_Addon_Vatras_WhereAreMissingPeople == LOG_Running))
{
return TRUE;
};
};
func void DIA_Addon_Skip_NW_MissingPeople_Info()
{
AI_Output(other,self,"DIA_Addon_Skip_NW_MissingPeople_15_00"); //Пропало много людей. И все улики указывают на то, что ты замешан в этом деле.
AI_Output(self,other,"DIA_Addon_Skip_NW_MissingPeople_08_01"); //Эээ... проклятье, это не то, что ты думаешь.
AI_Output(self,other,"DIA_Addon_Skip_NW_MissingPeople_08_02"); //Я что, похож на работорговца? Нет, я всего лишь занимаюсь перевозкой товаров. Что это за товары и откуда они берутся - меня совершенно не касается.
AI_Output(self,other,"DIA_Addon_Skip_NW_MissingPeople_08_03"); //Мы перевозим различные товары для этих свиней.
AI_Output(self,other,"DIA_Addon_Skip_NW_MissingPeople_08_04"); //Сначала это были обычные товары. Ну, иногда, может быть, немного контрабанды.
AI_Output(self,other,"DIA_Addon_Skip_NW_MissingPeople_08_05"); //Но потом они стали похищать жителей города. Я не имею ни малейшего представления, что они собирались с ними делать.
AI_Output(self,other,"DIA_Addon_Skip_NW_MissingPeople_08_06"); //Мы всего лишь перевозили их.
};
instance DIA_Addon_Skip_NW_Dexter(C_Info)
{
npc = PIR_1301_Addon_Skip_NW;
nr = 2;
condition = DIA_Addon_Skip_NW_Dexter_Condition;
information = DIA_Addon_Skip_NW_Dexter_Info;
description = "О ком ты говоришь?";
};
func int DIA_Addon_Skip_NW_Dexter_Condition()
{
if(Npc_KnowsInfo(other,DIA_Addon_Skip_NW_MissingPeople))
{
return TRUE;
};
};
func void DIA_Addon_Skip_NW_Dexter_Info()
{
AI_Output(other,self,"DIA_Addon_Skip_NW_Dexter_15_00"); //О ком ты говоришь?
AI_Output(self,other,"DIA_Addon_Skip_NW_Dexter_08_01"); //О бандитах, конечно. О ком же еще? Мерзкие отбросы, которые хозяйничают по всему острову.
AI_Output(self,other,"DIA_Addon_Skip_NW_Dexter_08_02"); //И не только здесь, а по всему Хоринису.
};
func void B_Skip_SaysDextersName()
{
if(SC_KnowsDexterAsKidnapper == FALSE)
{
AI_Output(self,other,"DIA_Addon_Skip_SaysDextersName_08_00"); //Я вспомнил, как зовут главаря! Декстер. Да, они звали его Декстер.
Log_CreateTopic(TOPIC_Addon_WhoStolePeople,LOG_MISSION);
Log_SetTopicStatus(TOPIC_Addon_WhoStolePeople,LOG_Running);
B_LogEntry(TOPIC_Addon_WhoStolePeople,"Людей похищают по приказу предводителя бандитов Декстера. Найти Декстера можно к югу от фермы Онара.");
SC_KnowsDexterAsKidnapper = TRUE;
Ranger_SCKnowsDexter = TRUE;
};
};
instance DIA_Addon_Skip_NW_Name(C_Info)
{
npc = PIR_1301_Addon_Skip_NW;
nr = 2;
condition = DIA_Addon_Skip_NW_Name_Condition;
information = DIA_Addon_Skip_NW_Name_Info;
description = "Отговорка 'бандиты' меня не устраивает. Мне нужно имя...";
};
func int DIA_Addon_Skip_NW_Name_Condition()
{
if(Npc_KnowsInfo(other,DIA_Addon_Skip_NW_Dexter) && (SCKnowsMissingPeopleAreInAddonWorld == FALSE))
{
return TRUE;
};
};
func void DIA_Addon_Skip_NW_Name_Info()
{
AI_Output(other,self,"DIA_Addon_Skip_NW_Name_15_00"); //Отговорка 'бандиты' меня не устраивает. Мне нужно имя...
AI_Output(self,other,"DIA_Addon_Skip_NW_Name_08_01"); //Имя? Ты хочешь узнать, кто является предводителем бандитов? Черт, как же звали этого ублюдка...
AI_Output(self,other,"DIA_Addon_Skip_NW_Name_08_02"); //Ммм. Никак не могу вспомнить его имя. Хоть ты тресни.
AI_Output(self,other,"DIA_Addon_Skip_NW_Name_08_03"); //Но я могу показать тебе, где найти человека, который является главарем банды в этой части Хориниса.
AI_Output(self,other,"DIA_Addon_Skip_NW_Name_08_04"); //У тебя есть карта?
if(!Npc_HasItems(other,ItWr_Map_NewWorld))
{
if(Npc_HasItems(other,ItWr_Map_NewWorld_Ornaments_Addon) || Npc_HasItems(other,ItWr_Map_Shrine_MIS) || Npc_HasItems(other,ItWr_Map_Caves_MIS))
{
AI_Output(other,self,"DIA_Addon_Skip_NW_Name_15_05"); //Да, есть.
if(Npc_HasItems(other,ItWr_Map_NewWorld_Ornaments_Addon))
{
B_GiveInvItems(other,self,ItWr_Map_NewWorld_Ornaments_Addon,1);
}
else if(Npc_HasItems(other,ItWr_Map_Shrine_MIS))
{
B_GiveInvItems(other,self,ItWr_Map_Shrine_MIS,1);
}
else if(Npc_HasItems(other,ItWr_Map_Caves_MIS))
{
B_GiveInvItems(other,self,ItWr_Map_Caves_MIS,1);
};
AI_WaitTillEnd(self,other);
B_ReadFakeItem(self,other,Fakemap,1);
AI_Output(self,other,"DIA_Addon_Skip_NW_Name_08_06"); //Но кто-то уже исписал ее. Зачем портить ее еще больше?
if(Npc_HasItems(self,ItWr_Map_NewWorld_Ornaments_Addon))
{
B_GiveInvItems(self,other,ItWr_Map_NewWorld_Ornaments_Addon,1);
}
else if(Npc_HasItems(self,ItWr_Map_Shrine_MIS))
{
B_GiveInvItems(self,other,ItWr_Map_Shrine_MIS,1);
}
else if(Npc_HasItems(self,ItWr_Map_Caves_MIS))
{
B_GiveInvItems(self,other,ItWr_Map_Caves_MIS,1);
};
}
else
{
AI_Output(other,self,"DIA_Addon_Skip_NW_Name_15_07"); //Нет.
};
AI_Output(self,other,"DIA_Addon_Skip_NW_Name_08_08"); //В таком случае я опишу тебе это место.
AI_Output(self,other,"DIA_Addon_Skip_NW_Name_08_09"); //Далеко на востоке отсюда находится очень большая ферма. Фермера, кажется, зовут Онар.
AI_Output(self,other,"DIA_Addon_Skip_NW_Name_08_10"); //Он владеет обширными землями. К югу от его полей находится небольшая крепость на высокой скале.
AI_Output(self,other,"DIA_Addon_Skip_NW_Name_08_11"); //Там ты и найдешь того, кто тебе нужен.
B_Skip_SaysDextersName();
};
};
instance DIA_Addon_Skip_NW_Landkarte(C_Info)
{
npc = PIR_1301_Addon_Skip_NW;
nr = 5;
condition = DIA_Addon_Skip_NW_Landkarte_Condition;
information = DIA_Addon_Skip_NW_Landkarte_Info;
description = "Вот. У меня есть карта Хориниса.";
};
func int DIA_Addon_Skip_NW_Landkarte_Condition()
{
if(Npc_KnowsInfo(other,DIA_Addon_Skip_NW_Name) && Npc_HasItems(other,ItWr_Map_NewWorld) && (SCKnowsMissingPeopleAreInAddonWorld == FALSE))
{
return TRUE;
};
};
func void DIA_Addon_Skip_NW_Landkarte_Info()
{
AI_Output(other,self,"DIA_Addon_Skip_NW_Landkarte_15_00"); //Вот. У меня есть карта Хориниса.
B_GiveInvItems(other,self,ItWr_Map_NewWorld,1);
AI_Output(self,other,"DIA_Addon_Skip_NW_Landkarte_08_01"); //Хорошо. Дай я нарисую тебе его местоположение.
B_ReadFakeItem(self,other,Fakemap,3);
AI_Output(self,other,"DIA_Addon_Skip_NW_Landkarte_08_02"); //Держи карту.
Npc_RemoveInvItems(self,ItWr_Map_NewWorld,1);
CreateInvItems(self,ItWr_Map_NewWorld_Dexter,1);
B_GiveInvItems(self,other,ItWr_Map_NewWorld_Dexter,1);
B_Skip_SaysDextersName();
};
instance DIA_Addon_Skip_NW_Wohin(C_Info)
{
npc = PIR_1301_Addon_Skip_NW;
nr = 99;
condition = DIA_Addon_Skip_NW_Wohin_Condition;
information = DIA_Addon_Skip_NW_Wohin_Info;
permanent = TRUE;
description = "Куда вы отвозили этих людей?";
};
func int DIA_Addon_Skip_NW_Wohin_Condition()
{
if(Npc_KnowsInfo(other,DIA_Addon_Skip_NW_Woher) && Npc_KnowsInfo(other,DIA_Addon_Skip_NW_MissingPeople))
{
return TRUE;
};
};
func void DIA_Addon_Skip_NW_Wohin_Info()
{
AI_Output(other,self,"DIA_Addon_Skip_NW_Wohin_15_00"); //Куда вы отвозили этих людей?
AI_Output(self,other,"DIA_Addon_Skip_NW_Wohin_08_01"); //Я уже сказал тебе, я не собираюсь рассказывать, где находится наш порт.
};
| D |
instance Mod_910_BAU_Lobart_NW (Npc_Default)
{
// ------ NSC ------
name = "Lobart";
guild = GIL_OUT;
id = 910;
voice = 26;
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_1h_Bau_Mace);
// ------ 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_NormalBart_Senyan, BodyTex_N, ITAR_Bau_M);
Mdl_SetModelFatness (self, 1);
Mdl_ApplyOverlayMds (self, "Humans_Relaxed.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, 20); //Grenzen für Talent-Level liegen bei 30 und 60
// ------ TA anmelden ------
daily_routine = Rtn_Start_910;
};
FUNC VOID Rtn_Start_910 ()
{
TA_Stand_Guarding (07,30,23,00,"NW_FARM1_LOBART");
TA_Sleep (23,00,07,30,"NW_FARM1_INHOUSE_BED_01");
};
FUNC VOID Rtn_DemonWalker_910 ()
{
TA_Sit_Throne (08,00,20,00,"NW_FARM1_INHOUSE_03_SIT");
TA_Sit_Throne (20,00,08,00,"NW_FARM1_INHOUSE_03_SIT");
};
FUNC VOID Rtn_LobartAlwin_910 ()
{
TA_Smalltalk_Plaudern (08,00,20,00,"WP_ALWIN_SEQUENZ");
TA_Smalltalk_Plaudern (20,00,08,00,"WP_ALWIN_SEQUENZ");
}; | D |
/Users/lqf510/Desktop/codePath/codePathWk1Lab/DerivedData/codePathWk1Lab/Build/Intermediates/codePathWk1Lab.build/Debug-iphonesimulator/codePathWk1Lab.build/Objects-normal/x86_64/FadeTransition.o : /Users/lqf510/Desktop/codePath/codePathWk1Lab/codePathWk1Lab/MoreViewController.swift /Users/lqf510/Downloads/Transition\ Files/BaseTransition.swift /Users/lqf510/Desktop/codePath/codePathWk1Lab/codePathWk1Lab/RequestsViewController.swift /Users/lqf510/Desktop/codePath/codePathWk1Lab/codePathWk1Lab/ViewController.swift /Users/lqf510/Downloads/Common.swift /Users/lqf510/Desktop/codePath/codePathWk1Lab/codePathWk1Lab/AppDelegate.swift /Users/lqf510/Desktop/codePath/codePathWk1Lab/codePathWk1Lab/NotificationsViewController.swift /Users/lqf510/Downloads/Transition\ Files/FadeTransition.swift /Users/lqf510/Desktop/codePath/codePathWk1Lab/PhotoViewController.swift /Users/lqf510/Desktop/codePath/codePathWk1Lab/codePathWk1Lab/MessagesViewController.swift /Users/lqf510/Desktop/codePath/codePathWk1Lab/codePathWk1Lab/NewsFeedViewController.swift /Users/lqf510/Desktop/codePath/codePathWk1Lab/codePathWk1Lab/ThrillistDetailViewController.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.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/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule
/Users/lqf510/Desktop/codePath/codePathWk1Lab/DerivedData/codePathWk1Lab/Build/Intermediates/codePathWk1Lab.build/Debug-iphonesimulator/codePathWk1Lab.build/Objects-normal/x86_64/FadeTransition~partial.swiftmodule : /Users/lqf510/Desktop/codePath/codePathWk1Lab/codePathWk1Lab/MoreViewController.swift /Users/lqf510/Downloads/Transition\ Files/BaseTransition.swift /Users/lqf510/Desktop/codePath/codePathWk1Lab/codePathWk1Lab/RequestsViewController.swift /Users/lqf510/Desktop/codePath/codePathWk1Lab/codePathWk1Lab/ViewController.swift /Users/lqf510/Downloads/Common.swift /Users/lqf510/Desktop/codePath/codePathWk1Lab/codePathWk1Lab/AppDelegate.swift /Users/lqf510/Desktop/codePath/codePathWk1Lab/codePathWk1Lab/NotificationsViewController.swift /Users/lqf510/Downloads/Transition\ Files/FadeTransition.swift /Users/lqf510/Desktop/codePath/codePathWk1Lab/PhotoViewController.swift /Users/lqf510/Desktop/codePath/codePathWk1Lab/codePathWk1Lab/MessagesViewController.swift /Users/lqf510/Desktop/codePath/codePathWk1Lab/codePathWk1Lab/NewsFeedViewController.swift /Users/lqf510/Desktop/codePath/codePathWk1Lab/codePathWk1Lab/ThrillistDetailViewController.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.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/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule
/Users/lqf510/Desktop/codePath/codePathWk1Lab/DerivedData/codePathWk1Lab/Build/Intermediates/codePathWk1Lab.build/Debug-iphonesimulator/codePathWk1Lab.build/Objects-normal/x86_64/FadeTransition~partial.swiftdoc : /Users/lqf510/Desktop/codePath/codePathWk1Lab/codePathWk1Lab/MoreViewController.swift /Users/lqf510/Downloads/Transition\ Files/BaseTransition.swift /Users/lqf510/Desktop/codePath/codePathWk1Lab/codePathWk1Lab/RequestsViewController.swift /Users/lqf510/Desktop/codePath/codePathWk1Lab/codePathWk1Lab/ViewController.swift /Users/lqf510/Downloads/Common.swift /Users/lqf510/Desktop/codePath/codePathWk1Lab/codePathWk1Lab/AppDelegate.swift /Users/lqf510/Desktop/codePath/codePathWk1Lab/codePathWk1Lab/NotificationsViewController.swift /Users/lqf510/Downloads/Transition\ Files/FadeTransition.swift /Users/lqf510/Desktop/codePath/codePathWk1Lab/PhotoViewController.swift /Users/lqf510/Desktop/codePath/codePathWk1Lab/codePathWk1Lab/MessagesViewController.swift /Users/lqf510/Desktop/codePath/codePathWk1Lab/codePathWk1Lab/NewsFeedViewController.swift /Users/lqf510/Desktop/codePath/codePathWk1Lab/codePathWk1Lab/ThrillistDetailViewController.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.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/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule
| D |
func void ZS_Smith_Fire()
{
Perception_Set_Normal();
B_ResetAll(self);
b_staminainvent();
AI_SetWalkMode(self,NPC_WALK);
if(Hlp_StrCmp(Npc_GetNearestWP(self),self.wp) == FALSE)
{
AI_GotoWP(self,self.wp);
};
if(Npc_HasItems(self,ItMi_AnvilPliers) == 0)
{
CreateInvItem(self,ItMi_AnvilPliers);
};
self.aivar[AIV_MM_EatGroundStart] = FALSE;
};
func int ZS_Smith_Fire_Loop()
{
B_CheckHealth(self);
if((self.vars[0] == TRUE) && (Npc_GetDistToNpc(self,hero) <= PERC_DIST_DIALOG))
{
if(C_BodyStateContains(self,BS_MOBINTERACT_INTERRUPT))
{
AI_UseMob(self,"BSFIRE",-1);
B_TurnToNpc(self,hero);
B_LookAtNpc(self,hero);
};
AI_StartState(self,ZS_ObservePlayer,0,"");
return LOOP_END;
};
if(!C_BodyStateContains(self,BS_MOBINTERACT_INTERRUPT) && Wld_IsMobAvailable(self,"BSFIRE"))
{
AI_UseMob(self,"BSFIRE",1);
};
return LOOP_CONTINUE;
};
func void ZS_Smith_Fire_End()
{
b_staminainvent();
self.aivar[AIV_MM_EatGroundStart] = FALSE;
Npc_RemoveInvItems(self,ItMi_AnvilPliers,1);
AI_UseMob(self,"BSFIRE",-1);
};
| D |
module state.render_state;
import derelict.sdl2.sdl;
import derelict.sdl2.ttf;
import std.format;
import misc.resources;
import types;
import render_utils;
static this() {
DerelictSDL2.load();
}
class RenderState {
RenderDim windowDimensions = RenderDim(1200, 800);
SDL_Window *window = null;
SDL_Renderer *renderer = null;
bool debugRender = false;
double scale = 1;
TTF_Font *debugTextFont = null;
void init() {
// set up sdl
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_GAMECONTROLLER) < 0) {
throw new Exception(
format("SDL_Init failed: %s", SDL_GetError())
);
}
// create game window
window = SDL_CreateWindow(
"Petri dish",
SDL_WINDOWPOS_UNDEFINED,
SDL_WINDOWPOS_UNDEFINED,
windowDimensions.x,
windowDimensions.y,
SDL_WINDOW_SHOWN | SDL_WINDOW_ALLOW_HIGHDPI
);
if (window is null) {
throw new Exception(
format("couldn't create window: %s", SDL_GetError())
);
}
SDL_SetWindowFullscreen(window, SDL_WINDOW_FULLSCREEN_DESKTOP);
SDL_GetWindowSize(
window,
&windowDimensions.x,
&windowDimensions.y
);
// determine the scale we're working at
int x, y;
SDL_GL_GetDrawableSize(window, &x, &y);
auto xScale = 1. * x / windowDimensions.x;
auto yScale = 1. * y / windowDimensions.y;
assert(xScale == yScale);
scale = xScale;
// initialize the renderer
renderer = SDL_CreateRenderer(window, -1, 0);
SDL_RenderSetScale(renderer, scale, scale);
SDL_SetRenderDrawBlendMode(renderer, SDL_BLENDMODE_BLEND);
// set up sdl_ttf
DerelictSDL2ttf.load();
if (TTF_Init() != 0) {
throw new Exception(
format("failed to init ttf: %s", TTF_GetError())
);
}
// load fonts
debugTextFont = TTF_OpenFont(
getResourcePath("monaco.ttf").dup.ptr,
10
);
if (debugTextFont is null) {
throw new Exception("debug text font not present");
}
}
}
| D |
// **************************************************
// EXIT
// **************************************************
instance Info_Kharim_Exit (C_INFO)
{
npc = Sld_729_Kharim;
nr = 999;
condition = Info_Kharim_Exit_Condition;
information = Info_Kharim_Exit_Info;
permanent = 1;
description = DIALOG_ENDE;
};
FUNC INT Info_Kharim_Exit_Condition()
{
return 1;
};
func VOID Info_Kharim_Exit_Info()
{
AI_StopProcessInfos ( self );
};
// **************************************************
// Was machst du hier?
// **************************************************
instance Info_Kharim_What(C_INFO)
{
npc = Sld_729_Kharim;
nr = 1;
condition = Info_Kharim_What_Condition;
information = Info_Kharim_What_Info;
permanent = 0;
description = "I'm new here. Who are you?";
};
FUNC INT Info_Kharim_What_Condition()
{
return 1;
};
func VOID Info_Kharim_What_Info()
{
AI_Output (other, self,"Info_Kharim_What_15_00"); //I'm new here. Who are you?
AI_Output (self, other,"Info_Kharim_What_09_01"); //I'm Kharim! You must have just been booted in here - or else you'd have heard of me!
AI_Output (self, other,"Info_Kharim_What_09_02"); //I'm the best fighter this damned camp has ever seen.
};
// **************************************
// Fordern
// **************************************
var int Kharim_Charged;
// **************************************
instance Info_Kharim_Charge(C_INFO)
{
npc = Sld_729_Kharim;
nr = 2;
condition = Info_Kharim_Charge_Condition;
information = Info_Kharim_Charge_Info;
permanent = 1;
description = "I'll challenge you! Let's go to the arena!";
};
FUNC INT Info_Kharim_Charge_Condition()
{
if ( Npc_KnowsInfo (hero,DIA_Scatty_JoinOC) && Npc_KnowsInfo(hero,Info_Kharim_What) && (Kharim_Charged != TRUE) && (Kapitel <= 1) ) // Kapitelfix ***Björn***
{
return 1;
};
};
func VOID Info_Kharim_Charge_Info()
{
AI_Output (other, self,"Info_Kharim_Charge_15_00"); //I'll challenge you! Let's go to the arena!
AI_Output (self, other,"Info_Kharim_Charge_09_01"); //YOU?! I'll have you for breakfast, kid!
AI_Output (self, other,"Info_Kharim_Charge_09_02"); //Do yourself a favor and get lost!
Info_ClearChoices (Info_Kharim_Charge );
Info_AddChoice (Info_Kharim_Charge,"Okay, okay, let's forget about it.",Info_Kharim_Charge_BACK);
Info_AddChoice (Info_Kharim_Charge,"So you don't get hurt, you coward?!",Info_Kharim_Charge_Insult);
};
func void Info_Kharim_Charge_BACK()
{
AI_Output (other, self,"Info_Kharim_Charge_BACK_15_00"); //Okay, okay, let's forget about it.
AI_StopProcessInfos (self);
};
// --------------------------------------------------------------------------------------
func void Info_Kharim_Charge_Insult()
{
AI_Output (other, self,"Info_Kharim_Charge_Insult_15_00"); //So you don't get hurt, you coward?!
AI_Output (self, other,"Info_Kharim_Charge_Insult_09_01"); //Don't you have any better ideas, boy?
Info_ClearChoices (Info_Kharim_Charge );
Info_AddChoice (Info_Kharim_Charge,"You're only here to get a chance to kiss Gomez' ass!",Info_Kharim_Charge_Insult_GomezAss);
Info_AddChoice (Info_Kharim_Charge,"How about: Your mother's a sheep-shagging...",Info_Kharim_Charge_Insult_Goats);
Info_AddChoice (Info_Kharim_Charge,"No, there's nothing I can think of you'd actually understand.",Info_Kharim_Charge_Insult_Stupid);
Info_AddChoice (Info_Kharim_Charge,"You've got thin arms, but then I saw your ugly mug.",Info_Kharim_Charge_Insult_Face);
Info_AddChoice (Info_Kharim_Charge,"Okay, okay, let's forget about it.",Info_Kharim_Charge_BACK);
};
// --------------------------------------------------------------------------------------
func void Info_Kharim_Charge_Insult_Goats()
{
AI_Output (other, self,"Info_Kharim_Charge_Insult_Goats_15_00"); //How about: Your mother's a sheep-shagging...
AI_Output (self, other,"Info_Kharim_Charge_Insult_Goats_09_01"); //Yeah, I guess she is...
};
func void Info_Kharim_Charge_Insult_GomezAss()
{
AI_Output (other, self,"Info_Kharim_Charge_Insult_GomezAss_15_00"); //You're only here to get a chance to kiss Gomez' ass!
AI_Output (self, other,"Info_Kharim_Charge_Insult_GomezAss_09_01"); //WHAT!?! You worm! You know nothing about us! The New Camp is INDEPENDENT from all that shit!
AI_Output (self, other,"Info_Kharim_Charge_Insult_GomezAss_09_02"); //And apart from that there's only one reason why I'm here: So I can beat the brains out of smart asses like you.
AI_Output (self, other,"Info_Kharim_Charge_Insult_GomezAss_09_03"); //It'll be my pleasure to do the same to YOU! Your destiny is awaiting you in the arena!
Kharim_Charged = TRUE;
Info_ClearChoices (Info_Kharim_Charge );
AI_StopProcessInfos ( self );
Npc_ExchangeRoutine(self,"GUIDE");
};
func void Info_Kharim_Charge_Insult_Stupid()
{
AI_Output (other, self,"Info_Kharim_Charge_Insult_Stupid_15_00"); //Let's think about it: No, there's nothing I can think of you'd actually understand.
AI_Output (self, other,"Info_Kharim_Charge_Insult_Stupid_09_01"); //Maybe you should give it a try.
};
func void Info_Kharim_Charge_Insult_Face()
{
AI_Output (other, self,"Info_Kharim_Charge_Insult_Face_15_00"); //At first I wanted to say something about your thin arms, but then I saw your ugly mug.
AI_Output (self, other,"Info_Kharim_Charge_Insult_Face_09_01"); //I think this is your last chance to finally GET LOST!
};
// **************************************
// IN DER ARENA
// **************************************
instance Info_Kharim_InArena (C_INFO)
{
npc = Sld_729_Kharim;
nr = 1;
condition = Info_Kharim_InArena_Condition;
information = Info_Kharim_InArena_Info;
permanent = 0;
important = 1;
};
FUNC INT Info_Kharim_InArena_Condition()
{
if ( (Kharim_Charged == TRUE) && (Npc_GetDistToWp (hero,"OCR_ARENABATTLE_TRAIN") < 500) )
{
return 1;
};
};
func VOID Info_Kharim_InArena_Info()
{
if (Kapitel <= 1) // Kapitelfix ***Björn***
{
AI_Output (self, other,"Info_Kharim_InArena_09_00"); //Pain is a question of willpower!
AI_StopProcessInfos ( self );
Npc_ExchangeRoutine(self,"START");
Npc_SetTarget(self,other);
AI_StartState(self,ZS_ATTACK,1,"");
}
else
{
AI_Output (self, other,"SVM_9_LetsForgetOurLittleFight"); //Von mir aus können wir unseren Streit vergessen ...
AI_StopProcessInfos ( self );
Npc_ExchangeRoutine(self,"START");
};
};
| D |
/**
This module is a submodule of $(MREF std, range).
It provides basic range functionality by defining several templates for testing
whether a given object is a _range, and what kind of _range it is:
$(BOOKTABLE ,
$(TR $(TD $(D $(LREF isInputRange)))
$(TD Tests if something is an $(I input _range), defined to be
something from which one can sequentially read data using the
primitives $(D front), $(D popFront), and $(D empty).
))
$(TR $(TD $(D $(LREF isOutputRange)))
$(TD Tests if something is an $(I output _range), defined to be
something to which one can sequentially write data using the
$(D $(LREF put)) primitive.
))
$(TR $(TD $(D $(LREF isForwardRange)))
$(TD Tests if something is a $(I forward _range), defined to be an
input _range with the additional capability that one can save one's
current position with the $(D save) primitive, thus allowing one to
iterate over the same _range multiple times.
))
$(TR $(TD $(D $(LREF isBidirectionalRange)))
$(TD Tests if something is a $(I bidirectional _range), that is, a
forward _range that allows reverse traversal using the primitives $(D
back) and $(D popBack).
))
$(TR $(TD $(D $(LREF isRandomAccessRange)))
$(TD Tests if something is a $(I random access _range), which is a
bidirectional _range that also supports the array subscripting
operation via the primitive $(D opIndex).
))
)
It also provides number of templates that test for various _range capabilities:
$(BOOKTABLE ,
$(TR $(TD $(D $(LREF hasMobileElements)))
$(TD Tests if a given _range's elements can be moved around using the
primitives $(D moveFront), $(D moveBack), or $(D moveAt).
))
$(TR $(TD $(D $(LREF ElementType)))
$(TD Returns the element type of a given _range.
))
$(TR $(TD $(D $(LREF ElementEncodingType)))
$(TD Returns the encoding element type of a given _range.
))
$(TR $(TD $(D $(LREF hasSwappableElements)))
$(TD Tests if a _range is a forward _range with swappable elements.
))
$(TR $(TD $(D $(LREF hasAssignableElements)))
$(TD Tests if a _range is a forward _range with mutable elements.
))
$(TR $(TD $(D $(LREF hasLvalueElements)))
$(TD Tests if a _range is a forward _range with elements that can be
passed by reference and have their address taken.
))
$(TR $(TD $(D $(LREF hasLength)))
$(TD Tests if a given _range has the $(D length) attribute.
))
$(TR $(TD $(D $(LREF isInfinite)))
$(TD Tests if a given _range is an $(I infinite _range).
))
$(TR $(TD $(D $(LREF hasSlicing)))
$(TD Tests if a given _range supports the array slicing operation $(D
R[x..y]).
))
)
Finally, it includes some convenience functions for manipulating ranges:
$(BOOKTABLE ,
$(TR $(TD $(D $(LREF popFrontN)))
$(TD Advances a given _range by up to $(I n) elements.
))
$(TR $(TD $(D $(LREF popBackN)))
$(TD Advances a given bidirectional _range from the right by up to
$(I n) elements.
))
$(TR $(TD $(D $(LREF popFrontExactly)))
$(TD Advances a given _range by up exactly $(I n) elements.
))
$(TR $(TD $(D $(LREF popBackExactly)))
$(TD Advances a given bidirectional _range from the right by exactly
$(I n) elements.
))
$(TR $(TD $(D $(LREF moveFront)))
$(TD Removes the front element of a _range.
))
$(TR $(TD $(D $(LREF moveBack)))
$(TD Removes the back element of a bidirectional _range.
))
$(TR $(TD $(D $(LREF moveAt)))
$(TD Removes the $(I i)'th element of a random-access _range.
))
$(TR $(TD $(D $(LREF walkLength)))
$(TD Computes the length of any _range in O(n) time.
))
)
Source: $(PHOBOSSRC std/range/_primitives.d)
License: $(HTTP boost.org/LICENSE_1_0.txt, Boost License 1.0).
Authors: $(HTTP erdani.com, Andrei Alexandrescu), David Simcha,
and Jonathan M Davis. Credit for some of the ideas in building this module goes
to $(HTTP fantascienza.net/leonardo/so/, Leonardo Maffi).
*/
module std.range.primitives;
import std.traits;
/**
Returns $(D true) if $(D R) is an input range. An input range must
define the primitives $(D empty), $(D popFront), and $(D front). The
following code should compile for any input range.
----
R r; // can define a range object
if (r.empty) {} // can test for empty
r.popFront(); // can invoke popFront()
auto h = r.front; // can get the front of the range of non-void type
----
The following are rules of input ranges are assumed to hold true in all
Phobos code. These rules are not checkable at compile-time, so not conforming
to these rules when writing ranges or range based code will result in
undefined behavior.
$(UL
$(LI `r.empty` returns `false` if and only if there is more data
available in the range.)
$(LI `r.empty` evaluated multiple times, without calling
`r.popFront`, or otherwise mutating the range object or the
underlying data, yields the same result for every evaluation.)
$(LI `r.front` returns the current element in the range.
It may return by value or by reference.)
$(LI `r.front` can be legally evaluated if and only if evaluating
`r.empty` has, or would have, equaled `false`.)
$(LI `r.front` evaluated multiple times, without calling
`r.popFront`, or otherwise mutating the range object or the
underlying data, yields the same result for every evaluation.)
$(LI `r.popFront` advances to the next element in the range.)
$(LI `r.popFront` can be called if and only if evaluating `r.empty`
has, or would have, equaled `false`.)
)
Also, note that Phobos code assumes that the primitives `r.front` and
`r.empty` are $(BIGOH 1) time complexity wise or "cheap" in terms of
running time. $(BIGOH) statements in the documentation of range functions
are made with this assumption.
Params:
R = type to be tested
Returns:
true if R is an InputRange, false if not
*/
template isInputRange(R)
{
enum bool isInputRange = is(typeof(
(inout int = 0)
{
R r = R.init; // can define a range object
if (r.empty) {} // can test for empty
r.popFront(); // can invoke popFront()
auto h = r.front; // can get the front of the range
}));
}
///
@safe unittest
{
struct A {}
struct B
{
void popFront();
@property bool empty();
@property int front();
}
static assert(!isInputRange!A);
static assert( isInputRange!B);
static assert( isInputRange!(int[]));
static assert( isInputRange!(char[]));
static assert(!isInputRange!(char[4]));
static assert( isInputRange!(inout(int)[]));
}
/+
puts the whole raw element $(D e) into $(D r). doPut will not attempt to
iterate, slice or transcode $(D e) in any way shape or form. It will $(B only)
call the correct primitive ($(D r.put(e)), $(D r.front = e) or
$(D r(0)) once.
This can be important when $(D e) needs to be placed in $(D r) unchanged.
Furthermore, it can be useful when working with $(D InputRange)s, as doPut
guarantees that no more than a single element will be placed.
+/
private void doPut(R, E)(ref R r, auto ref E e)
{
static if (is(PointerTarget!R == struct))
enum usingPut = hasMember!(PointerTarget!R, "put");
else
enum usingPut = hasMember!(R, "put");
static if (usingPut)
{
static assert(is(typeof(r.put(e))),
"Cannot put a " ~ E.stringof ~ " into a " ~ R.stringof ~ ".");
r.put(e);
}
else static if (isInputRange!R)
{
static assert(is(typeof(r.front = e)),
"Cannot put a " ~ E.stringof ~ " into a " ~ R.stringof ~ ".");
r.front = e;
r.popFront();
}
else static if (is(typeof(r(e))))
{
r(e);
}
else
{
static assert (false,
"Cannot put a " ~ E.stringof ~ " into a " ~ R.stringof ~ ".");
}
}
@safe unittest
{
static assert (!isNativeOutputRange!(int, int));
static assert ( isNativeOutputRange!(int[], int));
static assert (!isNativeOutputRange!(int[][], int));
static assert (!isNativeOutputRange!(int, int[]));
static assert (!isNativeOutputRange!(int[], int[]));
static assert ( isNativeOutputRange!(int[][], int[]));
static assert (!isNativeOutputRange!(int, int[][]));
static assert (!isNativeOutputRange!(int[], int[][]));
static assert (!isNativeOutputRange!(int[][], int[][]));
static assert (!isNativeOutputRange!(int[4], int));
static assert ( isNativeOutputRange!(int[4][], int)); //Scary!
static assert ( isNativeOutputRange!(int[4][], int[4]));
static assert (!isNativeOutputRange!( char[], char));
static assert (!isNativeOutputRange!( char[], dchar));
static assert ( isNativeOutputRange!(dchar[], char));
static assert ( isNativeOutputRange!(dchar[], dchar));
}
/++
Outputs $(D e) to $(D r). The exact effect is dependent upon the two
types. Several cases are accepted, as described below. The code snippets
are attempted in order, and the first to compile "wins" and gets
evaluated.
In this table "doPut" is a method that places $(D e) into $(D r), using the
correct primitive: $(D r.put(e)) if $(D R) defines $(D put), $(D r.front = e)
if $(D r) is an input range (followed by $(D r.popFront())), or $(D r(e))
otherwise.
$(BOOKTABLE ,
$(TR
$(TH Code Snippet)
$(TH Scenario)
)
$(TR
$(TD $(D r.doPut(e);))
$(TD $(D R) specifically accepts an $(D E).)
)
$(TR
$(TD $(D r.doPut([ e ]);))
$(TD $(D R) specifically accepts an $(D E[]).)
)
$(TR
$(TD $(D r.putChar(e);))
$(TD $(D R) accepts some form of string or character. put will
transcode the character $(D e) accordingly.)
)
$(TR
$(TD $(D for (; !e.empty; e.popFront()) put(r, e.front);))
$(TD Copying range $(D E) into $(D R).)
)
)
Tip: $(D put) should $(I not) be used "UFCS-style", e.g. $(D r.put(e)).
Doing this may call $(D R.put) directly, by-passing any transformation
feature provided by $(D Range.put). $(D put(r, e)) is prefered.
+/
void put(R, E)(ref R r, E e)
{
//First level: simply straight up put.
static if (is(typeof(doPut(r, e))))
{
doPut(r, e);
}
//Optional optimization block for straight up array to array copy.
else static if (isDynamicArray!R && !isNarrowString!R && isDynamicArray!E && is(typeof(r[] = e[])))
{
immutable len = e.length;
r[0 .. len] = e[];
r = r[len .. $];
}
//Accepts E[] ?
else static if (is(typeof(doPut(r, [e]))) && !isDynamicArray!R)
{
if (__ctfe)
{
E[1] arr = [e];
doPut(r, arr[]);
}
else
doPut(r, (ref e) @trusted { return (&e)[0..1]; }(e));
}
//special case for char to string.
else static if (isSomeChar!E && is(typeof(putChar(r, e))))
{
putChar(r, e);
}
//Extract each element from the range
//We can use "put" here, so we can recursively test a RoR of E.
else static if (isInputRange!E && is(typeof(put(r, e.front))))
{
//Special optimization: If E is a narrow string, and r accepts characters no-wider than the string's
//Then simply feed the characters 1 by 1.
static if (isNarrowString!E && (
(is(E : const char[]) && is(typeof(doPut(r, char.max))) && !is(typeof(doPut(r, dchar.max))) &&
!is(typeof(doPut(r, wchar.max)))) ||
(is(E : const wchar[]) && is(typeof(doPut(r, wchar.max))) && !is(typeof(doPut(r, dchar.max)))) ) )
{
foreach (c; e)
doPut(r, c);
}
else
{
for (; !e.empty; e.popFront())
put(r, e.front);
}
}
else
{
static assert (false, "Cannot put a " ~ E.stringof ~ " into a " ~ R.stringof ~ ".");
}
}
@safe pure nothrow @nogc unittest
{
static struct R() { void put(in char[]) {} }
R!() r;
put(r, 'a');
}
//Helper function to handle chars as quickly and as elegantly as possible
//Assumes r.put(e)/r(e) has already been tested
private void putChar(R, E)(ref R r, E e)
if (isSomeChar!E)
{
////@@@9186@@@: Can't use (E[]).init
ref const( char)[] cstringInit();
ref const(wchar)[] wstringInit();
ref const(dchar)[] dstringInit();
enum csCond = !isDynamicArray!R && is(typeof(doPut(r, cstringInit())));
enum wsCond = !isDynamicArray!R && is(typeof(doPut(r, wstringInit())));
enum dsCond = !isDynamicArray!R && is(typeof(doPut(r, dstringInit())));
//Use "max" to avoid static type demotion
enum ccCond = is(typeof(doPut(r, char.max)));
enum wcCond = is(typeof(doPut(r, wchar.max)));
//enum dcCond = is(typeof(doPut(r, dchar.max)));
//Fast transform a narrow char into a wider string
static if ((wsCond && E.sizeof < wchar.sizeof) || (dsCond && E.sizeof < dchar.sizeof))
{
enum w = wsCond && E.sizeof < wchar.sizeof;
Select!(w, wchar, dchar) c = e;
typeof(c)[1] arr = [c];
doPut(r, arr[]);
}
//Encode a wide char into a narrower string
else static if (wsCond || csCond)
{
import std.utf : encode;
/+static+/ Select!(wsCond, wchar[2], char[4]) buf; //static prevents purity.
doPut(r, buf[0 .. encode(buf, e)]);
}
//Slowly encode a wide char into a series of narrower chars
else static if (wcCond || ccCond)
{
import std.encoding : encode;
alias C = Select!(wcCond, wchar, char);
encode!(C, R)(e, r);
}
else
{
static assert (false, "Cannot put a " ~ E.stringof ~ " into a " ~ R.stringof ~ ".");
}
}
pure unittest
{
auto f = delegate (const(char)[]) {};
putChar(f, cast(dchar)'a');
}
@safe pure unittest
{
static struct R() { void put(in char[]) {} }
R!() r;
putChar(r, 'a');
}
unittest
{
struct A {}
static assert(!isInputRange!(A));
struct B
{
void put(int) {}
}
B b;
put(b, 5);
}
unittest
{
int[] a = [1, 2, 3], b = [10, 20];
auto c = a;
put(a, b);
assert(c == [10, 20, 3]);
assert(a == [3]);
}
unittest
{
int[] a = new int[10];
int b;
static assert(isInputRange!(typeof(a)));
put(a, b);
}
unittest
{
void myprint(in char[] s) { }
auto r = &myprint;
put(r, 'a');
}
unittest
{
int[] a = new int[10];
static assert(!__traits(compiles, put(a, 1.0L)));
put(a, 1);
assert(a.length == 9);
/*
* a[0] = 65; // OK
* a[0] = 'A'; // OK
* a[0] = "ABC"[0]; // OK
* put(a, "ABC"); // OK
*/
put(a, "ABC");
assert(a.length == 6);
}
unittest
{
char[] a = new char[10];
static assert(!__traits(compiles, put(a, 1.0L)));
static assert(!__traits(compiles, put(a, 1)));
// char[] is NOT output range.
static assert(!__traits(compiles, put(a, 'a')));
static assert(!__traits(compiles, put(a, "ABC")));
}
unittest
{
int[][] a = new int[][10];
int[] b = new int[10];
int c;
put(b, c);
assert(b.length == 9);
put(a, b);
assert(a.length == 9);
static assert(!__traits(compiles, put(a, c)));
}
unittest
{
int[][] a = new int[][](3);
int[] b = [1];
auto aa = a;
put(aa, b);
assert(aa == [[], []]);
assert(a == [[1], [], []]);
int[][3] c = [2];
aa = a;
put(aa, c[]);
assert(aa.empty);
assert(a == [[2], [2], [2]]);
}
unittest
{
// Test fix for bug 7476.
struct LockingTextWriter
{
void put(dchar c){}
}
struct RetroResult
{
bool end = false;
@property bool empty() const { return end; }
@property dchar front(){ return 'a'; }
void popFront(){ end = true; }
}
LockingTextWriter w;
RetroResult r;
put(w, r);
}
unittest
{
import std.conv : to;
import std.meta : AliasSeq;
import std.typecons : tuple;
static struct PutC(C)
{
string result;
void put(const(C) c) { result ~= to!string((&c)[0..1]); }
}
static struct PutS(C)
{
string result;
void put(const(C)[] s) { result ~= to!string(s); }
}
static struct PutSS(C)
{
string result;
void put(const(C)[][] ss)
{
foreach (s; ss)
result ~= to!string(s);
}
}
PutS!char p;
putChar(p, cast(dchar)'a');
//Source Char
foreach (SC; AliasSeq!(char, wchar, dchar))
{
SC ch = 'I';
dchar dh = '♥';
immutable(SC)[] s = "日本語!";
immutable(SC)[][] ss = ["日本語", "が", "好き", "ですか", "?"];
//Target Char
foreach (TC; AliasSeq!(char, wchar, dchar))
{
//Testing PutC and PutS
foreach (Type; AliasSeq!(PutC!TC, PutS!TC))
(){ // avoid slow optimizations for large functions @@@BUG@@@ 2396
Type type;
auto sink = new Type();
//Testing put and sink
foreach (value ; tuple(type, sink))
{
put(value, ch);
assert(value.result == "I");
put(value, dh);
assert(value.result == "I♥");
put(value, s);
assert(value.result == "I♥日本語!");
put(value, ss);
assert(value.result == "I♥日本語!日本語が好きですか?");
}
}();
}
}
}
unittest
{
static struct CharRange
{
char c;
enum empty = false;
void popFront(){}
ref char front() return @property
{
return c;
}
}
CharRange c;
put(c, cast(dchar)'H');
put(c, "hello"d);
}
unittest
{
// issue 9823
const(char)[] r;
void delegate(const(char)[]) dg = (s) { r = s; };
put(dg, ["ABC"]);
assert(r == "ABC");
}
unittest
{
// issue 10571
import std.format;
string buf;
formattedWrite((in char[] s) { buf ~= s; }, "%s", "hello");
assert(buf == "hello");
}
unittest
{
import std.format;
import std.meta : AliasSeq;
struct PutC(C)
{
void put(C){}
}
struct PutS(C)
{
void put(const(C)[]){}
}
struct CallC(C)
{
void opCall(C){}
}
struct CallS(C)
{
void opCall(const(C)[]){}
}
struct FrontC(C)
{
enum empty = false;
auto front()@property{return C.init;}
void front(C)@property{}
void popFront(){}
}
struct FrontS(C)
{
enum empty = false;
auto front()@property{return C[].init;}
void front(const(C)[])@property{}
void popFront(){}
}
void foo()
{
foreach (C; AliasSeq!(char, wchar, dchar))
{
formattedWrite((C c){}, "", 1, 'a', cast(wchar)'a', cast(dchar)'a', "a"c, "a"w, "a"d);
formattedWrite((const(C)[]){}, "", 1, 'a', cast(wchar)'a', cast(dchar)'a', "a"c, "a"w, "a"d);
formattedWrite(PutC!C(), "", 1, 'a', cast(wchar)'a', cast(dchar)'a', "a"c, "a"w, "a"d);
formattedWrite(PutS!C(), "", 1, 'a', cast(wchar)'a', cast(dchar)'a', "a"c, "a"w, "a"d);
CallC!C callC;
CallS!C callS;
formattedWrite(callC, "", 1, 'a', cast(wchar)'a', cast(dchar)'a', "a"c, "a"w, "a"d);
formattedWrite(callS, "", 1, 'a', cast(wchar)'a', cast(dchar)'a', "a"c, "a"w, "a"d);
formattedWrite(FrontC!C(), "", 1, 'a', cast(wchar)'a', cast(dchar)'a', "a"c, "a"w, "a"d);
formattedWrite(FrontS!C(), "", 1, 'a', cast(wchar)'a', cast(dchar)'a', "a"c, "a"w, "a"d);
}
formattedWrite((dchar[]).init, "", 1, 'a', cast(wchar)'a', cast(dchar)'a', "a"c, "a"w, "a"d);
}
}
/+
Returns $(D true) if $(D R) is a native output range for elements of type
$(D E). An output range is defined functionally as a range that
supports the operation $(D doPut(r, e)) as defined above. if $(D doPut(r, e))
is valid, then $(D put(r,e)) will have the same behavior.
The two guarantees isNativeOutputRange gives over the larger $(D isOutputRange)
are:
1: $(D e) is $(B exactly) what will be placed (not $(D [e]), for example).
2: if $(D E) is a non $(empty) $(D InputRange), then placing $(D e) is
guaranteed to not overflow the range.
+/
package(std) template isNativeOutputRange(R, E)
{
enum bool isNativeOutputRange = is(typeof(
(inout int = 0)
{
R r = void;
E e;
doPut(r, e);
}));
}
///
@safe unittest
{
int[] r = new int[](4);
static assert(isInputRange!(int[]));
static assert( isNativeOutputRange!(int[], int));
static assert(!isNativeOutputRange!(int[], int[]));
static assert( isOutputRange!(int[], int[]));
if (!r.empty)
put(r, 1); //guaranteed to succeed
if (!r.empty)
put(r, [1, 2]); //May actually error out.
}
/++
Returns $(D true) if $(D R) is an output range for elements of type
$(D E). An output range is defined functionally as a range that
supports the operation $(D put(r, e)) as defined above.
+/
template isOutputRange(R, E)
{
enum bool isOutputRange = is(typeof(
(inout int = 0)
{
R r = R.init;
E e = E.init;
put(r, e);
}));
}
///
@safe unittest
{
void myprint(in char[] s) { }
static assert(isOutputRange!(typeof(&myprint), char));
static assert(!isOutputRange!(char[], char));
static assert( isOutputRange!(dchar[], wchar));
static assert( isOutputRange!(dchar[], dchar));
}
@safe unittest
{
import std.array;
import std.stdio : writeln;
auto app = appender!string();
string s;
static assert( isOutputRange!(Appender!string, string));
static assert( isOutputRange!(Appender!string*, string));
static assert(!isOutputRange!(Appender!string, int));
static assert(!isOutputRange!(wchar[], wchar));
static assert( isOutputRange!(dchar[], char));
static assert( isOutputRange!(dchar[], string));
static assert( isOutputRange!(dchar[], wstring));
static assert( isOutputRange!(dchar[], dstring));
static assert(!isOutputRange!(const(int)[], int));
static assert(!isOutputRange!(inout(int)[], int));
}
/**
Returns $(D true) if $(D R) is a forward range. A forward range is an
input range $(D r) that can save "checkpoints" by saving $(D r.save)
to another value of type $(D R). Notable examples of input ranges that
are $(I not) forward ranges are file/socket ranges; copying such a
range will not save the position in the stream, and they most likely
reuse an internal buffer as the entire stream does not sit in
memory. Subsequently, advancing either the original or the copy will
advance the stream, so the copies are not independent.
The following code should compile for any forward range.
----
static assert(isInputRange!R);
R r1;
auto s1 = r1.save;
static assert (is(typeof(s1) == R));
----
Saving a range is not duplicating it; in the example above, $(D r1)
and $(D r2) still refer to the same underlying data. They just
navigate that data independently.
The semantics of a forward range (not checkable during compilation)
are the same as for an input range, with the additional requirement
that backtracking must be possible by saving a copy of the range
object with $(D save) and using it later.
*/
template isForwardRange(R)
{
enum bool isForwardRange = isInputRange!R && is(typeof(
(inout int = 0)
{
R r1 = R.init;
// NOTE: we cannot check typeof(r1.save) directly
// because typeof may not check the right type there, and
// because we want to ensure the range can be copied.
auto s1 = r1.save;
static assert (is(typeof(s1) == R));
}));
}
///
@safe unittest
{
static assert(!isForwardRange!(int));
static assert( isForwardRange!(int[]));
static assert( isForwardRange!(inout(int)[]));
}
@safe unittest
{
// BUG 14544
struct R14544
{
int front() { return 0;}
void popFront() {}
bool empty() { return false; }
R14544 save() {return this;}
}
static assert( isForwardRange!R14544 );
}
/**
Returns $(D true) if $(D R) is a bidirectional range. A bidirectional
range is a forward range that also offers the primitives $(D back) and
$(D popBack). The following code should compile for any bidirectional
range.
The semantics of a bidirectional range (not checkable during
compilation) are assumed to be the following ($(D r) is an object of
type $(D R)):
$(UL $(LI $(D r.back) returns (possibly a reference to) the last
element in the range. Calling $(D r.back) is allowed only if calling
$(D r.empty) has, or would have, returned $(D false).))
*/
template isBidirectionalRange(R)
{
enum bool isBidirectionalRange = isForwardRange!R && is(typeof(
(inout int = 0)
{
R r = R.init;
r.popBack();
auto t = r.back;
auto w = r.front;
static assert(is(typeof(t) == typeof(w)));
}));
}
///
unittest
{
alias R = int[];
R r = [0,1];
static assert(isForwardRange!R); // is forward range
r.popBack(); // can invoke popBack
auto t = r.back; // can get the back of the range
auto w = r.front;
static assert(is(typeof(t) == typeof(w))); // same type for front and back
}
@safe unittest
{
struct A {}
struct B
{
void popFront();
@property bool empty();
@property int front();
}
struct C
{
@property bool empty();
@property C save();
void popFront();
@property int front();
void popBack();
@property int back();
}
static assert(!isBidirectionalRange!(A));
static assert(!isBidirectionalRange!(B));
static assert( isBidirectionalRange!(C));
static assert( isBidirectionalRange!(int[]));
static assert( isBidirectionalRange!(char[]));
static assert( isBidirectionalRange!(inout(int)[]));
}
/**
Returns $(D true) if $(D R) is a random-access range. A random-access
range is a bidirectional range that also offers the primitive $(D
opIndex), OR an infinite forward range that offers $(D opIndex). In
either case, the range must either offer $(D length) or be
infinite. The following code should compile for any random-access
range.
The semantics of a random-access range (not checkable during
compilation) are assumed to be the following ($(D r) is an object of
type $(D R)): $(UL $(LI $(D r.opIndex(n)) returns a reference to the
$(D n)th element in the range.))
Although $(D char[]) and $(D wchar[]) (as well as their qualified
versions including $(D string) and $(D wstring)) are arrays, $(D
isRandomAccessRange) yields $(D false) for them because they use
variable-length encodings (UTF-8 and UTF-16 respectively). These types
are bidirectional ranges only.
*/
template isRandomAccessRange(R)
{
enum bool isRandomAccessRange = is(typeof(
(inout int = 0)
{
static assert(isBidirectionalRange!R ||
isForwardRange!R && isInfinite!R);
R r = R.init;
auto e = r[1];
auto f = r.front;
static assert(is(typeof(e) == typeof(f)));
static assert(!isNarrowString!R);
static assert(hasLength!R || isInfinite!R);
static if (is(typeof(r[$])))
{
static assert(is(typeof(f) == typeof(r[$])));
static if (!isInfinite!R)
static assert(is(typeof(f) == typeof(r[$ - 1])));
}
}));
}
///
unittest
{
alias R = int[];
// range is finite and bidirectional or infinite and forward.
static assert(isBidirectionalRange!R ||
isForwardRange!R && isInfinite!R);
R r = [0,1];
auto e = r[1]; // can index
auto f = r.front;
static assert(is(typeof(e) == typeof(f))); // same type for indexed and front
static assert(!isNarrowString!R); // narrow strings cannot be indexed as ranges
static assert(hasLength!R || isInfinite!R); // must have length or be infinite
// $ must work as it does with arrays if opIndex works with $
static if (is(typeof(r[$])))
{
static assert(is(typeof(f) == typeof(r[$])));
// $ - 1 doesn't make sense with infinite ranges but needs to work
// with finite ones.
static if (!isInfinite!R)
static assert(is(typeof(f) == typeof(r[$ - 1])));
}
}
@safe unittest
{
struct A {}
struct B
{
void popFront();
@property bool empty();
@property int front();
}
struct C
{
void popFront();
@property bool empty();
@property int front();
void popBack();
@property int back();
}
struct D
{
@property bool empty();
@property D save();
@property int front();
void popFront();
@property int back();
void popBack();
ref int opIndex(uint);
@property size_t length();
alias opDollar = length;
//int opSlice(uint, uint);
}
struct E
{
bool empty();
E save();
int front();
void popFront();
int back();
void popBack();
ref int opIndex(uint);
size_t length();
alias opDollar = length;
//int opSlice(uint, uint);
}
static assert(!isRandomAccessRange!(A));
static assert(!isRandomAccessRange!(B));
static assert(!isRandomAccessRange!(C));
static assert( isRandomAccessRange!(D));
static assert( isRandomAccessRange!(E));
static assert( isRandomAccessRange!(int[]));
static assert( isRandomAccessRange!(inout(int)[]));
}
@safe unittest
{
// Test fix for bug 6935.
struct R
{
@disable this();
@property bool empty() const { return false; }
@property int front() const { return 0; }
void popFront() {}
@property R save() { return this; }
@property int back() const { return 0; }
void popBack(){}
int opIndex(size_t n) const { return 0; }
@property size_t length() const { return 0; }
alias opDollar = length;
void put(int e){ }
}
static assert(isInputRange!R);
static assert(isForwardRange!R);
static assert(isBidirectionalRange!R);
static assert(isRandomAccessRange!R);
static assert(isOutputRange!(R, int));
}
/**
Returns $(D true) iff $(D R) is an input range that supports the
$(D moveFront) primitive, as well as $(D moveBack) and $(D moveAt) if it's a
bidirectional or random access range. These may be explicitly implemented, or
may work via the default behavior of the module level functions $(D moveFront)
and friends. The following code should compile for any range
with mobile elements.
----
alias E = ElementType!R;
R r;
static assert(isInputRange!R);
static assert(is(typeof(moveFront(r)) == E));
static if (isBidirectionalRange!R)
static assert(is(typeof(moveBack(r)) == E));
static if (isRandomAccessRange!R)
static assert(is(typeof(moveAt(r, 0)) == E));
----
*/
template hasMobileElements(R)
{
enum bool hasMobileElements = isInputRange!R && is(typeof(
(inout int = 0)
{
alias E = ElementType!R;
R r = R.init;
static assert(is(typeof(moveFront(r)) == E));
static if (isBidirectionalRange!R)
static assert(is(typeof(moveBack(r)) == E));
static if (isRandomAccessRange!R)
static assert(is(typeof(moveAt(r, 0)) == E));
}));
}
///
@safe unittest
{
import std.algorithm.iteration : map;
import std.range : iota, repeat;
static struct HasPostblit
{
this(this) {}
}
auto nonMobile = map!"a"(repeat(HasPostblit.init));
static assert(!hasMobileElements!(typeof(nonMobile)));
static assert( hasMobileElements!(int[]));
static assert( hasMobileElements!(inout(int)[]));
static assert( hasMobileElements!(typeof(iota(1000))));
static assert( hasMobileElements!( string));
static assert( hasMobileElements!(dstring));
static assert( hasMobileElements!( char[]));
static assert( hasMobileElements!(dchar[]));
}
/**
The element type of $(D R). $(D R) does not have to be a range. The
element type is determined as the type yielded by $(D r.front) for an
object $(D r) of type $(D R). For example, $(D ElementType!(T[])) is
$(D T) if $(D T[]) isn't a narrow string; if it is, the element type is
$(D dchar). If $(D R) doesn't have $(D front), $(D ElementType!R) is
$(D void).
*/
template ElementType(R)
{
static if (is(typeof(R.init.front.init) T))
alias ElementType = T;
else
alias ElementType = void;
}
///
@safe unittest
{
import std.range : iota;
// Standard arrays: returns the type of the elements of the array
static assert(is(ElementType!(int[]) == int));
// Accessing .front retrieves the decoded dchar
static assert(is(ElementType!(char[]) == dchar)); // rvalue
static assert(is(ElementType!(dchar[]) == dchar)); // lvalue
// Ditto
static assert(is(ElementType!(string) == dchar));
static assert(is(ElementType!(dstring) == immutable(dchar)));
// For ranges it gets the type of .front.
auto range = iota(0, 10);
static assert(is(ElementType!(typeof(range)) == int));
}
@safe unittest
{
static assert(is(ElementType!(byte[]) == byte));
static assert(is(ElementType!(wchar[]) == dchar)); // rvalue
static assert(is(ElementType!(wstring) == dchar));
}
@safe unittest
{
enum XYZ : string { a = "foo" }
auto x = XYZ.a.front;
immutable char[3] a = "abc";
int[] i;
void[] buf;
static assert(is(ElementType!(XYZ) == dchar));
static assert(is(ElementType!(typeof(a)) == dchar));
static assert(is(ElementType!(typeof(i)) == int));
static assert(is(ElementType!(typeof(buf)) == void));
static assert(is(ElementType!(inout(int)[]) == inout(int)));
static assert(is(ElementType!(inout(int[])) == inout(int)));
}
@safe unittest
{
static assert(is(ElementType!(int[5]) == int));
static assert(is(ElementType!(int[0]) == int));
static assert(is(ElementType!(char[5]) == dchar));
static assert(is(ElementType!(char[0]) == dchar));
}
@safe unittest //11336
{
static struct S
{
this(this) @disable;
}
static assert(is(ElementType!(S[]) == S));
}
@safe unittest // 11401
{
// ElementType should also work for non-@propety 'front'
struct E { ushort id; }
struct R
{
E front() { return E.init; }
}
static assert(is(ElementType!R == E));
}
/**
The encoding element type of $(D R). For narrow strings ($(D char[]),
$(D wchar[]) and their qualified variants including $(D string) and
$(D wstring)), $(D ElementEncodingType) is the character type of the
string. For all other types, $(D ElementEncodingType) is the same as
$(D ElementType).
*/
template ElementEncodingType(R)
{
static if (is(StringTypeOf!R) && is(R : E[], E))
alias ElementEncodingType = E;
else
alias ElementEncodingType = ElementType!R;
}
///
@safe unittest
{
import std.range : iota;
// internally the range stores the encoded type
static assert(is(ElementEncodingType!(char[]) == char));
static assert(is(ElementEncodingType!(wstring) == immutable(wchar)));
static assert(is(ElementEncodingType!(byte[]) == byte));
auto range = iota(0, 10);
static assert(is(ElementEncodingType!(typeof(range)) == int));
}
@safe unittest
{
static assert(is(ElementEncodingType!(wchar[]) == wchar));
static assert(is(ElementEncodingType!(dchar[]) == dchar));
static assert(is(ElementEncodingType!(string) == immutable(char)));
static assert(is(ElementEncodingType!(dstring) == immutable(dchar)));
static assert(is(ElementEncodingType!(int[]) == int));
}
@safe unittest
{
enum XYZ : string { a = "foo" }
auto x = XYZ.a.front;
immutable char[3] a = "abc";
int[] i;
void[] buf;
static assert(is(ElementType!(XYZ) : dchar));
static assert(is(ElementEncodingType!(char[]) == char));
static assert(is(ElementEncodingType!(string) == immutable char));
static assert(is(ElementType!(typeof(a)) : dchar));
static assert(is(ElementType!(typeof(i)) == int));
static assert(is(ElementEncodingType!(typeof(i)) == int));
static assert(is(ElementType!(typeof(buf)) : void));
static assert(is(ElementEncodingType!(inout char[]) : inout(char)));
}
@safe unittest
{
static assert(is(ElementEncodingType!(int[5]) == int));
static assert(is(ElementEncodingType!(int[0]) == int));
static assert(is(ElementEncodingType!(char[5]) == char));
static assert(is(ElementEncodingType!(char[0]) == char));
}
/**
Returns $(D true) if $(D R) is an input range and has swappable
elements. The following code should compile for any range
with swappable elements.
----
R r;
static assert(isInputRange!R);
swap(r.front, r.front);
static if (isBidirectionalRange!R) swap(r.back, r.front);
static if (isRandomAccessRange!R) swap(r[], r.front);
----
*/
template hasSwappableElements(R)
{
import std.algorithm.mutation : swap;
enum bool hasSwappableElements = isInputRange!R && is(typeof(
(inout int = 0)
{
R r = R.init;
swap(r.front, r.front);
static if (isBidirectionalRange!R) swap(r.back, r.front);
static if (isRandomAccessRange!R) swap(r[0], r.front);
}));
}
///
@safe unittest
{
static assert(!hasSwappableElements!(const int[]));
static assert(!hasSwappableElements!(const(int)[]));
static assert(!hasSwappableElements!(inout(int)[]));
static assert( hasSwappableElements!(int[]));
static assert(!hasSwappableElements!( string));
static assert(!hasSwappableElements!(dstring));
static assert(!hasSwappableElements!( char[]));
static assert( hasSwappableElements!(dchar[]));
}
/**
Returns $(D true) if $(D R) is an input range and has mutable
elements. The following code should compile for any range
with assignable elements.
----
R r;
static assert(isInputRange!R);
r.front = r.front;
static if (isBidirectionalRange!R) r.back = r.front;
static if (isRandomAccessRange!R) r[0] = r.front;
----
*/
template hasAssignableElements(R)
{
enum bool hasAssignableElements = isInputRange!R && is(typeof(
(inout int = 0)
{
R r = R.init;
r.front = r.front;
static if (isBidirectionalRange!R) r.back = r.front;
static if (isRandomAccessRange!R) r[0] = r.front;
}));
}
///
@safe unittest
{
static assert(!hasAssignableElements!(const int[]));
static assert(!hasAssignableElements!(const(int)[]));
static assert( hasAssignableElements!(int[]));
static assert(!hasAssignableElements!(inout(int)[]));
static assert(!hasAssignableElements!( string));
static assert(!hasAssignableElements!(dstring));
static assert(!hasAssignableElements!( char[]));
static assert( hasAssignableElements!(dchar[]));
}
/**
Tests whether the range $(D R) has lvalue elements. These are defined as
elements that can be passed by reference and have their address taken.
The following code should compile for any range with lvalue elements.
----
void passByRef(ref ElementType!R stuff);
...
static assert(isInputRange!R);
passByRef(r.front);
static if (isBidirectionalRange!R) passByRef(r.back);
static if (isRandomAccessRange!R) passByRef(r[0]);
----
*/
template hasLvalueElements(R)
{
enum bool hasLvalueElements = isInputRange!R && is(typeof(
(inout int = 0)
{
void checkRef(ref ElementType!R stuff);
R r = R.init;
checkRef(r.front);
static if (isBidirectionalRange!R) checkRef(r.back);
static if (isRandomAccessRange!R) checkRef(r[0]);
}));
}
///
@safe unittest
{
import std.range : iota, chain;
static assert( hasLvalueElements!(int[]));
static assert( hasLvalueElements!(const(int)[]));
static assert( hasLvalueElements!(inout(int)[]));
static assert( hasLvalueElements!(immutable(int)[]));
static assert(!hasLvalueElements!(typeof(iota(3))));
static assert(!hasLvalueElements!( string));
static assert( hasLvalueElements!(dstring));
static assert(!hasLvalueElements!( char[]));
static assert( hasLvalueElements!(dchar[]));
auto c = chain([1, 2, 3], [4, 5, 6]);
static assert( hasLvalueElements!(typeof(c)));
}
@safe unittest
{
// bugfix 6336
struct S { immutable int value; }
static assert( isInputRange!(S[]));
static assert( hasLvalueElements!(S[]));
}
/**
Returns $(D true) if $(D R) has a $(D length) member that returns an
integral type. $(D R) does not have to be a range. Note that $(D
length) is an optional primitive as no range must implement it. Some
ranges do not store their length explicitly, some cannot compute it
without actually exhausting the range (e.g. socket streams), and some
other ranges may be infinite.
Although narrow string types ($(D char[]), $(D wchar[]), and their
qualified derivatives) do define a $(D length) property, $(D
hasLength) yields $(D false) for them. This is because a narrow
string's length does not reflect the number of characters, but instead
the number of encoding units, and as such is not useful with
range-oriented algorithms.
*/
template hasLength(R)
{
enum bool hasLength = !isNarrowString!R && is(typeof(
(inout int = 0)
{
R r = R.init;
ulong l = r.length;
}));
}
///
@safe unittest
{
static assert(!hasLength!(char[]));
static assert( hasLength!(int[]));
static assert( hasLength!(inout(int)[]));
struct A { ulong length; }
struct B { size_t length() { return 0; } }
struct C { @property size_t length() { return 0; } }
static assert( hasLength!(A));
static assert( hasLength!(B));
static assert( hasLength!(C));
}
/**
Returns $(D true) if $(D R) is an infinite input range. An
infinite input range is an input range that has a statically-defined
enumerated member called $(D empty) that is always $(D false),
for example:
----
struct MyInfiniteRange
{
enum bool empty = false;
...
}
----
*/
template isInfinite(R)
{
static if (isInputRange!R && __traits(compiles, { enum e = R.empty; }))
enum bool isInfinite = !R.empty;
else
enum bool isInfinite = false;
}
///
@safe unittest
{
import std.range : Repeat;
static assert(!isInfinite!(int[]));
static assert( isInfinite!(Repeat!(int)));
}
/**
Returns $(D true) if $(D R) offers a slicing operator with integral boundaries
that returns a forward range type.
For finite ranges, the result of $(D opSlice) must be of the same type as the
original range type. If the range defines $(D opDollar), then it must support
subtraction.
For infinite ranges, when $(I not) using $(D opDollar), the result of
$(D opSlice) must be the result of $(LREF take) or $(LREF takeExactly) on the
original range (they both return the same type for infinite ranges). However,
when using $(D opDollar), the result of $(D opSlice) must be that of the
original range type.
The following code must compile for $(D hasSlicing) to be $(D true):
----
R r = void;
static if (isInfinite!R)
typeof(take(r, 1)) s = r[1 .. 2];
else
{
static assert(is(typeof(r[1 .. 2]) == R));
R s = r[1 .. 2];
}
s = r[1 .. 2];
static if (is(typeof(r[0 .. $])))
{
static assert(is(typeof(r[0 .. $]) == R));
R t = r[0 .. $];
t = r[0 .. $];
static if (!isInfinite!R)
{
static assert(is(typeof(r[0 .. $ - 1]) == R));
R u = r[0 .. $ - 1];
u = r[0 .. $ - 1];
}
}
static assert(isForwardRange!(typeof(r[1 .. 2])));
static assert(hasLength!(typeof(r[1 .. 2])));
----
*/
template hasSlicing(R)
{
enum bool hasSlicing = isForwardRange!R && !isNarrowString!R && is(typeof(
(inout int = 0)
{
R r = R.init;
static if (isInfinite!R)
{
typeof(r[1 .. 1]) s = r[1 .. 2];
}
else
{
static assert(is(typeof(r[1 .. 2]) == R));
R s = r[1 .. 2];
}
s = r[1 .. 2];
static if (is(typeof(r[0 .. $])))
{
static assert(is(typeof(r[0 .. $]) == R));
R t = r[0 .. $];
t = r[0 .. $];
static if (!isInfinite!R)
{
static assert(is(typeof(r[0 .. $ - 1]) == R));
R u = r[0 .. $ - 1];
u = r[0 .. $ - 1];
}
}
static assert(isForwardRange!(typeof(r[1 .. 2])));
static assert(hasLength!(typeof(r[1 .. 2])));
}));
}
///
@safe unittest
{
import std.range : takeExactly;
static assert( hasSlicing!(int[]));
static assert( hasSlicing!(const(int)[]));
static assert(!hasSlicing!(const int[]));
static assert( hasSlicing!(inout(int)[]));
static assert(!hasSlicing!(inout int []));
static assert( hasSlicing!(immutable(int)[]));
static assert(!hasSlicing!(immutable int[]));
static assert(!hasSlicing!string);
static assert( hasSlicing!dstring);
enum rangeFuncs = "@property int front();" ~
"void popFront();" ~
"@property bool empty();" ~
"@property auto save() { return this; }" ~
"@property size_t length();";
struct A { mixin(rangeFuncs); int opSlice(size_t, size_t); }
struct B { mixin(rangeFuncs); B opSlice(size_t, size_t); }
struct C { mixin(rangeFuncs); @disable this(); C opSlice(size_t, size_t); }
struct D { mixin(rangeFuncs); int[] opSlice(size_t, size_t); }
static assert(!hasSlicing!(A));
static assert( hasSlicing!(B));
static assert( hasSlicing!(C));
static assert(!hasSlicing!(D));
struct InfOnes
{
enum empty = false;
void popFront() {}
@property int front() { return 1; }
@property InfOnes save() { return this; }
auto opSlice(size_t i, size_t j) { return takeExactly(this, j - i); }
auto opSlice(size_t i, Dollar d) { return this; }
struct Dollar {}
Dollar opDollar() const { return Dollar.init; }
}
static assert(hasSlicing!InfOnes);
}
/**
This is a best-effort implementation of $(D length) for any kind of
range.
If $(D hasLength!Range), simply returns $(D range.length) without
checking $(D upTo) (when specified).
Otherwise, walks the range through its length and returns the number
of elements seen. Performes $(BIGOH n) evaluations of $(D range.empty)
and $(D range.popFront()), where $(D n) is the effective length of $(D
range).
The $(D upTo) parameter is useful to "cut the losses" in case
the interest is in seeing whether the range has at least some number
of elements. If the parameter $(D upTo) is specified, stops if $(D
upTo) steps have been taken and returns $(D upTo).
Infinite ranges are compatible, provided the parameter $(D upTo) is
specified, in which case the implementation simply returns upTo.
*/
auto walkLength(Range)(Range range)
if (isInputRange!Range && !isInfinite!Range)
{
static if (hasLength!Range)
return range.length;
else
{
size_t result;
for ( ; !range.empty ; range.popFront() )
++result;
return result;
}
}
/// ditto
auto walkLength(Range)(Range range, const size_t upTo)
if (isInputRange!Range)
{
static if (hasLength!Range)
return range.length;
else static if (isInfinite!Range)
return upTo;
else
{
size_t result;
for ( ; result < upTo && !range.empty ; range.popFront() )
++result;
return result;
}
}
@safe unittest
{
import std.algorithm.iteration : filter;
import std.range : recurrence, take;
//hasLength Range
int[] a = [ 1, 2, 3 ];
assert(walkLength(a) == 3);
assert(walkLength(a, 0) == 3);
assert(walkLength(a, 2) == 3);
assert(walkLength(a, 4) == 3);
//Forward Range
auto b = filter!"true"([1, 2, 3, 4]);
assert(b.walkLength() == 4);
assert(b.walkLength(0) == 0);
assert(b.walkLength(2) == 2);
assert(b.walkLength(4) == 4);
assert(b.walkLength(6) == 4);
//Infinite Range
auto fibs = recurrence!"a[n-1] + a[n-2]"(1, 1);
assert(!__traits(compiles, fibs.walkLength()));
assert(fibs.take(10).walkLength() == 10);
assert(fibs.walkLength(55) == 55);
}
/**
Eagerly advances $(D r) itself (not a copy) up to $(D n) times (by
calling $(D r.popFront)). $(D popFrontN) takes $(D r) by $(D ref),
so it mutates the original range. Completes in $(BIGOH 1) steps for ranges
that support slicing and have length.
Completes in $(BIGOH n) time for all other ranges.
Returns:
How much $(D r) was actually advanced, which may be less than $(D n) if
$(D r) did not have at least $(D n) elements.
$(D popBackN) will behave the same but instead removes elements from
the back of the (bidirectional) range instead of the front.
*/
size_t popFrontN(Range)(ref Range r, size_t n)
if (isInputRange!Range)
{
static if (hasLength!Range)
{
n = cast(size_t) (n < r.length ? n : r.length);
}
static if (hasSlicing!Range && is(typeof(r = r[n .. $])))
{
r = r[n .. $];
}
else static if (hasSlicing!Range && hasLength!Range) //TODO: Remove once hasSlicing forces opDollar.
{
r = r[n .. r.length];
}
else
{
static if (hasLength!Range)
{
foreach (i; 0 .. n)
r.popFront();
}
else
{
foreach (i; 0 .. n)
{
if (r.empty) return i;
r.popFront();
}
}
}
return n;
}
/// ditto
size_t popBackN(Range)(ref Range r, size_t n)
if (isBidirectionalRange!Range)
{
static if (hasLength!Range)
{
n = cast(size_t) (n < r.length ? n : r.length);
}
static if (hasSlicing!Range && is(typeof(r = r[0 .. $ - n])))
{
r = r[0 .. $ - n];
}
else static if (hasSlicing!Range && hasLength!Range) //TODO: Remove once hasSlicing forces opDollar.
{
r = r[0 .. r.length - n];
}
else
{
static if (hasLength!Range)
{
foreach (i; 0 .. n)
r.popBack();
}
else
{
foreach (i; 0 .. n)
{
if (r.empty) return i;
r.popBack();
}
}
}
return n;
}
///
@safe unittest
{
int[] a = [ 1, 2, 3, 4, 5 ];
a.popFrontN(2);
assert(a == [ 3, 4, 5 ]);
a.popFrontN(7);
assert(a == [ ]);
}
///
@safe unittest
{
import std.algorithm.comparison : equal;
import std.range : iota;
auto LL = iota(1L, 7L);
auto r = popFrontN(LL, 2);
assert(equal(LL, [3L, 4L, 5L, 6L]));
assert(r == 2);
}
///
@safe unittest
{
int[] a = [ 1, 2, 3, 4, 5 ];
a.popBackN(2);
assert(a == [ 1, 2, 3 ]);
a.popBackN(7);
assert(a == [ ]);
}
///
@safe unittest
{
import std.algorithm.comparison : equal;
import std.range : iota;
auto LL = iota(1L, 7L);
auto r = popBackN(LL, 2);
assert(equal(LL, [1L, 2L, 3L, 4L]));
assert(r == 2);
}
/**
Eagerly advances $(D r) itself (not a copy) exactly $(D n) times (by
calling $(D r.popFront)). $(D popFrontExactly) takes $(D r) by $(D ref),
so it mutates the original range. Completes in $(BIGOH 1) steps for ranges
that support slicing, and have either length or are infinite.
Completes in $(BIGOH n) time for all other ranges.
Note: Unlike $(LREF popFrontN), $(D popFrontExactly) will assume that the
range holds at least $(D n) elements. This makes $(D popFrontExactly)
faster than $(D popFrontN), but it also means that if $(D range) does
not contain at least $(D n) elements, it will attempt to call $(D popFront)
on an empty range, which is undefined behavior. So, only use
$(D popFrontExactly) when it is guaranteed that $(D range) holds at least
$(D n) elements.
$(D popBackExactly) will behave the same but instead removes elements from
the back of the (bidirectional) range instead of the front.
*/
void popFrontExactly(Range)(ref Range r, size_t n)
if (isInputRange!Range)
{
static if (hasLength!Range)
assert(n <= r.length, "range is smaller than amount of items to pop");
static if (hasSlicing!Range && is(typeof(r = r[n .. $])))
r = r[n .. $];
else static if (hasSlicing!Range && hasLength!Range) //TODO: Remove once hasSlicing forces opDollar.
r = r[n .. r.length];
else
foreach (i; 0 .. n)
r.popFront();
}
/// ditto
void popBackExactly(Range)(ref Range r, size_t n)
if (isBidirectionalRange!Range)
{
static if (hasLength!Range)
assert(n <= r.length, "range is smaller than amount of items to pop");
static if (hasSlicing!Range && is(typeof(r = r[0 .. $ - n])))
r = r[0 .. $ - n];
else static if (hasSlicing!Range && hasLength!Range) //TODO: Remove once hasSlicing forces opDollar.
r = r[0 .. r.length - n];
else
foreach (i; 0 .. n)
r.popBack();
}
///
@safe unittest
{
import std.algorithm.iteration : filterBidirectional;
import std.algorithm.comparison : equal;
auto a = [1, 2, 3];
a.popFrontExactly(1);
assert(a == [2, 3]);
a.popBackExactly(1);
assert(a == [2]);
string s = "日本語";
s.popFrontExactly(1);
assert(s == "本語");
s.popBackExactly(1);
assert(s == "本");
auto bd = filterBidirectional!"true"([1, 2, 3]);
bd.popFrontExactly(1);
assert(bd.equal([2, 3]));
bd.popBackExactly(1);
assert(bd.equal([2]));
}
/**
Moves the front of $(D r) out and returns it. Leaves $(D r.front) in a
destroyable state that does not allocate any resources (usually equal
to its $(D .init) value).
*/
ElementType!R moveFront(R)(R r)
{
static if (is(typeof(&r.moveFront)))
{
return r.moveFront();
}
else static if (!hasElaborateCopyConstructor!(ElementType!R))
{
return r.front;
}
else static if (is(typeof(&(r.front())) == ElementType!R*))
{
import std.algorithm.mutation : move;
return move(r.front);
}
else
{
static assert(0,
"Cannot move front of a range with a postblit and an rvalue front.");
}
}
///
@safe unittest
{
auto a = [ 1, 2, 3 ];
assert(moveFront(a) == 1);
assert(a.length == 3);
// define a perfunctory input range
struct InputRange
{
enum bool empty = false;
enum int front = 7;
void popFront() {}
int moveFront() { return 43; }
}
InputRange r;
// calls r.moveFront
assert(moveFront(r) == 43);
}
@safe unittest
{
struct R
{
@property ref int front() { static int x = 42; return x; }
this(this){}
}
R r;
assert(moveFront(r) == 42);
}
/**
Moves the back of $(D r) out and returns it. Leaves $(D r.back) in a
destroyable state that does not allocate any resources (usually equal
to its $(D .init) value).
*/
ElementType!R moveBack(R)(R r)
{
static if (is(typeof(&r.moveBack)))
{
return r.moveBack();
}
else static if (!hasElaborateCopyConstructor!(ElementType!R))
{
return r.back;
}
else static if (is(typeof(&(r.back())) == ElementType!R*))
{
import std.algorithm.mutation : move;
return move(r.back);
}
else
{
static assert(0,
"Cannot move back of a range with a postblit and an rvalue back.");
}
}
///
@safe unittest
{
struct TestRange
{
int payload = 5;
@property bool empty() { return false; }
@property TestRange save() { return this; }
@property ref int front() return { return payload; }
@property ref int back() return { return payload; }
void popFront() { }
void popBack() { }
}
static assert(isBidirectionalRange!TestRange);
TestRange r;
auto x = moveBack(r);
assert(x == 5);
}
/**
Moves element at index $(D i) of $(D r) out and returns it. Leaves $(D
r[i]) in a destroyable state that does not allocate any resources
(usually equal to its $(D .init) value).
*/
ElementType!R moveAt(R)(R r, size_t i)
{
static if (is(typeof(&r.moveAt)))
{
return r.moveAt(i);
}
else static if (!hasElaborateCopyConstructor!(ElementType!(R)))
{
return r[i];
}
else static if (is(typeof(&r[i]) == ElementType!R*))
{
import std.algorithm.mutation : move;
return move(r[i]);
}
else
{
static assert(0,
"Cannot move element of a range with a postblit and rvalue elements.");
}
}
///
@safe unittest
{
auto a = [1,2,3,4];
foreach (idx, it; a)
{
assert(it == moveAt(a, idx));
}
}
@safe unittest
{
import std.internal.test.dummyrange;
foreach (DummyType; AllDummyRanges)
{
auto d = DummyType.init;
assert(moveFront(d) == 1);
static if (isBidirectionalRange!DummyType)
{
assert(moveBack(d) == 10);
}
static if (isRandomAccessRange!DummyType)
{
assert(moveAt(d, 2) == 3);
}
}
}
/**
Implements the range interface primitive $(D empty) for built-in
arrays. Due to the fact that nonmember functions can be called with
the first argument using the dot notation, $(D array.empty) is
equivalent to $(D empty(array)).
*/
@property bool empty(T)(in T[] a) @safe pure nothrow @nogc
{
return !a.length;
}
///
@safe pure nothrow unittest
{
auto a = [ 1, 2, 3 ];
assert(!a.empty);
assert(a[3 .. $].empty);
}
/**
Implements the range interface primitive $(D save) for built-in
arrays. Due to the fact that nonmember functions can be called with
the first argument using the dot notation, $(D array.save) is
equivalent to $(D save(array)). The function does not duplicate the
content of the array, it simply returns its argument.
*/
@property T[] save(T)(T[] a) @safe pure nothrow @nogc
{
return a;
}
///
@safe pure nothrow unittest
{
auto a = [ 1, 2, 3 ];
auto b = a.save;
assert(b is a);
}
/**
Implements the range interface primitive $(D popFront) for built-in
arrays. Due to the fact that nonmember functions can be called with
the first argument using the dot notation, $(D array.popFront) is
equivalent to $(D popFront(array)). For $(GLOSSARY narrow strings),
$(D popFront) automatically advances to the next $(GLOSSARY code
point).
*/
void popFront(T)(ref T[] a) @safe pure nothrow @nogc
if (!isNarrowString!(T[]) && !is(T[] == void[]))
{
assert(a.length, "Attempting to popFront() past the end of an array of " ~ T.stringof);
a = a[1 .. $];
}
///
@safe pure nothrow unittest
{
auto a = [ 1, 2, 3 ];
a.popFront();
assert(a == [ 2, 3 ]);
}
version(unittest)
{
static assert(!is(typeof({ int[4] a; popFront(a); })));
static assert(!is(typeof({ immutable int[] a; popFront(a); })));
static assert(!is(typeof({ void[] a; popFront(a); })));
}
/// ditto
void popFront(C)(ref C[] str) @trusted pure nothrow
if (isNarrowString!(C[]))
{
import std.algorithm.comparison : min;
assert(str.length, "Attempting to popFront() past the end of an array of " ~ C.stringof);
static if (is(Unqual!C == char))
{
__gshared static immutable ubyte[] charWidthTab = [
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 1, 1
];
immutable c = str[0];
if (c < 192)
{
str = str.ptr[1 .. str.length];
}
else
{
str = str.ptr[min(str.length, charWidthTab.ptr[c - 192]) .. str.length];
}
}
else static if (is(Unqual!C == wchar))
{
immutable u = str[0];
immutable seqLen = 1 + (u >= 0xD800 && u <= 0xDBFF);
str = str.ptr[min(seqLen, str.length) .. str.length];
}
else static assert(0, "Bad template constraint.");
}
@safe pure unittest
{
import std.meta : AliasSeq;
foreach (S; AliasSeq!(string, wstring, dstring))
{
S s = "\xC2\xA9hello";
s.popFront();
assert(s == "hello");
S str = "hello\U00010143\u0100\U00010143";
foreach (dchar c; ['h', 'e', 'l', 'l', 'o', '\U00010143', '\u0100', '\U00010143'])
{
assert(str.front == c);
str.popFront();
}
assert(str.empty);
static assert(!is(typeof({ immutable S a; popFront(a); })));
static assert(!is(typeof({ typeof(S.init[0])[4] a; popFront(a); })));
}
C[] _eatString(C)(C[] str)
{
while (!str.empty)
str.popFront();
return str;
}
enum checkCTFE = _eatString("ウェブサイト@La_Verité.com");
static assert(checkCTFE.empty);
enum checkCTFEW = _eatString("ウェブサイト@La_Verité.com"w);
static assert(checkCTFEW.empty);
}
unittest // issue 16090
{
string s = "\u00E4";
assert(s.length == 2);
s = s[0 .. 1];
assert(s.length == 1);
s.popFront;
assert(s.empty);
}
unittest
{
wstring s = "\U00010000";
assert(s.length == 2);
s = s[0 .. 1];
assert(s.length == 1);
s.popFront;
assert(s.empty);
}
/**
Implements the range interface primitive $(D popBack) for built-in
arrays. Due to the fact that nonmember functions can be called with
the first argument using the dot notation, $(D array.popBack) is
equivalent to $(D popBack(array)). For $(GLOSSARY narrow strings), $(D
popFront) automatically eliminates the last $(GLOSSARY code point).
*/
void popBack(T)(ref T[] a) @safe pure nothrow @nogc
if (!isNarrowString!(T[]) && !is(T[] == void[]))
{
assert(a.length);
a = a[0 .. $ - 1];
}
///
@safe pure nothrow unittest
{
auto a = [ 1, 2, 3 ];
a.popBack();
assert(a == [ 1, 2 ]);
}
version(unittest)
{
static assert(!is(typeof({ immutable int[] a; popBack(a); })));
static assert(!is(typeof({ int[4] a; popBack(a); })));
static assert(!is(typeof({ void[] a; popBack(a); })));
}
/// ditto
void popBack(T)(ref T[] a) @safe pure
if (isNarrowString!(T[]))
{
import std.utf : strideBack;
assert(a.length, "Attempting to popBack() past the front of an array of " ~ T.stringof);
a = a[0 .. $ - strideBack(a, $)];
}
@safe pure unittest
{
import std.meta : AliasSeq;
foreach (S; AliasSeq!(string, wstring, dstring))
{
S s = "hello\xE2\x89\xA0";
s.popBack();
assert(s == "hello");
S s3 = "\xE2\x89\xA0";
auto c = s3.back;
assert(c == cast(dchar)'\u2260');
s3.popBack();
assert(s3 == "");
S str = "\U00010143\u0100\U00010143hello";
foreach (dchar ch; ['o', 'l', 'l', 'e', 'h', '\U00010143', '\u0100', '\U00010143'])
{
assert(str.back == ch);
str.popBack();
}
assert(str.empty);
static assert(!is(typeof({ immutable S a; popBack(a); })));
static assert(!is(typeof({ typeof(S.init[0])[4] a; popBack(a); })));
}
}
/**
Implements the range interface primitive $(D front) for built-in
arrays. Due to the fact that nonmember functions can be called with
the first argument using the dot notation, $(D array.front) is
equivalent to $(D front(array)). For $(GLOSSARY narrow strings), $(D
front) automatically returns the first $(GLOSSARY code point) as _a $(D
dchar).
*/
@property ref T front(T)(T[] a) @safe pure nothrow @nogc
if (!isNarrowString!(T[]) && !is(T[] == void[]))
{
assert(a.length, "Attempting to fetch the front of an empty array of " ~ T.stringof);
return a[0];
}
///
@safe pure nothrow unittest
{
int[] a = [ 1, 2, 3 ];
assert(a.front == 1);
}
@safe pure nothrow unittest
{
auto a = [ 1, 2 ];
a.front = 4;
assert(a.front == 4);
assert(a == [ 4, 2 ]);
immutable b = [ 1, 2 ];
assert(b.front == 1);
int[2] c = [ 1, 2 ];
assert(c.front == 1);
}
/// ditto
@property dchar front(T)(T[] a) @safe pure if (isNarrowString!(T[]))
{
import std.utf : decode;
assert(a.length, "Attempting to fetch the front of an empty array of " ~ T.stringof);
size_t i = 0;
return decode(a, i);
}
/**
Implements the range interface primitive $(D back) for built-in
arrays. Due to the fact that nonmember functions can be called with
the first argument using the dot notation, $(D array.back) is
equivalent to $(D back(array)). For $(GLOSSARY narrow strings), $(D
back) automatically returns the last $(GLOSSARY code point) as _a $(D
dchar).
*/
@property ref T back(T)(T[] a) @safe pure nothrow @nogc
if (!isNarrowString!(T[]) && !is(T[] == void[]))
{
assert(a.length, "Attempting to fetch the back of an empty array of " ~ T.stringof);
return a[$ - 1];
}
///
@safe pure nothrow unittest
{
int[] a = [ 1, 2, 3 ];
assert(a.back == 3);
a.back += 4;
assert(a.back == 7);
}
@safe pure nothrow unittest
{
immutable b = [ 1, 2, 3 ];
assert(b.back == 3);
int[3] c = [ 1, 2, 3 ];
assert(c.back == 3);
}
/// ditto
// Specialization for strings
@property dchar back(T)(T[] a) @safe pure if (isNarrowString!(T[]))
{
import std.utf : decode, strideBack;
assert(a.length, "Attempting to fetch the back of an empty array of " ~ T.stringof);
size_t i = a.length - strideBack(a, a.length);
return decode(a, i);
}
| D |
/Users/deepansh/Desktop/ForexWatchlist/DerivedData/ForexWatchlist/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Alamofire.build/Objects-normal/x86_64/Combine.o : /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/MultipartFormData.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/MultipartUpload.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/AlamofireExtended.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/Protected.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/HTTPMethod.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/URLConvertible+URLRequestConvertible.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/Combine.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/OperationQueue+Alamofire.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/StringEncoding+Alamofire.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/URLSessionConfiguration+Alamofire.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/Result+Alamofire.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/URLRequest+Alamofire.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/Alamofire.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/Response.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/SessionDelegate.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/ParameterEncoding.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/Session.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/Validation.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/ServerTrustEvaluation.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/ResponseSerialization.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/RequestTaskMap.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/URLEncodedFormEncoder.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/ParameterEncoder.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/NetworkReachabilityManager.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/CachedResponseHandler.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/RedirectHandler.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/AFError.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/EventMonitor.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/AuthenticationInterceptor.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/RequestInterceptor.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/Notifications.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/HTTPHeaders.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/Request.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/RetryPolicy.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/ObjectiveC.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreImage.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/QuartzCore.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Dispatch.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Metal.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Darwin.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Foundation.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreFoundation.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreGraphics.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Swift.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/UIKit.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Users/deepansh/Desktop/ForexWatchlist/Pods/Target\ Support\ Files/Alamofire/Alamofire-umbrella.h /Users/deepansh/Desktop/ForexWatchlist/DerivedData/ForexWatchlist/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Alamofire.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/deepansh/Desktop/ForexWatchlist/DerivedData/ForexWatchlist/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Alamofire.build/Objects-normal/x86_64/Combine~partial.swiftmodule : /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/MultipartFormData.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/MultipartUpload.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/AlamofireExtended.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/Protected.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/HTTPMethod.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/URLConvertible+URLRequestConvertible.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/Combine.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/OperationQueue+Alamofire.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/StringEncoding+Alamofire.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/URLSessionConfiguration+Alamofire.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/Result+Alamofire.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/URLRequest+Alamofire.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/Alamofire.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/Response.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/SessionDelegate.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/ParameterEncoding.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/Session.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/Validation.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/ServerTrustEvaluation.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/ResponseSerialization.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/RequestTaskMap.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/URLEncodedFormEncoder.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/ParameterEncoder.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/NetworkReachabilityManager.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/CachedResponseHandler.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/RedirectHandler.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/AFError.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/EventMonitor.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/AuthenticationInterceptor.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/RequestInterceptor.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/Notifications.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/HTTPHeaders.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/Request.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/RetryPolicy.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/ObjectiveC.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreImage.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/QuartzCore.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Dispatch.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Metal.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Darwin.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Foundation.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreFoundation.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreGraphics.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Swift.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/UIKit.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Users/deepansh/Desktop/ForexWatchlist/Pods/Target\ Support\ Files/Alamofire/Alamofire-umbrella.h /Users/deepansh/Desktop/ForexWatchlist/DerivedData/ForexWatchlist/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Alamofire.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/deepansh/Desktop/ForexWatchlist/DerivedData/ForexWatchlist/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Alamofire.build/Objects-normal/x86_64/Combine~partial.swiftdoc : /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/MultipartFormData.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/MultipartUpload.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/AlamofireExtended.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/Protected.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/HTTPMethod.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/URLConvertible+URLRequestConvertible.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/Combine.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/OperationQueue+Alamofire.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/StringEncoding+Alamofire.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/URLSessionConfiguration+Alamofire.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/Result+Alamofire.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/URLRequest+Alamofire.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/Alamofire.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/Response.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/SessionDelegate.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/ParameterEncoding.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/Session.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/Validation.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/ServerTrustEvaluation.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/ResponseSerialization.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/RequestTaskMap.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/URLEncodedFormEncoder.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/ParameterEncoder.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/NetworkReachabilityManager.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/CachedResponseHandler.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/RedirectHandler.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/AFError.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/EventMonitor.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/AuthenticationInterceptor.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/RequestInterceptor.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/Notifications.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/HTTPHeaders.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/Request.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/RetryPolicy.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/ObjectiveC.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreImage.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/QuartzCore.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Dispatch.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Metal.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Darwin.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Foundation.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreFoundation.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreGraphics.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Swift.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/UIKit.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Users/deepansh/Desktop/ForexWatchlist/Pods/Target\ Support\ Files/Alamofire/Alamofire-umbrella.h /Users/deepansh/Desktop/ForexWatchlist/DerivedData/ForexWatchlist/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Alamofire.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/deepansh/Desktop/ForexWatchlist/DerivedData/ForexWatchlist/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Alamofire.build/Objects-normal/x86_64/Combine~partial.swiftsourceinfo : /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/MultipartFormData.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/MultipartUpload.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/AlamofireExtended.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/Protected.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/HTTPMethod.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/URLConvertible+URLRequestConvertible.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/Combine.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/OperationQueue+Alamofire.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/StringEncoding+Alamofire.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/URLSessionConfiguration+Alamofire.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/Result+Alamofire.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/URLRequest+Alamofire.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/Alamofire.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/Response.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/SessionDelegate.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/ParameterEncoding.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/Session.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/Validation.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/ServerTrustEvaluation.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/ResponseSerialization.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/RequestTaskMap.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/URLEncodedFormEncoder.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/ParameterEncoder.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/NetworkReachabilityManager.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/CachedResponseHandler.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/RedirectHandler.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/AFError.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/EventMonitor.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/AuthenticationInterceptor.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/RequestInterceptor.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/Notifications.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/HTTPHeaders.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/Request.swift /Users/deepansh/Desktop/ForexWatchlist/Pods/Alamofire/Source/RetryPolicy.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/ObjectiveC.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreImage.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/QuartzCore.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Dispatch.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Metal.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Darwin.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Foundation.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreFoundation.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreGraphics.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Swift.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/UIKit.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Users/deepansh/Desktop/ForexWatchlist/Pods/Target\ Support\ Files/Alamofire/Alamofire-umbrella.h /Users/deepansh/Desktop/ForexWatchlist/DerivedData/ForexWatchlist/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Alamofire.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
| D |
module org.serviio.library.local.metadata.extractor.embedded.OGGExtractionStrategy;
import java.lang.String;
import java.io.IOException;
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.imaging.ImageFormat;
import org.jaudiotagger.audio.AudioFile;
import org.jaudiotagger.audio.AudioHeader;
import org.jaudiotagger.tag.Tag;
import org.jaudiotagger.tag.vorbiscomment.VorbisCommentFieldKey;
import org.jaudiotagger.tag.vorbiscomment.VorbisCommentTag;
import org.serviio.dlna.AudioContainer;
import org.serviio.library.local.metadata.AudioMetadata;
import org.serviio.library.local.metadata.ImageDescriptor;
import org.serviio.library.local.metadata.extractor.InvalidMediaFormatException;
import org.serviio.util.ObjectValidator;
import org.serviio.library.local.metadata.extractor.embedded.AudioExtractionStrategy;
public class OGGExtractionStrategy : AudioExtractionStrategy
{
override public void extractMetadata(AudioMetadata metadata, AudioFile f, AudioHeader header, Tag tag)
{
super.extractMetadata(metadata, f, header, tag);
if (metadata.getCoverImage() is null)
{
VorbisCommentTag ovtag = cast(VorbisCommentTag)f.getTag();
byte[] imageBytes = null;
String mimetype = null;
String imageData = ovtag.getFirst(VorbisCommentFieldKey.METADATA_BLOCK_PICTURE);
if (ObjectValidator.isEmpty(imageData))
{
imageData = ovtag.getFirst(VorbisCommentFieldKey.COVERART);
mimetype = ovtag.getFirst(VorbisCommentFieldKey.COVERARTMIME);
if (ObjectValidator.isNotEmpty(imageData)) {
try
{
imageBytes = Base64.decodeBase64(imageData.getBytes("UTF-8"));
}
catch (Exception e) {}
}
}
else
{
ImageDescriptor imageDesc = getImageDescriptorFromMetadataField(imageData);
if (imageDesc !is null)
{
imageBytes = imageDesc.getImageData();
mimetype = imageDesc.getMimeType();
}
}
if (imageBytes !is null)
{
ImageFormat imageFormat = getImageFormat(imageBytes);
if (isSupportedImageFormat(imageFormat))
{
if (ObjectValidator.isEmpty(mimetype)) {
mimetype = getMimeType(imageFormat);
}
ImageDescriptor imageDesc = new ImageDescriptor(imageBytes, mimetype);
metadata.setCoverImage(imageDesc);
}
}
}
}
private ImageDescriptor getImageDescriptorFromMetadataField(String imageData)
{
try
{
byte[] imageStructure = Base64.decodeBase64(imageData.getBytes("UTF-8"));
int offset = 4;
byte[] result = new byte[4];
System.arraycopy(imageStructure, offset, result, 0, 4);
int mimeTypeLength = unsignedIntToLong(result);
offset += 4;
byte[] mimeTypeBytes = new byte[mimeTypeLength];
System.arraycopy(imageStructure, offset, mimeTypeBytes, 0, mimeTypeLength);
String mimetype = new String(mimeTypeBytes);
if (mimetype.equals("-->")) {
return null;
}
offset += mimeTypeLength;
System.arraycopy(imageStructure, offset, result, 0, 4);
int descLength = unsignedIntToLong(result);
offset = offset + 4 + descLength;
offset = offset + 4 + 4 + 4 + 4;
System.arraycopy(imageStructure, offset, result, 0, 4);
int imageBytesLength = unsignedIntToLong(result);
offset += 4;
byte[] imageBytes = new byte[imageBytesLength];
System.arraycopy(imageStructure, offset, imageBytes, 0, imageBytesLength);
return new ImageDescriptor(imageBytes, mimetype);
}
catch (Exception e) {}
return null;
}
private int unsignedIntToLong(byte[] b)
{
long l = 0L;
l |= b[0] & 0xFF;
l <<= 8;
l |= b[1] & 0xFF;
l <<= 8;
l |= b[2] & 0xFF;
l <<= 8;
l |= b[3] & 0xFF;
return Integer.parseInt(Long.toString(l));
}
override protected AudioContainer getContainer()
{
return AudioContainer.OGG;
}
}
/* Location: C:\Users\Main\Downloads\serviio.jar
* Qualified Name: org.serviio.library.local.metadata.extractor.embedded.OGGExtractionStrategy
* JD-Core Version: 0.7.0.1
*/ | D |
// ******************************
// ZS_Attack
// ---------
// Angreifen oder Fliehen
// wird durch B_Attack aufgerufen
// ******************************
func void B_AssessSurprise()
{
Npc_SetTarget (self, other); //Ziel wechseln
// ------ HACK: AR ändern wegen B_Says, mögl. GateGuards, mögl. Mörder, etc. -------
self.aivar[AIV_ATTACKREASON] = AR_GuildEnemy;
};
func void ZS_Attack ()
{
B_ClearPerceptions(self);
Perception_Set_Minimal(); //alle diese Wahrnehmungen werden den ZS_Attack NICHT verlassen
B_SetSchwierigkeit();
// ------ lokale Wahrnehmung für verwandelten SC ------
Npc_PercEnable (self, PERC_ASSESSSURPRISE , B_AssessSurprise);
B_ValidateOther();
self.aivar[AIV_LASTTARGET] = Hlp_GetInstanceID (other);
//EXIT IF
if (self.guild == GIL_DRAGON)
&& (other.guild == GIL_GOBBO)
{
return;
};
// ------ NSC will fliehen ------
if (C_WantToFlee (self, other))
{
Npc_ClearAIQueue (self);
B_ClearPerceptions (self);
Npc_SetTarget (self, other);
AI_StartState (self, ZS_Flee, 0, "");
return;
};
if ((Hlp_GetInstanceID(self) == Hlp_GetInstanceID(Mod_948_BDT_Esteban_MT))
|| (Hlp_GetInstanceID(self) == Hlp_GetInstanceID(Mod_4072_BDT_Bandit_MT))
|| (Hlp_GetInstanceID(self) == Hlp_GetInstanceID(Mod_4073_BDT_Bandit_MT))
|| (Hlp_GetInstanceID(self) == Hlp_GetInstanceID(Mod_4074_BDT_Bandit_MT))
|| (Hlp_GetInstanceID(self) == Hlp_GetInstanceID(Mod_4075_BDT_Bandit_MT)))
&& ((Mod_Banditenueberfall_Esteban == 6)
|| (Mod_Banditenueberfall_Esteban == 7))
&& (C_NpcIsHero(other))
{
return;
};
if (Npc_GetDistToWP(self, "TOT") < 500)
{
return;
};
if (Hlp_GetInstanceID(self) == Hlp_GetInstanceID(Mod_803_STT_Mud_MT))
&& (other.guild > GIL_SEPERATOR_HUM)
{
return;
};
if (Hlp_GetInstanceID(self) == Hlp_GetInstanceID(Mod_7299_OUT_Hel_NW))
&& (other.guild == GIL_ZOMBIE)
{
return;
};
if (Hlp_GetInstanceID(self) == Hlp_GetInstanceID(Mod_1974_MIL_Gidan_FI))
{
return;
};
if (Hlp_GetInstanceID(self) == Hlp_GetInstanceID(Mod_1141_GRD_Gardist_MT))
{
B_Attack (Mod_1107_GRD_Jackal_MT, Mod_1141_GRD_Gardist_MT, AR_Kill, 0);
};
if (Hlp_GetInstanceID(self) == Hlp_GetInstanceID(Mod_1893_MIL_Miliz_NW))
{
B_Attack (Mod_1894_MIL_Miliz_NW, hero, AR_GuildEnemy, 0);
};
// FUNC
// ------ Nicht bei LOAD GAME ------
if (self.aivar[AIV_LOADGAME] == FALSE)
&& (!C_NpcIsSeelenpeiniger(self))
{
// ------ Grund des Angriffs nennen ------
B_Say_AttackReason();
};
// ------ Die besten Waffen equippen ------
if (Npc_IsInFightMode(self, FMODE_NONE)) // nur wenn self keine Waffe gezogen hat
{
AI_EquipBestRangedWeapon (self);
AI_EquipBestMeleeWeapon (self);
};
AI_StandUp (self);
B_StopLookAt (self);
B_TurnToNpc (self, other);
AI_SetWalkmode (self, NPC_RUN);
// ------ GuardPassage_Status resetten ------
self.aivar[AIV_Guardpassage_Status] = GP_NONE;
// ------ Absolutionslevel initialisieren (bei LOC_NONE immer 0) ------
self.aivar[AIV_LastAbsolutionLevel] = B_GetCurrentAbsolutionLevel(self);
// ------ Verfolgugsabbruch unwahr (resetten) ------
self.aivar[AIV_PursuitEnd] = FALSE;
// ------ Verfolgungs-Zwischendistanz-Ausrichutung ------
self.aivar[AIV_StateTime] = 0;
// ------ Nur einmal Wachen rufen (resetten) ------
self.aivar[AIV_TAPOSITION] = 0;
// ------ wie oft bin ich von Nicht-Target getroffen worden ------
self.aivar[AIV_HitByOtherNpc] = 0;
// ------ Für Magier ------
self.aivar[AIV_SelectSpell] = 0; //Für Magier;
if (self.aivar[AIV_FightDistCancel] < FIGHT_DIST_CANCEL)
{
self.aivar[AIV_FightDistCancel] = FIGHT_DIST_CANCEL;
};
};
func int ZS_Attack_Loop()
{
Mod_KampfLaeuft = TRUE;
if (Hlp_GetInstanceID(self) == Hlp_GetInstanceID(PC_SEELE))
&& (seele_unterwegs==TRUE)
{
if (self.attribute[ATR_MANA] < SPL_Cost_Concussionbolt)
{
B_SoulTalk();
};
};
if (Hlp_GetInstanceID(self) == Hlp_GetInstanceID(Mod_7352_OUT_Trador_TUG))
&& (other.guild == GIL_STONEGOLEM)
{
return LOOP_END;
};
// ----- NICHT unten, sonst bei LOAD Game other trotz B_ValidateOther verloren! Warum??? -----
if (!Npc_GetTarget (self)) // other = target
{
return LOOP_END;
};
if (Hlp_GetInstanceID(self) == Hlp_GetInstanceID(Monster_11038_Shivar_REL))
&& (C_NpcIsHero(other))
&& (Mod_HeroIstDemon == TRUE)
&& (self.aivar [AIV_ATTACKREASON] == AR_NONE)
{
return LOOP_END;
};
if ((Hlp_GetInstanceID(self) == Hlp_GetInstanceID(Monster_11057_Mutantengolem_AW))
|| (Hlp_GetInstanceID(other) == Hlp_GetInstanceID(Monster_11057_Mutantengolem_AW)))
&& ((Mod_Mutantengolem == 2)
|| (Mod_Mutantengolem == 3))
{
return LOOP_END;
};
if (Hlp_GetInstanceID(self) == Hlp_GetInstanceID(Mod_939_PIR_Owen_AW))
&& (other.guild == GIL_STRF)
&& (!Npc_KnowsInfo(hero, Info_Mod_Owen_Befreiung))
{
return LOOP_END;
};
// EXIT LOOP IF...
if (Hlp_GetInstanceID(self) == Hlp_GetInstanceID(Monster_11038_Shivar_REL))
&& (C_NpcIsHero(other))
&& (Mod_ShivarLieb == 1)
{
return LOOP_END;
};
if (Mod_MitLawrenceGesprochen == 11)
&& (Npc_IsInState(Mod_591_NONE_Larius_NW, ZS_Attack))
{
if (!Npc_IsInState(Mod_1730_MIL_Lawrence_NW, ZS_ATTACK))
{
B_Attack (Mod_1730_MIL_Lawrence_NW, hero, AR_GuildEnemy, 0);
};
if (!Npc_IsInState(Mod_594_NONE_Lutero_NW, ZS_ATTACK))
{
B_Attack (Mod_594_NONE_Lutero_NW, hero, AR_GuildEnemy, 0);
};
};
if (self.guild == GIL_DRAGON)
&& (other.guild == GIL_GOBBO)
{
return LOOP_END;
};
if (Hlp_GetInstanceID(self) == Hlp_GetInstanceID(Mod_7299_OUT_Hel_NW))
&& (other.guild == GIL_ZOMBIE)
{
return LOOP_END;
};
if (self.guild == other.guild)
&& (!C_NpcIsHero(other))
&& (self.aivar[AIV_AttackReason] != AR_NONE)
&& (self.aivar[AIV_AttackReason] != AR_KILL)
{
//return LOOP_END;
};
if ((Hlp_GetInstanceID(self) == Hlp_GetInstanceID(Mod_948_BDT_Esteban_MT))
|| (Hlp_GetInstanceID(self) == Hlp_GetInstanceID(Mod_4072_BDT_Bandit_MT))
|| (Hlp_GetInstanceID(self) == Hlp_GetInstanceID(Mod_4073_BDT_Bandit_MT))
|| (Hlp_GetInstanceID(self) == Hlp_GetInstanceID(Mod_4074_BDT_Bandit_MT))
|| (Hlp_GetInstanceID(self) == Hlp_GetInstanceID(Mod_4075_BDT_Bandit_MT)))
&& ((Mod_Banditenueberfall_Esteban == 6)
|| (Mod_Banditenueberfall_Esteban == 7))
&& (C_NpcIsHero(other))
{
return LOOP_END;
};
if (Hlp_GetInstanceID(self) == Hlp_GetInstanceID(Mod_7368_JG_Jaeger_NW))
&& (C_NpcIsDown(Mod_7106_ASS_Ramsi_NW))
&& (!Npc_KnowsInfo(hero, Info_Mod_Ramsi_KeilerFleischWeg))
{
B_StartOtherRoutine (self, "FLUCHT");
return LOOP_END;
};
// Begleiter und deren Monster greifen sich weder gegenseitig noch den Held an
if (CurrentLevel == TUGETTSO_ZEN)
&& (self.guild == other.guild)
{
return LOOP_END;
};
if (self.aivar[AIV_Partymember] == TRUE)
&& (other.aivar[AIV_Partymember] == TRUE)
{
return LOOP_END;
};
if (self.aivar[AIV_Partymember] == TRUE)
&& (C_NpcIsHero(other))
{
return LOOP_END;
};
if (Hlp_GetInstanceID(other) == Hlp_GetInstanceID(Mod_1974_MIL_Gidan_FI))
&& (Hlp_GetInstanceID(self) == Hlp_GetInstanceID(Sleeper))
&& (other.attribute[ATR_HITPOINTS] < other.attribute[ATR_HITPOINTS_MAX])
{
return LOOP_END;
};
if (Hlp_GetInstanceID(self) == Hlp_GetInstanceID(Mod_7174_DEM_Randolph_NW))
&& (Mod_Randolph_Started == 14)
{
return LOOP_END;
};
// ------ Kampfabbruch, wenn zu weit weg ------
if (Npc_GetDistToNpc (self, other) > self.aivar[AIV_FightDistCancel])
{
Npc_ClearAIQueue(self);
AI_StandUp (self);
self.aivar[AIV_PursuitEnd] = TRUE;
return LOOP_END;
};
if (Npc_KnowsInfo(hero, Info_Mod_Drach_WerBistDu))
&& (GardeBeliars_1989_Drach.attribute[ATR_HITPOINTS] < (GardeBeliars_1989_Drach.attribute[ATR_HITPOINTS_MAX]/2))
&& (Hlp_GetInstanceID(self) == Hlp_GetInstanceID(GardeBeliars_1989_Drach))
&& (!Npc_KnowsInfo(hero, Info_Mod_Drach_AtAlmanach))
{
Npc_ClearAIQueue(self);
AI_StandUp (self);
AI_StandUp (hero);
self.aivar[AIV_PursuitEnd] = TRUE;
return LOOP_END;
};
// ------ Gegner wird schon zu lange verfolgt ------
if (Npc_GetStateTime (self) > self.aivar[AIV_MM_FollowTime])
&& (self.aivar[AIV_PursuitEnd] == FALSE)
{
Npc_ClearAIQueue(self);
AI_StandUp (self);
self.aivar[AIV_PursuitEnd] = TRUE;
self.aivar[AIV_Dist] = Npc_GetDistToNpc(self, other);
self.aivar[AIV_StateTime] = Npc_GetStateTime (self);
// ------ Einen Spruch aufsagen ------
if (other.guild < GIL_SEPERATOR_HUM) //NICHT bei Monstern oder bei verwandeltem SC
&& (!C_NpcIsSeelenpeiniger(self))
{
B_Say (self, other, "$RUNCOWARD");
};
};
// ------ Warten, ob Feind auch wirklich flieht ------
if (self.aivar[AIV_PursuitEnd] == TRUE)
{
// ------ weit genug weg ------
if (Npc_GetDistToNpc (self, other) > (self.senses_range))
{
return LOOP_END;
};
// ------ einmal pro Sekunde ------
if (Npc_GetStateTime (self) > self.aivar[AIV_StateTime])
{
// ------ Feind kommt zurück ODER bleibt stehen ------
if (Npc_GetDistToNpc(self, other) < self.aivar[AIV_Dist])
|| ( (!C_BodyStateContains(other,BS_RUN)) && (!C_BodyStateContains(other, BS_JUMP)) )
{
self.aivar[AIV_PursuitEnd] = FALSE;
Npc_SetStateTime (self, 0);
self.aivar[AIV_StateTime] = 0;
// --> und weiter im Text!
}
else
{
B_TurnToNpc (self, other);
self.aivar[AIV_Dist] = Npc_GetDistToNpc(self, other);
self.aivar[AIV_StateTime] = Npc_GetStateTime (self);
};
};
return LOOP_CONTINUE;
};
// ------ wenn Absolutionslevel im Kampf > als beim Kampf-start --> Abbruch ------
if (B_GetCurrentAbsolutionLevel(self) > self.aivar[AIV_LastAbsolutionLevel])
{
Npc_ClearAIQueue(self);
AI_StandUp (self);
return LOOP_END;
};
// ------ Gegner geht ins Wasser und ich will nicht schwimmen ------
if (C_BodyStateContains(other,BS_SWIM) || C_BodyStateContains(other,BS_DIVE))
&& (self.aivar[AIV_MM_FollowInWater] == FALSE)
{
Npc_ClearAIQueue(self);
AI_StandUp (self);
self.aivar[AIV_PursuitEnd] = TRUE;
return LOOP_END;
};
if (self.guild == GIL_DRACONIAN)
&& (other.guild == GIL_SWAMPSHARK)
{
return LOOP_END;
};
// LOOP FUNC
// ------ Vor Attacke kurz warten (bei Angriff aus Dialog) ------
if (self.aivar[AIV_WaitBeforeAttack] >= 1) //nur einmal
{
AI_Wait (self, 0.8);
self.aivar[AIV_WaitBeforeAttack] = 0;
};
// ------ Wenn Max-Entfernung zum WP angegeben ------
if (self.aivar[AIV_MaxDistToWp] > 0)
{
if (Npc_GetDistToWP(self, self.wp) > self.aivar[AIV_MaxDistToWp])
&& (Npc_GetDistToWP(other, self.wp) > self.aivar[AIV_MaxDistToWp])
{
self.fight_tactic = FAI_NAILED;
}
else //einer von beiden nah genug am self.wp
{
self.fight_tactic = self.aivar[AIV_OriginalFightTactic];
};
};
// ------ Verfolgungstimer resetten ------
if ( (!C_BodyStateContains(other,BS_RUN)) && (!C_BodyStateContains(other, BS_JUMP)) )
{
Npc_SetStateTime (self, 0);
};
// ------ ggf. Wachen rufen ------
if (Npc_GetStateTime (self) > 2)
&& (self.aivar[AIV_TAPOSITION] == 0)
{
B_CallGuards();
self.aivar[AIV_TAPOSITION] = 1;
};
// ------ Nochmal bei Verfolgung Wachen rufen ------
if (Npc_GetStateTime (self) > 8)
&& (self.aivar[AIV_TAPOSITION] == 1)
{
B_CallGuards();
self.aivar[AIV_TAPOSITION] = 2;
};
// ------ ggf. Munition generieren ------
B_CreateAmmo(self); //muß VOR SelectWeapon kommen, weil sonst Bogen bei fehlender Muni nicht gezogen wird
// ------ immer volles MANA ------
//wird in B_ReadySpell gemacht
// ------ Waffe ziehen oder wechseln ------
B_SelectWeapon (self, other); //Waffe oder Spell ziehen
// ------ ATTACK ------
if ((Hlp_IsValidNpc(other))
&& (C_NpcIsDown(other) == FALSE))
{
if (B_GetAivar(other, AIV_INVINCIBLE) == FALSE) // Nur NSCs angreifen, die NICHT im Talk sind
{
//führt Angriff mit Waffe oder Spell aus (Aktion wird durch FAI bestimmt)
AI_Attack (self); //In der Funktion, in der AI_Attack aufgerufen wird DARF KEIN AI_ Befehl VOR AI_Attack kommen, da sonst AI_Attack ignoriert wird
//(AI-Attack funktioniert NUR, wenn die AIqueue leer ist!)
}
else
{
Npc_ClearAIQueue(self); //killt den letzten AI_Attack-Befehl, verhindert z.B. stumpfes weiterrennen.
};
self.aivar[AIV_LASTTARGET] = Hlp_GetInstanceID (other);
return LOOP_CONTINUE;
}
else //target ungültig (tot) oder down // falls NPC_GetTarget(self) == FALSE --> other hier automatisch gelöscht
{
// ------ noch in der Queue befindliche Attacks löschen ------
Npc_ClearAIQueue(self);
// ------ wenn Spieler niedergeschlagen, temp_att (upset) resetten ------
if (Hlp_IsValidNpc(other))
&& (Npc_IsPlayer(other))
&& (C_NpcIsDown(other))
{
Npc_SetTempAttitude(self, Npc_GetPermAttitude(self,hero));
};
// ------ NUR neues Ziel wählen, wenn AR NICHT Kill ------
if (self.aivar [AIV_ATTACKREASON] != AR_KILL)
{
Npc_PerceiveAll (self); // nötig, da Npc_GetNextTarget() auf der Liste der zuletzt Wahrgenommenen VOBs beruht, und das kann hier schon ne Weile her sein, denn ZS_Attack hat keine aktiven Wahrnehmungen
if (!Npc_GetNextTarget (self))
{
return LOOP_END;
};
};
// ----- ist neues Ziel gefunden, in Reichweite, nicht down, nicht im Dialog, nicht FakeBandit und ich selbst Bandit? Dann neues Ziel, sonst End ------
if (Hlp_IsValidNpc(other))
&& (!C_NpcIsDown(other))
&& ((Npc_GetDistToNpc(self, other) < PERC_DIST_INTERMEDIAT) || (Npc_IsPlayer(other)) ) //Bei Nicht-Player Enemies nur auf 1000m reagieren (sonst PERC_DIST_ACTIVE_MAX)
&& (Npc_GetHeightToNpc(self, other) < PERC_DIST_HEIGHT)
&& (B_GetAivar(other, AIV_INVINCIBLE) == FALSE)
&& (!( C_PlayerIsFakeBandit(self, other) && (self.guild == GIL_BDT) ) )
{
if (Wld_GetGuildAttitude(self.guild, other.guild) == ATT_HOSTILE)
{
self.aivar[AIV_ATTACKREASON] = AR_GuildEnemy;
// BUGFIX: Nicht, wenn verwandelt
if (C_NpcIsHero(other))
{
self.aivar[AIV_LastPlayerAR] = AR_GuildEnemy;
B_SetAivar(self, AIV_LastFightAgainstPlayer, FIGHT_CANCEL);
self.aivar[AIV_LastFightComment] = FALSE;
};
}
else if (Npc_GetAttitude(self, other) == ATT_HOSTILE) //Temp hostile (upset) zum Spieler
// UND Npc_IsPlayer(other), weil ich NUR zum Player Temp_Att haben kann!
{
self.aivar[AIV_ATTACKREASON] = self.aivar[AIV_LastPlayerAR];
};
return LOOP_CONTINUE;
}
else // wenn false, wird other gelöscht!
{
Npc_ClearAIQueue(self);
if (B_GetAivar(self, AIV_LastFightAgainstPlayer) == FIGHT_CANCEL)
&& (self.aivar[AIV_LASTTARGET] != Hlp_GetInstanceID (hero)) //letztes Ziel NICHT Player
{
self.aivar[AIV_LastFightComment] = TRUE; //kein Kommentar abegeben
};
return LOOP_END;
};
};
};
func void ZS_Attack_End ()
{
// ------ other wieder holen, ist hier auf jeden Fall gelöscht! ------
other = Hlp_GetNpc(self.aivar[AIV_LASTTARGET]);
if (Hlp_GetInstanceID(self) == Hlp_GetInstanceID(Mod_7368_JG_Jaeger_NW))
{
return;
};
// ----- Nachbereitung bei Verfolgungsabbruch ------
if (self.aivar[AIV_PursuitEnd] == TRUE)
{
// ------ TEMP_Hostile zum Player (NSC ist "upset") ------
// BUGFIX: Nicht, wenn verwandelt
if (Hlp_IsValidNpc(other))
&& (C_NpcIsHero (other))
&& (self.npctype != NPCTYPE_FRIEND)
{
Npc_SetTempAttitude(self, ATT_HOSTILE);
};
// ------- Arenafight Ende -------
if (self.aivar[AIV_ArenaFight] == AF_RUNNING)
{
self.aivar[AIV_ArenaFight] = AF_AFTER;
};
};
// ------ Kampf zuende ------
if (self.aivar[AIV_PursuitEnd] == FALSE)
&& (!C_NpcIsSeelenpeiniger(self))
{
// ------ wenn Spieler während der Verfolgung Absolution erlangt hat ------
if (B_GetCurrentAbsolutionLevel(self) > self.aivar[AIV_LastAbsolutionLevel])
{
B_Say (self, other , "$WISEMOVE");
}
else //Normales Kampfende
{
B_Say_AttackEnd();
};
};
if (self.npctype == NPCTYPE_MT_GARDIST)
&& (self.aivar[AIV_AttackReason] == AR_KILL)
{
self.aivar[AIV_AttackReason] = AR_NONE;
B_SetAttitude(self, ATT_FRIENDLY);
};
// ------ mein Gegner vom Spieler getötet ------
if (other.aivar[AIV_KilledByPlayer] == TRUE)
&& (Wld_GetGuildAttitude(self.guild, hero.guild) != ATT_HOSTILE)
{
B_SetAttitude(self, ATT_FRIENDLY);
};
// ------ Finishing Move ------
if (Npc_IsInState (other, ZS_Unconscious))
&& (C_NpcHasAttackReasonToKill (self))
{
B_FinishingMove (self, other);
};
// ------ Waffe weg -------
if (self.aivar[AIV_ATTACKREASON] != AR_BERSERK)
{
AI_RemoveWeapon (self);
};
if (Hlp_GetInstanceID(self) == Hlp_GetInstanceID(Mod_1872_NONE_Unbekannt_MT))
&& (Hlp_GetInstanceID(other) == Hlp_GetInstanceID(Mod_1871_TPL_GorKaranto_MT))
&& (Mod_GorKarantoSchwach == TRUE)
{
B_LogEntry (TOPIC_MOD_AL_ARENA, "Er kämpft wirklich nicht sehr gut, aber er hat den Templer Gor Karanto trotzdem leicht besiegt. Ich glaube, ich sehe mir mal an, wie er sich gegen mich schlägt.");
Mod_GorKarantoSchwach = 2;
B_StartOtherRoutine (self, "START");
B_StartOtherRoutine (other, "START");
return;
};
// ------ Plündern ------
if (C_NpcIsDown(other))
&& (C_WantToRansack(self))
&& ((B_GetAivar(other, AIV_RANSACKED) == FALSE) || C_NpcRansacksAlways(self) )
&& (Npc_GetDistToNpc(self, other) < PERC_DIST_INTERMEDIAT)
&& (self.aivar[AIV_ATTACKREASON] != AR_BERSERK)
{
// ------ Opfer wird markiert, damit nur EINER plündert - abgefragt vor Aufruf von ZS_RansackBody -------
B_SetAivar(other, AIV_RANSACKED, TRUE); //FALSE gesetzt in ZS_Unconcious_End und ZS_Dead
if (other.guild < GIL_SEPERATOR_HUM)
&& (Hlp_GetInstanceID(self) != Hlp_GetInstanceID(Mod_7106_ASS_Ramsi_NW))
{
AI_StartState (self, ZS_RansackBody, 0, "");
return;
}
else if (other.guild > GIL_SEPERATOR_HUM)
|| ((Hlp_GetInstanceID(self) == Hlp_GetInstanceID(Mod_7106_ASS_Ramsi_NW))
&& (Npc_HasItems(other, ItFo_MuttonRaw) >= 0))
{
// ------ AlliJack nimmt Fleisch ------
AI_StartState (self, ZS_GetMeat, 0, "");
return;
};
};
if (self.aivar[AIV_ATTACKREASON] == AR_BERSERK)
{
AI_StartState (self, ZS_Wahnsinn, 0, "");
return;
};
// ------ NSC heilt sich ------
if (self.attribute[ATR_HITPOINTS] < (self.attribute[ATR_HITPOINTS_MAX]))
{
AI_StartState (self, ZS_HealSelf, 0, "");
return;
};
}; | D |
module ggplotd.legend;
import cairo = cairo;
import ggplotd.colour : ColourGradient;
private struct Legend
{
string type = "continuous";
int height = 70;
int width = 80;
}
/++
Create a legend using a continuous scale
Params:
width = Optional width in pixels
height = Optional height in pixels
+/
auto continuousLegend(int width = 80, int height = 70)
{
return Legend("continuous", width, height);
}
/++
Create a legend using a discrete scale
Params:
width = Optional width in pixels
height = Optional height in pixels
+/
auto discreteLegend(int width = 80, int height = 70)
{
return Legend("discrete", width, height);
}
/// Draw a legend for a continuous value to the given surface
auto drawContinuousLegend(CR, CG)
(ref cairo.Surface surface, int width, int height,
CR colourStore, CG colourGradient )
{
import std.algorithm : reduce;
import std.typecons : tuple;
import ggplotd.ggplotd : GGPlotD, Margins;
import ggplotd.algorithm : safeMin, safeMax;
import ggplotd.aes : Aes;
import ggplotd.geom : geomPolygon;
import ggplotd.axes : xaxisShow;
// TODO: constify
// TODO: make sure to test with alternative coloursceme (the hist2D examples, should suffice)
auto gg = GGPlotD();
gg.put(Margins(15, 0, 0, 0));
gg.put( colourGradient );
auto aes = Aes!( double[], "x", double[], "y", double[], "colour" )
( [0.0,0,1,1],
[colourStore.min(), colourStore.max(), colourStore.max(), colourStore.min()],
[colourStore.min(), colourStore.max(), colourStore.max(), colourStore.min()]);
gg.put( geomPolygon(aes) );
gg.put( xaxisShow(false) );
gg.drawToSurface( surface, width, height );
return surface;
}
/// Draw a legend for a discrete value to the given surface
auto drawDiscreteLegend(CR, CG)
(ref cairo.Surface surface, int width, int height,
CR colourStore, CG colourGradient )
{
import std.algorithm : map;
import std.array : array;
import std.conv : to;
import std.range : repeat, walkLength;
import std.typecons : tuple;
import ggplotd.ggplotd : GGPlotD, Margins;
import ggplotd.algorithm : safeMin, safeMax;
import ggplotd.aes : Aes;
import ggplotd.geom : geomRectangle;
import ggplotd.axes : xaxisShow, xaxisRange;
import ggplotd.range : uniquer;
// TODO: constify
// TODO: make sure to test with alternative coloursceme (the hist2D examples, should suffice)
auto gg = GGPlotD();
gg.put(Margins(15, 0, 0, 0));
gg.put(colourGradient);
//auto ys = colourRange.uniquer.map!((a) => a.to!double);
auto cols = colourStore.store;
auto xs = (1.0).repeat(cols.walkLength);
auto dims = (0.8).repeat(cols.walkLength);
auto aes = Aes!( typeof(xs), "x", typeof(cols), "y",
typeof(cols), "colour", typeof(dims), "width",
typeof(dims), "height", typeof(xs), "fill")
( xs, cols, cols, dims, dims, xs);
gg.put( geomRectangle(aes) );
gg.put( xaxisShow(false) );
gg.put( xaxisRange(0.5, 1.0) );
gg.drawToSurface( surface, width, height );
return surface;
}
| D |
a newspaper that is published every day
of or belonging to or occurring every day
appropriate for ordinary or routine occasions
every day
gradually and progressively
| D |
/*******************************************************************************
* Copyright (c) 2000, 2008 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
* Port to the D programming language:
* Frank Benoit <benoit@tionex.de>
*******************************************************************************/
module org.eclipse.swt.events.FocusEvent;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.events.TypedEvent;
/**
* Instances of this class are sent as a result of
* widgets gaining and losing focus.
*
* @see FocusListener
* @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
*/
public final class FocusEvent : TypedEvent {
//static const long serialVersionUID = 3258134643684227381L;
/**
* Constructs a new instance of this class based on the
* information in the given untyped event.
*
* @param e the untyped event containing the information
*/
public this(Event e) {
super(e);
}
}
| D |
/++
This is a submodule of $(MREF mir,ndslice).
Iterator is a type with a pointer like behavior.
An ndslice can be created on top of an iterator using $(SUBREF slice, sliced).
$(BOOKTABLE $(H2 Iterators),
$(TR $(TH Iterator Name) $(TH Used By))
$(T2 BytegroupIterator, $(SUBREF topology, bytegroup).)
$(T2 CachedIterator, $(SUBREF topology, cached), $(SUBREF topology, cachedGC).)
$(T2 ChopIterator, $(SUBREF topology, chopped))
$(T2 FieldIterator, $(SUBREF slice, slicedField), $(SUBREF topology, bitwise), $(SUBREF topology, ndiota), and others.)
$(T2 FlattenedIterator, $(SUBREF topology, flattened))
$(T2 IndexIterator, $(SUBREF topology, indexed))
$(T2 IotaIterator, $(SUBREF topology, iota))
$(T2 MapIterator, $(SUBREF topology, map))
$(T2 MemberIterator, $(SUBREF topology, member))
$(T2 NeighboursIterator, $(SUBREF topology, withNeighboursSum))
$(T2 RetroIterator, $(SUBREF topology, retro))
$(T2 SliceIterator, $(SUBREF topology, map) in composition with $(LREF MapIterator) for packed slices.)
$(T2 SlideIterator, $(SUBREF topology, diff), $(SUBREF topology, pairwise), and $(SUBREF topology, slide).)
$(T2 StairsIterator, $(SUBREF topology, stairs))
$(T2 StrideIterator, $(SUBREF topology, stride))
$(T2 SubSliceIterator, $(SUBREF topology, subSlices))
$(T2 TripletIterator, $(SUBREF topology, triplets))
$(T2 ZipIterator, $(SUBREF topology, zip))
)
License: $(HTTP www.apache.org/licenses/LICENSE-2.0, Apache-2.0)
Copyright: 2020 Ilia Ki, Kaleidic Associates Advisory Limited, Symmetry Investments
Authors: Ilia Ki
Macros:
SUBREF = $(REF_ALTTEXT $(TT $2), $2, mir, ndslice, $1)$(NBSP)
T2=$(TR $(TDNW $(LREF $1)) $(TD $+))
+/
module mir.ndslice.iterator;
import mir.internal.utility: Iota;
import mir.math.common: fmamath;
import mir.ndslice.field;
import mir.ndslice.internal;
import mir.ndslice.slice: SliceKind, Slice, Universal, Canonical, Contiguous, isSlice;
import mir.qualifier;
import mir.conv;
import std.traits;
private static immutable assumeZeroShiftExceptionMsg = "*.assumeFieldsHaveZeroShift: shift is not zero!";
version(D_Exceptions)
private static immutable assumeZeroShiftException = new Exception(assumeZeroShiftExceptionMsg);
@fmamath:
enum std_ops = q{
void opUnary(string op)() scope
if (op == "--" || op == "++")
{ mixin(op ~ "_iterator;"); }
void opOpAssign(string op)(ptrdiff_t index) scope
if (op == "-" || op == "+")
{ mixin("_iterator " ~ op ~ "= index;"); }
auto opBinary(string op)(ptrdiff_t index)
if (op == "+" || op == "-")
{
auto ret = this;
mixin(`ret ` ~ op ~ `= index;`);
return ret;
}
ptrdiff_t opBinary(string op : "-")(scope ref const typeof(this) right) scope const
{ return this._iterator - right._iterator; }
bool opEquals()(scope ref const typeof(this) right) scope const
{ return this._iterator == right._iterator; }
ptrdiff_t opCmp()(scope ref const typeof(this) right) scope const
{
static if (isPointer!Iterator)
return this._iterator - right._iterator;
else
return this._iterator.opCmp(right._iterator);
}
};
/++
Step counter.
`IotaIterator` is used by $(SUBREF topology, iota).
+/
struct IotaIterator(I)
if (isIntegral!I || isPointer!I)
{
@fmamath:
///
I _index;
static if (isPointer!I)
///
auto lightConst()() const @property
{
static if (isIntegral!I)
return IotaIterator!I(_index);
else
return IotaIterator!(LightConstOf!I)(_index);
}
static if (isPointer!I)
///
auto lightImmutable()() immutable @property
{
static if (isIntegral!I)
return IotaIterator!I(_index);
else
return IotaIterator!(LightImmutableOf!I)(_index);
}
pure:
I opUnary(string op : "*")()
{ return _index; }
void opUnary(string op)()
if (op == "--" || op == "++")
{ mixin(op ~ `_index;`); }
I opIndex()(ptrdiff_t index) const
{ return cast(I)(_index + index); }
void opOpAssign(string op)(ptrdiff_t index)
if (op == `+` || op == `-`)
{ mixin(`_index ` ~ op ~ `= index;`); }
auto opBinary(string op)(ptrdiff_t index)
if (op == "+" || op == "-")
{
auto ret = this;
mixin(`ret ` ~ op ~ `= index;`);
return ret;
}
ptrdiff_t opBinary(string op : "-")(const typeof(this) right) const
{ return cast(ptrdiff_t)(this._index - right._index); }
bool opEquals()(const typeof(this) right) const
{ return this._index == right._index; }
auto opCmp()(const typeof(this) right) const
{ return this._index - right._index; }
}
///
@safe pure nothrow @nogc version(mir_ndslice_test) unittest
{
IotaIterator!int iota;
assert(*iota == 0);
// iteration
++iota;
assert(*iota == 1);
assert(iota[2] == 3);
assert(iota[-1] == 0);
--iota;
assert(*iota == 0);
// opBinary
assert(*(iota + 2) == 2);
assert(*(iota - 3) == -3);
assert((iota - 3) - iota == -3);
// construction
assert(*IotaIterator!int(3) == 3);
assert(iota - 1 < iota);
}
///
pure nothrow @nogc version(mir_ndslice_test) unittest
{
int[32] data;
auto iota = IotaIterator!(int*)(data.ptr);
assert(*iota == data.ptr);
// iteration
++iota;
assert(*iota == 1 + data.ptr);
assert(iota[2] == 3 + data.ptr);
assert(iota[-1] == 0 + data.ptr);
--iota;
assert(*iota == 0 + data.ptr);
// opBinary
assert(*(iota + 2) == 2 + data.ptr);
assert(*(iota - 3) == -3 + data.ptr);
assert((iota - 3) - iota == -3);
// construction
assert(*IotaIterator!(int*)(data.ptr) == data.ptr);
assert(iota - 1 < iota);
}
auto RetroIterator__map(Iterator, alias fun)(ref RetroIterator!Iterator it)
{
auto iterator = it._iterator._mapIterator!fun;
return RetroIterator!(typeof(iterator))(iterator);
}
version(mir_ndslice_test) unittest
{
import mir.ndslice.topology;
import mir.ndslice.allocation;
auto v = iota(9).retro.map!(a => a).slice;
uint r;
auto w = iota(9).retro.map!(a => a).map!(a => a * r).slice;
}
/++
Reverse directions for an iterator.
`RetroIterator` is used by $(SUBREF topology, retro).
+/
struct RetroIterator(Iterator)
{
@fmamath:
///
Iterator _iterator;
///
auto lightConst()() const @property
{
return RetroIterator!(LightConstOf!Iterator)(.lightConst(_iterator));
}
///
auto lightImmutable()() immutable @property
{
return RetroIterator!(LightImmutableOf!Iterator)(.lightImmutable(_iterator));
}
///
static alias __map(alias fun) = RetroIterator__map!(Iterator, fun);
auto ref opUnary(string op : "*")()
{ return *_iterator; }
void opUnary(string op : "--")()
{ ++_iterator; }
void opUnary(string op : "++")() pure
{ --_iterator; }
auto ref opIndex()(ptrdiff_t index)
{ return _iterator[-index]; }
void opOpAssign(string op : "-")(ptrdiff_t index) scope
{ _iterator += index; }
void opOpAssign(string op : "+")(ptrdiff_t index) scope
{ _iterator -= index; }
auto opBinary(string op)(ptrdiff_t index)
if (op == "+" || op == "-")
{
auto ret = this;
mixin(`ret ` ~ op ~ `= index;`);
return ret;
}
ptrdiff_t opBinary(string op : "-")(scope ref const typeof(this) right) scope const
{ return right._iterator - this._iterator; }
bool opEquals()(scope ref const typeof(this) right) scope const
{ return right._iterator == this._iterator; }
ptrdiff_t opCmp()(scope ref const typeof(this) right) scope const
{
static if (isPointer!Iterator)
return right._iterator - this._iterator;
else
return right._iterator.opCmp(this._iterator);
}
}
///
@safe pure nothrow @nogc version(mir_ndslice_test) unittest
{
IotaIterator!int iota;
RetroIterator!(IotaIterator!int) retro;
++iota;
--retro;
assert(*retro == *iota);
--iota;
++retro;
assert(*retro == *iota);
assert(retro[-7] == iota[7]);
iota += 100;
retro -= 100;
assert(*retro == *iota);
iota -= 100;
retro += 100;
assert(*retro == *iota);
assert(*(retro + 10) == *(iota - 10));
assert(retro - 1 < retro);
assert((retro - 5) - retro == -5);
iota = IotaIterator!int(3);
retro = RetroIterator!(IotaIterator!int)(iota);
assert(*retro == *iota);
}
auto StrideIterator__map(Iterator, alias fun)(StrideIterator!Iterator it)
{
auto iterator = it._iterator._mapIterator!fun;
return StrideIterator!(typeof(iterator))(it._stride, iterator);
}
version(mir_ndslice_test) unittest
{
import mir.ndslice.topology;
import mir.ndslice.allocation;
auto v = iota([3], 0, 3).map!(a => a).slice;
uint r;
auto w = iota([3], 0, 3).map!(a => a).map!(a => a * r).slice;
}
/++
Iterates an iterator with a fixed strides.
`StrideIterator` is used by $(SUBREF topology, stride).
+/
struct StrideIterator(Iterator)
{
@fmamath:
///
ptrdiff_t _stride;
///
Iterator _iterator;
///
auto lightConst()() const @property
{
return StrideIterator!(LightConstOf!Iterator)(_stride, .lightConst(_iterator));
}
///
auto lightImmutable()() immutable @property
{
return StrideIterator!(LightImmutableOf!Iterator)(_stride, .lightImmutable(_iterator));
}
///
static alias __map(alias fun) = StrideIterator__map!(Iterator, fun);
auto ref opUnary(string op : "*")()
{ return *_iterator; }
void opUnary(string op)() scope
if (op == "--" || op == "++")
{ mixin("_iterator " ~ op[0] ~ "= _stride;"); }
auto ref opIndex()(ptrdiff_t index)
{ return _iterator[index * _stride]; }
void opOpAssign(string op)(ptrdiff_t index) scope
if (op == "-" || op == "+")
{ mixin("_iterator " ~ op ~ "= index * _stride;"); }
auto opBinary(string op)(ptrdiff_t index)
if (op == "+" || op == "-")
{
auto ret = this;
mixin(`ret ` ~ op ~ `= index;`);
return ret;
}
ptrdiff_t opBinary(string op : "-")(scope ref const typeof(this) right) scope const
{ return (this._iterator - right._iterator) / _stride; }
bool opEquals()(scope ref const typeof(this) right) scope const
{ return this._iterator == right._iterator; }
ptrdiff_t opCmp()(scope ref const typeof(this) right) scope const
{
static if (isPointer!Iterator)
ptrdiff_t ret = this._iterator - right._iterator;
else
ptrdiff_t ret = this._iterator.opCmp(right._iterator);
return _stride >= 0 ? ret : -ret;
}
}
///
@safe pure nothrow @nogc version(mir_ndslice_test) unittest
{
IotaIterator!int iota;
StrideIterator!(IotaIterator!int) stride;
stride._stride = -3;
iota -= stride._stride;
--stride;
assert(*stride == *iota);
iota += stride._stride;
++stride;
assert(*stride == *iota);
assert(stride[7] == iota[7 * stride._stride]);
iota -= 100 * stride._stride;
stride -= 100;
assert(*stride == *iota);
iota += 100 * stride._stride;
stride += 100;
assert(*stride == *iota);
assert(*(stride + 10) == *(iota + 10 * stride._stride));
assert(stride - 1 < stride);
assert((stride - 5) - stride == -5);
iota = IotaIterator!int(3);
stride = StrideIterator!(IotaIterator!int)(3, iota);
assert(*stride == *iota);
}
auto StrideIterator__map(Iterator, size_t factor, alias fun)(StrideIterator!(Iterator, factor) it)
{
auto iterator = it._iterator._mapIterator!fun;
return StrideIterator!(typeof(iterator), factor)(iterator);
}
/++
Iterates an iterator with a fixed strides.
`StrideIterator` is used by $(SUBREF topology, stride).
+/
struct StrideIterator(Iterator, ptrdiff_t factor)
{
@fmamath:
///
enum _stride = factor;
///
Iterator _iterator;
///
auto lightConst()() const @property
{
return StrideIterator!(LightConstOf!Iterator, _stride)(.lightConst(_iterator));
}
///
auto lightImmutable()() immutable @property
{
return StrideIterator!(LightImmutableOf!Iterator, _stride)(.lightImmutable(_iterator));
}
///
static alias __map(alias fun) = StrideIterator__map!(Iterator, _stride, fun);
auto ref opUnary(string op : "*")()
{ return *_iterator; }
void opUnary(string op)() scope
if (op == "--" || op == "++")
{ mixin("_iterator " ~ op[0] ~ "= _stride;"); }
auto ref opIndex()(ptrdiff_t index)
{ return _iterator[index * _stride]; }
void opOpAssign(string op)(ptrdiff_t index) scope
if (op == "-" || op == "+")
{ mixin("_iterator " ~ op ~ "= index * _stride;"); }
auto opBinary(string op)(ptrdiff_t index)
if (op == "+" || op == "-")
{
auto ret = this;
mixin(`ret ` ~ op ~ `= index;`);
return ret;
}
ptrdiff_t opBinary(string op : "-")(scope ref const typeof(this) right) scope const
{ return (this._iterator - right._iterator) / _stride; }
bool opEquals()(scope ref const typeof(this) right) scope const
{ return this._iterator == right._iterator; }
ptrdiff_t opCmp()(scope ref const typeof(this) right) scope const
{
static if (isPointer!Iterator)
ptrdiff_t ret = this._iterator - right._iterator;
else
ptrdiff_t ret = this._iterator.opCmp(right._iterator);
return _stride >= 0 ? ret : -ret;
}
}
///
@safe pure nothrow @nogc version(mir_ndslice_test) unittest
{
IotaIterator!int iota;
StrideIterator!(IotaIterator!int, -3) stride;
iota -= stride._stride;
--stride;
assert(*stride == *iota);
iota += stride._stride;
++stride;
assert(*stride == *iota);
assert(stride[7] == iota[7 * stride._stride]);
iota -= 100 * stride._stride;
stride -= 100;
assert(*stride == *iota);
iota += 100 * stride._stride;
stride += 100;
assert(*stride == *iota);
assert(*(stride + 10) == *(iota + 10 * stride._stride));
assert(stride - 1 < stride);
assert((stride - 5) - stride == -5);
}
package template _zip_types(Iterators...)
{
alias AliasSeq(T...) = T;
static if (Iterators.length)
{
enum i = Iterators.length - 1;
alias T = typeof(Iterators[i].init[sizediff_t.init]);
static if (__traits(compiles, &Iterators[i].init[sizediff_t.init]))
{
import mir.functional: Ref;
alias _zip_types = AliasSeq!(_zip_types!(Iterators[0 .. i]), Ref!T);
}
else
alias _zip_types = AliasSeq!(_zip_types!(Iterators[0 .. i]), T);
}
else
alias _zip_types = AliasSeq!();
}
package template _zip_fronts(Iterators...)
{
static if (Iterators.length)
{
enum i = Iterators.length - 1;
static if (__traits(compiles, &Iterators[i].init[sizediff_t.init]))
enum _zip_fronts = _zip_fronts!(Iterators[0 .. i]) ~ "_ref(*_iterators[" ~ i.stringof ~ "]), ";
else
enum _zip_fronts = _zip_fronts!(Iterators[0 .. i]) ~ "*_iterators[" ~ i.stringof ~ "], ";
}
else
enum _zip_fronts = "";
}
package template _zip_index(Iterators...)
{
static if (Iterators.length)
{
enum i = Iterators.length - 1;
static if (__traits(compiles, &Iterators[i].init[sizediff_t.init]))
enum _zip_index = _zip_index!(Iterators[0 .. i]) ~ "_ref(_iterators[" ~ i.stringof ~ "][index]), ";
else
enum _zip_index = _zip_index!(Iterators[0 .. i]) ~ "_iterators[" ~ i.stringof ~ "][index], ";
}
else
enum _zip_index = "";
}
/++
Iterates multiple iterators in lockstep.
`ZipIterator` is used by $(SUBREF topology, zip).
+/
struct ZipIterator(Iterators...)
if (Iterators.length > 1)
{
@fmamath:
import std.traits: ConstOf, ImmutableOf;
import std.meta: staticMap;
import mir.functional: Tuple, Ref, _ref;
///
Iterators _iterators;
///
auto lightConst()() const @property
{
import std.format: format;
import mir.ndslice.topology: iota;
import std.meta: staticMap;
alias Ret = ZipIterator!(staticMap!(LightConstOf, Iterators));
enum ret = "Ret(%(.lightConst(_iterators[%s]),%)]))".format(_iterators.length.iota);
return mixin(ret);
}
///
auto lightImmutable()() immutable @property
{
import std.format: format;
import mir.ndslice.topology: iota;
import std.meta: staticMap;
alias Ret = ZipIterator!(staticMap!(LightImmutableOf, Iterators));
enum ret = "Ret(%(.lightImmutable(_iterators[%s]),%)]))".format(_iterators.length.iota);
return mixin(ret);
}
auto opUnary(string op : "*")()
{ return mixin("Tuple!(_zip_types!Iterators)(" ~ _zip_fronts!Iterators ~ ")"); }
auto opUnary(string op : "*")() const
{ return mixin("Tuple!(_zip_types!Iterators)(" ~ _zip_fronts!Iterators ~ ")"); }
auto opUnary(string op : "*")() immutable
{ return mixin("Tuple!(_zip_types!Iterators)(" ~ _zip_fronts!Iterators ~ ")"); }
void opUnary(string op)() scope
if (op == "++" || op == "--")
{
foreach (ref _iterator; _iterators)
mixin(op ~ `_iterator;`);
}
auto opIndex()(ptrdiff_t index)
{ return mixin("Tuple!(_zip_types!Iterators)(" ~ _zip_index!Iterators ~ ")"); }
auto opIndexAssign(Types...)(Tuple!(Types) value, ptrdiff_t index)
if (Types.length == Iterators.length)
{
foreach(i, ref val; value.expand)
{
import mir.functional: unref;
_iterators[i][index] = unref(val);
}
return opIndex(index);
}
void opOpAssign(string op)(ptrdiff_t index) scope
if (op == "+" || op == "-")
{
foreach (ref _iterator; _iterators)
mixin(`_iterator ` ~ op ~ `= index;`);
}
auto opBinary(string op)(ptrdiff_t index)
if (op == "+" || op == "-")
{
auto ret = this;
mixin(`ret ` ~ op ~ `= index;`);
return ret;
}
ptrdiff_t opBinary(string op : "-")(scope ref const typeof(this) right) scope const
{ return this._iterators[0] - right._iterators[0]; }
bool opEquals()(scope ref const typeof(this) right) scope const
{ return this._iterators[0] == right._iterators[0]; }
ptrdiff_t opCmp()(scope ref const typeof(this) right) scope const
{
static if (isPointer!(Iterators[0]))
return this._iterators[0] - right._iterators[0];
else
return this._iterators[0].opCmp(right._iterators[0]);
}
import std.meta: anySatisfy;
static if (anySatisfy!(hasZeroShiftFieldMember, Iterators))
/// Defined if at least one of `Iterators` has member `assumeFieldsHaveZeroShift`.
auto assumeFieldsHaveZeroShift() @property
{
import std.meta: staticMap;
alias _fields = _iterators;
return mixin("ZipField!(staticMap!(ZeroShiftField, Iterators))(" ~ applyAssumeZeroShift!Iterators ~ ")");
}
}
///
pure nothrow @nogc version(mir_ndslice_test) unittest
{
import mir.ndslice.traits: isIterator;
double[10] data = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
alias ItA = IotaIterator!int;
alias ItB = double*;
alias ItZ = ZipIterator!(ItA, ItB);
auto zip = ItZ(ItA(3), data.ptr);
assert((*zip).a == 3);
assert((*zip).b == 1);
// iteration
++zip;
assert((*zip).a == 3 + 1);
assert((*zip).b == 1 + 1);
assert(&(*zip).b() == data.ptr + 1);
assert(zip[4].a == 3 + 5);
assert(zip[4].b == 1 + 5);
assert(&zip[4].b() == data.ptr + 5);
--zip;
assert((*zip).a == 3);
assert((*zip).b == 1);
assert((*(zip + 2)).a == 3 + 2);
assert((*(zip - 3)).a == 3 + -3);
assert((*(zip + 2)).b == 1 + 2);
assert((*(zip + 3 - 3)).b == 1);
assert((zip - 3).opBinary!"-"(zip) == -3);
assert(zip == zip);
assert(zip - 1 < zip);
static assert(isIterator!(ZipIterator!(double*, int*)));
static assert(isIterator!(ZipIterator!(immutable(double)*, immutable(int)*)));
}
///
struct CachedIterator(Iterator, CacheIterator, FlagIterator)
{
///
Iterator _iterator;
///
CacheIterator _caches;
///
FlagIterator _flags;
@fmamath:
///
auto lightScope()() return scope @property
{
return CachedIterator!(LightScopeOf!Iterator, LightScopeOf!CacheIterator, LightScopeOf!FlagIterator)(
.lightScope(_iterator),
.lightScope(_caches),
.lightScope(_flags),
);
}
///
auto lightScope()() return scope const @property
{
return lightConst.lightScope;
}
///
auto lightScope()() return scope immutable @property
{
return lightImmutable.lightScope;
}
///
auto lightConst()() const @property
{
return CachedIterator!(LightConstOf!Iterator, CacheIterator, FlagIterator)(
.lightConst(_iterator),
*cast(CacheIterator*)&_caches,
*cast(FlagIterator*)&_flags,
);
}
///
auto lightImmutable()() immutable @property @trusted
{
return CachedIterator!(LightImmutableOf!Iterator, CacheIterator, FlagIterator)(
.lightImmutable(_iterator),
*cast(CacheIterator*)&_caches,
*cast(FlagIterator*)&_flags,
);
}
private alias T = typeof(Iterator.init[0]);
private alias UT = Unqual!T;
auto opUnary(string op : "*")()
{
if (_expect(!*_flags, false))
{
_flags[0] = true;
emplaceRef!T(*cast(UT*)&*_caches, *_iterator);
}
return *_caches;
}
auto opIndex()(ptrdiff_t index)
{
if (_expect(!_flags[index], false))
{
_flags[index] = true;
emplaceRef!T(*cast(UT*)&(_caches[index]), _iterator[index]);
}
return _caches[index];
}
auto ref opIndexAssign(T)(auto ref T val, ptrdiff_t index)
{
_flags[index] = true;
return _caches[index] = val;
}
void opUnary(string op)() scope
if (op == "--" || op == "++")
{
mixin(op ~ "_iterator;");
mixin(op ~ "_caches;");
mixin(op ~ "_flags;");
}
void opOpAssign(string op)(ptrdiff_t index) scope
if (op == "-" || op == "+")
{
mixin("_iterator" ~ op ~ "= index;");
mixin("_caches" ~ op ~ "= index;");
mixin("_flags" ~ op ~ "= index;");
}
auto opBinary(string op)(ptrdiff_t index)
if (op == "+" || op == "-")
{
auto ret = this;
mixin(`ret ` ~ op ~ `= index;`);
return ret;
}
ptrdiff_t opBinary(string op : "-")(scope ref const typeof(this) right) scope const
{ return this._iterator - right._iterator; }
bool opEquals()(scope ref const typeof(this) right) scope const
{ return this._iterator == right._iterator; }
ptrdiff_t opCmp()(scope ref const typeof(this) right) scope const
{
static if (isPointer!Iterator)
return this._iterator - right._iterator;
else
return this._iterator.opCmp(right._iterator);
}
}
private enum map_primitives = q{
import mir.functional: Tuple, autoExpandAndForward;
auto ref opUnary(string op : "*")()
{
static if (is(typeof(*_iterator) : Tuple!T, T...))
{
auto t = *_iterator;
return _fun(autoExpandAndForward!t);
}
else
return _fun(*_iterator);
}
auto ref opIndex(ptrdiff_t index) scope
{
static if (is(typeof(_iterator[0]) : Tuple!T, T...))
{
auto t = _iterator[index];
return _fun(autoExpandAndForward!t);
}
else
return _fun(_iterator[index]);
}
static if (!__traits(compiles, &opIndex(ptrdiff_t.init)))
{
auto ref opIndexAssign(T)(auto ref T value, ptrdiff_t index) scope
{
static if (is(typeof(_iterator[0]) : Tuple!T, T...))
{
auto t = _iterator[index];
return _fun(autoExpandAndForward!t) = value;
}
else
return _fun(_iterator[index]) = value;
}
auto ref opIndexUnary(string op)(ptrdiff_t index)
{
static if (is(typeof(_iterator[0]) : Tuple!T, T...))
{
auto t = _iterator[index];
return _fun(autoExpandAndForward!t);
}
else
return mixin(op ~ "_fun(_iterator[index])");
}
auto ref opIndexOpAssign(string op, T)(T value, ptrdiff_t index)
{
static if (is(typeof(_iterator[0]) : Tuple!T, T...))
{
auto t = _iterator[index];
return mixin("_fun(autoExpandAndForward!t)" ~ op ~ "= value");
}
else
return mixin("_fun(_iterator[index])" ~ op ~ "= value");
}
}
};
/++
`VmapIterator` is used by $(SUBREF topology, map).
+/
struct VmapIterator(Iterator, Fun)
{
@fmamath:
///
Iterator _iterator;
///
Fun _fun;
///
auto lightConst()() const @property
{
return VmapIterator!(LightConstOf!Iterator, LightConstOf!Fun)(.lightConst(_iterator), .lightConst(_fun));
}
///
auto lightImmutable()() immutable @property
{
return VmapIterator!(LightImmutableOf!Iterator, LightImmutableOf!Fun)(.lightImmutable(_iterator), .lightImmutable(_fun));
}
import mir.functional: Tuple, autoExpandAndForward;
auto ref opUnary(string op : "*")()
{
static if (is(typeof(*_iterator) : Tuple!T, T...))
{
auto t = *_iterator;
return _fun(autoExpandAndForward!t);
}
else
return _fun(*_iterator);
}
auto ref opIndex(ptrdiff_t index) scope
{
static if (is(typeof(_iterator[0]) : Tuple!T, T...))
{
auto t = _iterator[index];
return _fun(autoExpandAndForward!t);
}
else
return _fun(_iterator[index]);
}
static if (!__traits(compiles, &opIndex(ptrdiff_t.init)))
{
auto ref opIndexAssign(T)(auto ref T value, ptrdiff_t index) scope
{
static if (is(typeof(_iterator[0]) : Tuple!T, T...))
{
auto t = _iterator[index];
return _fun(autoExpandAndForward!t) = value;
}
else
return _fun(_iterator[index]) = value;
}
auto ref opIndexUnary(string op)(ptrdiff_t index)
{
static if (is(typeof(_iterator[0]) : Tuple!T, T...))
{
auto t = _iterator[index];
return mixin(op ~ "_fun(autoExpandAndForward!t)");
}
else
return mixin(op ~ "_fun(_iterator[index])");
}
auto ref opIndexOpAssign(string op, T)(T value, ptrdiff_t index)
{
static if (is(typeof(_iterator[0]) : Tuple!T, T...))
{
auto t = _iterator[index];
return mixin("_fun(autoExpandAndForward!t)" ~ op ~ "= value");
}
else
return mixin("_fun(_iterator[index])" ~ op ~ "= value");
}
}
mixin(std_ops);
static if (hasZeroShiftFieldMember!Iterator)
///
auto assumeFieldsHaveZeroShift() @property
{
return _vmapField(_iterator.assumeFieldsHaveZeroShift, _fun);
}
}
auto MapIterator__map(Iterator, alias fun0, alias fun)(ref MapIterator!(Iterator, fun0) it)
{
return MapIterator!(Iterator, fun)(it._iterator);
}
/++
`MapIterator` is used by $(SUBREF topology, map).
+/
struct MapIterator(Iterator, alias _fun)
{
@fmamath:
///
Iterator _iterator;
///
auto lightConst()() const @property
{
return MapIterator!(LightConstOf!Iterator, _fun)(.lightConst(_iterator));
}
///
auto lightImmutable()() immutable @property
{
return MapIterator!(LightImmutableOf!Iterator, _fun)(.lightImmutable(_iterator));
}
import mir.functional: pipe, autoExpandAndForward;
///
static alias __map(alias fun1) = MapIterator__map!(Iterator, _fun, pipe!(_fun, fun1));
import mir.functional: Tuple, autoExpandAndForward;
auto ref opUnary(string op : "*")()
{
static if (is(typeof(*_iterator) : Tuple!T, T...))
{
auto t = *_iterator;
return _fun(autoExpandAndForward!t);
}
else
return _fun(*_iterator);
}
auto ref opIndex(ptrdiff_t index) scope
{
static if (is(typeof(_iterator[0]) : Tuple!T, T...))
{
auto t = _iterator[index];
return _fun(autoExpandAndForward!t);
}
else
return _fun(_iterator[index]);
}
static if (!__traits(compiles, &opIndex(ptrdiff_t.init)))
{
auto ref opIndexAssign(T)(auto ref T value, ptrdiff_t index) scope
{
static if (is(typeof(_iterator[0]) : Tuple!T, T...))
{
auto t = _iterator[index];
return _fun(autoExpandAndForward!t) = value;
}
else
return _fun(_iterator[index]) = value;
}
auto ref opIndexUnary(string op)(ptrdiff_t index)
{
static if (is(typeof(_iterator[0]) : Tuple!T, T...))
{
auto t = _iterator[index];
return mixin(op ~ "_fun(autoExpandAndForward!t)");
}
else
return mixin(op ~ "_fun(_iterator[index])");
}
auto ref opIndexOpAssign(string op, T)(T value, ptrdiff_t index)
{
static if (is(typeof(_iterator[0]) : Tuple!T, T...))
{
auto t = _iterator[index];
return mixin("_fun(autoExpandAndForward!t)" ~ op ~ "= value");
}
else
return mixin("_fun(_iterator[index])" ~ op ~ "= value");
}
}
mixin(std_ops);
static if (hasZeroShiftFieldMember!Iterator)
///
auto assumeFieldsHaveZeroShift() @property
{
return _mapField!_fun(_iterator.assumeFieldsHaveZeroShift);
}
}
/+
Creates a mapped iterator. Uses `__map` if possible.
+/
auto _mapIterator(alias fun, Iterator)(Iterator iterator)
{
import core.lifetime: move;
static if (__traits(hasMember, Iterator, "__map"))
{
static if (is(Iterator : MapIterator!(Iter0, fun0), Iter0, alias fun0)
&& !__traits(compiles, Iterator.__map!fun(iterator)))
{
// https://github.com/libmir/mir-algorithm/issues/111
debug(mir) pragma(msg, __FUNCTION__~" not coalescing chained map calls into a single lambda, possibly because of multiple embedded context pointers");
return MapIterator!(Iterator, fun)(move(iterator));
}
else
return Iterator.__map!fun(iterator);
}
else
return MapIterator!(Iterator, fun)(move(iterator));
}
/+
Creates a mapped iterator. Uses `__vmap` if possible.
+/
auto _vmapIterator(Iterator, Fun)(Iterator iterator, Fun fun)
{
static if (__traits(hasMember, Iterator, "__vmap"))
return Iterator.__vmap(iterator, fun);
else
return MapIterator!(Iterator, fun)(iterator);
}
@safe pure nothrow @nogc version(mir_ndslice_test) unittest
{
// https://github.com/libmir/mir-algorithm/issues/111
import mir.ndslice.topology : iota, map;
import mir.functional : pipe;
static auto foo(T)(T x)
{
return x.map!(a => a + 1);
}
static auto bar(T)(T x)
{
return foo(x).map!(a => a + 2);
}
auto data = iota(5);
auto result = iota([5], 3);
auto x = data.map!(a => a + 1).map!(a => a + 2);
assert(x == result);
auto y = bar(data);
assert(y == result);
}
/++
`NeighboursIterator` is used by $(SUBREF topology, map).
+/
struct NeighboursIterator(Iterator, size_t N, alias _fun, bool around)
{
import std.meta: AliasSeq;
@fmamath:
///
Iterator _iterator;
static if (N)
Iterator[2][N] _neighbours;
else alias _neighbours = AliasSeq!();
///
auto lightConst()() const @property
{
LightConstOf!Iterator[2][N] neighbours;
foreach (i; 0 .. N)
{
neighbours[i][0] = .lightConst(_neighbours[i][0]);
neighbours[i][1] = .lightConst(_neighbours[i][1]);
}
return NeighboursIterator!(LightConstOf!Iterator, N, _fun, around)(.lightConst(_iterator), neighbours);
}
///
auto lightImmutable()() immutable @property
{
LightImmutableOf!Iterator[2][N] neighbours;
foreach (i; 0 .. N)
{
neighbours[i][0] = .lightImmutable(_neighbours[i][0]);
neighbours[i][1] = .lightImmutable(_neighbours[i][1]);
}
return NeighboursIterator!(LightImmutableOf!Iterator, N, _fun, around)(.lightImmutable(_iterator), neighbours);
}
import mir.functional: Tuple, _ref;
private alias RA = Unqual!(typeof(_fun(_iterator[-1], _iterator[+1])));
private alias Result = Tuple!(_zip_types!Iterator, RA);
auto ref opUnary(string op : "*")()
{
return opIndex(0);
}
auto ref opIndex(ptrdiff_t index) scope
{
static if (around)
RA result = _fun(_iterator[index - 1], _iterator[index + 1]);
foreach (i; Iota!N)
{
static if (i == 0 && !around)
RA result = _fun(_neighbours[i][0][index], _neighbours[i][1][index]);
else
result = _fun(result, _fun(_neighbours[i][0][index], _neighbours[i][1][index]));
}
static if (__traits(compiles, &_iterator[index]))
return Result(_ref(_iterator[index]), result);
else
return Result(_iterator[index], result);
}
void opUnary(string op)() scope
if (op == "--" || op == "++")
{
mixin(op ~ "_iterator;");
foreach (i; Iota!N)
{
mixin(op ~ "_neighbours[i][0];");
mixin(op ~ "_neighbours[i][1];");
}
}
void opOpAssign(string op)(ptrdiff_t index) scope
if (op == "-" || op == "+")
{
mixin("_iterator " ~ op ~ "= index;");
foreach (i; Iota!N)
{
mixin("_neighbours[i][0] " ~ op ~ "= index;");
mixin("_neighbours[i][1] " ~ op ~ "= index;");
}
}
auto opBinary(string op)(ptrdiff_t index)
if (op == "+" || op == "-")
{
auto ret = this;
mixin(`ret ` ~ op ~ `= index;`);
return ret;
}
ptrdiff_t opBinary(string op : "-")(scope ref const typeof(this) right) scope const
{ return this._iterator - right._iterator; }
bool opEquals()(scope ref const typeof(this) right) scope const
{ return this._iterator == right._iterator; }
ptrdiff_t opCmp()(scope ref const typeof(this) right) scope const
{
static if (isPointer!Iterator)
return this._iterator - right._iterator;
else
return this._iterator.opCmp(right._iterator);
}
}
/++
`MemberIterator` is used by $(SUBREF topology, member).
+/
struct MemberIterator(Iterator, string member)
{
@fmamath:
///
Iterator _iterator;
///
auto lightConst()() const @property
{
return MemberIterator!(LightConstOf!Iterator, member)(.lightConst(_iterator));
}
///
auto lightImmutable()() immutable @property
{
return MemberIterator!(LightImmutableOf!Iterator, member)(.lightImmutable(_iterator));
}
auto ref opUnary(string op : "*")()
{
return __traits(getMember, *_iterator, member);
}
auto ref opIndex()(ptrdiff_t index)
{
return __traits(getMember, _iterator[index], member);
}
static if (!__traits(compiles, &opIndex(ptrdiff_t.init)))
{
auto ref opIndexAssign(T)(auto ref T value, ptrdiff_t index) scope
{
return __traits(getMember, _iterator[index], member) = value;
}
auto ref opIndexUnary(string op)(ptrdiff_t index)
{
return mixin(op ~ "__traits(getMember, _iterator[index], member)");
}
auto ref opIndexOpAssign(string op, T)(T value, ptrdiff_t index)
{
return mixin("__traits(getMember, _iterator[index], member)" ~ op ~ "= value");
}
}
mixin(std_ops);
}
/++
`BytegroupIterator` is used by $(SUBREF topology, Bytegroup) and $(SUBREF topology, bytegroup).
+/
struct BytegroupIterator(Iterator, size_t count, DestinationType)
if (count)
{
@fmamath:
///
Iterator _iterator;
///
auto lightConst()() const @property
{
return BytegroupIterator!(LightConstOf!Iterator, count, DestinationType)(.lightConst(_iterator));
}
///
auto lightImmutable()() immutable @property
{
return BytegroupIterator!(LightImmutableOf!Iterator, count, DestinationType)(.lightImmutable(_iterator));
}
package(mir) alias Byte = Unqual!(typeof(_iterator[0]));
version(LittleEndian)
private enum BE = false;
else
private enum BE = true;
private union U
{
DestinationType value;
static if (DestinationType.sizeof > Byte[count].sizeof && BE && isScalarType!DestinationType)
{
struct
{
ubyte[DestinationType.sizeof - Byte[count].sizeof] shiftPayload;
Byte[count] bytes;
}
}
else
{
Byte[count] bytes;
}
}
DestinationType opUnary(string op : "*")()
{
U ret = { value: DestinationType.init };
foreach (i; Iota!count)
ret.bytes[i] = _iterator[i];
return ret.value;
}
DestinationType opIndex()(ptrdiff_t index)
{
return *(this + index);
}
DestinationType opIndexAssign(T)(T val, ptrdiff_t index) scope
{
auto it = this + index;
U ret = { value: val };
foreach (i; Iota!count)
it._iterator[i] = ret.bytes[i];
return ret.value;
}
void opUnary(string op)() scope
if (op == "--" || op == "++")
{ mixin("_iterator " ~ op[0] ~ "= count;"); }
void opOpAssign(string op)(ptrdiff_t index) scope
if (op == "-" || op == "+")
{ mixin("_iterator " ~ op ~ "= index * count;"); }
auto opBinary(string op)(ptrdiff_t index)
if (op == "+" || op == "-")
{
auto ret = this;
mixin(`ret ` ~ op ~ `= index;`);
return ret;
}
ptrdiff_t opBinary(string op : "-")(scope ref const typeof(this) right) scope const
{ return (this._iterator - right._iterator) / count; }
bool opEquals()(scope ref const typeof(this) right) scope const
{ return this._iterator == right._iterator; }
ptrdiff_t opCmp()(scope ref const typeof(this) right) scope const
{
static if (isPointer!Iterator)
return this._iterator - right._iterator;
else
return this._iterator.opCmp(right._iterator);
}
}
auto SlideIterator__map(Iterator, size_t params, alias fun0, alias fun)(SlideIterator!(Iterator, params, fun0) it)
{
return SlideIterator!(Iterator, params, fun)(it._iterator);
}
/++
`SlideIterator` is used by $(SUBREF topology, diff) and $(SUBREF topology, slide).
+/
struct SlideIterator(Iterator, size_t params, alias fun)
if (params > 1)
{
@fmamath:
///
Iterator _iterator;
///
auto lightConst()() const @property
{
return SlideIterator!(LightConstOf!Iterator, params, fun)(.lightConst(_iterator));
}
///
auto lightImmutable()() immutable @property
{
return SlideIterator!(LightImmutableOf!Iterator, params, fun)(.lightImmutable(_iterator));
}
import mir.functional: pipe;
///
static alias __map(alias fun1) = SlideIterator__map!(Iterator, params, fun, pipe!(fun, fun1));
auto ref opUnary(string op : "*")()
{
return mixin("fun(" ~ _iotaArgs!(params, "_iterator[", "], ") ~ ")");
}
auto ref opIndex()(ptrdiff_t index)
{
return mixin("fun(" ~ _iotaArgs!(params, "_iterator[index + ", "], ") ~ ")");
}
mixin(std_ops);
}
///
version(mir_ndslice_test) unittest
{
import mir.functional: naryFun;
auto data = [1, 3, 8, 18];
auto diff = SlideIterator!(int*, 2, naryFun!"b - a")(data.ptr);
assert(*diff == 2);
assert(diff[1] == 5);
assert(diff[2] == 10);
}
auto IndexIterator__map(Iterator, Field, alias fun)(ref IndexIterator!(Iterator, Field) it)
{
auto field = it._field._mapField!fun;
return IndexIterator!(Iterator, typeof(field))(it._iterator, field);
}
version(mir_ndslice_test) unittest
{
import mir.ndslice.topology;
import mir.ndslice.allocation;
import mir.ndslice.slice;
auto indices = [4, 3, 1, 2, 0, 4].sliced;
auto v = iota(5).indexed(indices).map!(a => a).slice;
uint r;
auto w = iota(5).indexed(indices).map!(a => a).map!(a => a * r).slice;
}
/++
Iterates a field using an iterator.
`IndexIterator` is used by $(SUBREF topology, indexed).
+/
struct IndexIterator(Iterator, Field)
{
import mir.functional: Tuple, autoExpandAndForward;
@fmamath:
///
Iterator _iterator;
///
Field _field;
///
auto lightConst()() const @property
{
return IndexIterator!(LightConstOf!Iterator, LightConstOf!Field)(.lightConst(_iterator), .lightConst(_field));
}
///
auto lightImmutable()() immutable @property
{
return IndexIterator!(LightImmutableOf!Iterator, LightImmutableOf!Field)(.lightImmutable(_iterator), _field.lightImmutable);
}
///
static alias __map(alias fun) = IndexIterator__map!(Iterator, Field, fun);
auto ref opUnary(string op : "*")()
{
static if (is(typeof(_iterator[0]) : Tuple!T, T...))
{
auto t = *_iterator;
return _field[autoExpandAndForward!t];
}
else
return _field[*_iterator];
}
auto ref opIndex()(ptrdiff_t index)
{
static if (is(typeof(_iterator[0]) : Tuple!T, T...))
{
auto t = _iterator[index];
return _field[autoExpandAndForward!t];
}
else
return _field[_iterator[index]];
}
static if (!__traits(compiles, &opIndex(ptrdiff_t.init)))
{
auto ref opIndexAssign(T)(auto ref T value, ptrdiff_t index) scope
{
static if (is(typeof(_iterator[0]) : Tuple!T, T...))
{
auto t = _iterator[index];
return _field[autoExpandAndForward!t] = value;
}
else
return _field[_iterator[index]] = value;
}
auto ref opIndexUnary(string op)(ptrdiff_t index)
{
static if (is(typeof(_iterator[0]) : Tuple!T, T...))
{
auto t = _iterator[index];
return mixin(op ~ "_field[autoExpandAndForward!t]");
}
else
return mixin(op ~ "_field[_iterator[index]]");
}
auto ref opIndexOpAssign(string op, T)(T value, ptrdiff_t index)
{
static if (is(typeof(_iterator[0]) : Tuple!T, T...))
{
auto t = _iterator[index];
return mixin("_field[autoExpandAndForward!t]" ~ op ~ "= value");
}
else
return mixin("_field[_iterator[index]]" ~ op ~ "= value");
}
}
mixin(std_ops);
}
/++
Iterates chunks in a sliceable using an iterator composed of indices.
Definition:
----
auto index = iterator[i];
auto elem = sliceable[index[0] .. index[1]];
----
+/
struct SubSliceIterator(Iterator, Sliceable)
{
@fmamath:
///
Iterator _iterator;
///
Sliceable _sliceable;
///
auto lightConst()() const @property
{
return SubSliceIterator!(LightConstOf!Iterator, LightConstOf!Sliceable)(.lightConst(_iterator), _sliceable.lightConst);
}
///
auto lightImmutable()() immutable @property
{
return SubSliceIterator!(LightImmutableOf!Iterator, LightImmutableOf!Sliceable)(.lightImmutable(_iterator), _sliceable.lightImmutable);
}
auto ref opUnary(string op : "*")()
{
auto i = *_iterator;
return _sliceable[i[0] .. i[1]];
}
auto ref opIndex()(ptrdiff_t index)
{
auto i = _iterator[index];
return _sliceable[i[0] .. i[1]];
}
mixin(std_ops);
}
/++
Iterates chunks in a sliceable using an iterator composed of indices stored consequently.
Definition:
----
auto elem = _sliceable[_iterator[index] .. _iterator[index + 1]];
----
+/
struct ChopIterator(Iterator, Sliceable)
{
@fmamath:
///
Iterator _iterator;
///
Sliceable _sliceable;
///
auto lightConst()() const @property
{
return ChopIterator!(LightConstOf!Iterator, LightConstOf!Sliceable)(.lightConst(_iterator), _sliceable.lightConst);
}
///
auto lightImmutable()() immutable @property
{
return ChopIterator!(LightImmutableOf!Iterator, LightImmutableOf!Sliceable)(.lightImmutable(_iterator), _sliceable.lightImmutable);
}
auto ref opUnary(string op : "*")()
{
return _sliceable[*_iterator .. _iterator[1]];
}
auto ref opIndex()(ptrdiff_t index)
{
return _sliceable[_iterator[index] .. _iterator[index + 1]];
}
mixin(std_ops);
}
/++
Iterates on top of another iterator and returns a slice
as a multidimensional window at the current position.
`SliceIterator` is used by $(SUBREF topology, map) for packed slices.
+/
struct SliceIterator(Iterator, size_t N = 1, SliceKind kind = Contiguous)
{
@fmamath:
///
alias Element = Slice!(Iterator, N, kind);
///
Element._Structure _structure;
///
Iterator _iterator;
///
auto lightConst()() const @property
{
return SliceIterator!(LightConstOf!Iterator, N, kind)(_structure, .lightConst(_iterator));
}
///
auto lightImmutable()() immutable @property
{
return SliceIterator!(LightImmutableOf!Iterator, N, kind)(_structure, .lightImmutable(_iterator));
}
auto opUnary(string op : "*")()
{
return Element(_structure, _iterator);
}
auto opIndex()(ptrdiff_t index)
{
return Element(_structure, _iterator + index);
}
mixin(std_ops);
}
public auto FieldIterator__map(Field, alias fun)(FieldIterator!(Field) it)
{
import mir.ndslice.field: _mapField;
auto field = it._field._mapField!fun;
return FieldIterator!(typeof(field))(it._index, field);
}
version(mir_ndslice_test) unittest
{
import mir.ndslice.topology;
import mir.ndslice.allocation;
auto v = ndiota(3, 3).map!(a => a).slice;
uint r;
auto w = ndiota(3, 3).map!(a => a).map!(a => a[0] * r).slice;
}
/++
Creates an iterator on top of a field.
`FieldIterator` is used by $(SUBREF slice, slicedField), $(SUBREF topology, bitwise), $(SUBREF topology, ndiota), and others.
+/
struct FieldIterator(Field)
{
@fmamath:
///
ptrdiff_t _index;
///
Field _field;
///
auto lightConst()() const @property
{
return FieldIterator!(LightConstOf!Field)(_index, .lightConst(_field));
}
///
auto lightImmutable()() immutable @property
{
return FieldIterator!(LightImmutableOf!Field)(_index, .lightImmutable(_field));
}
///
static alias __map(alias fun) = FieldIterator__map!(Field, fun);
///
Slice!(IotaIterator!size_t) opSlice(size_t dimension)(size_t i, size_t j) scope const
{
assert(i <= j);
return typeof(return)(j - i, typeof(return).Iterator(i));
}
/++
Returns:
`_field[_index + sl.i .. _index + sl.j]`.
+/
auto opIndex()(Slice!(IotaIterator!size_t) sl)
{
auto idx = _index + sl._iterator._index;
return _field[idx .. idx + sl.length];
}
auto ref opUnary(string op : "*")()
{ return _field[_index]; }
void opUnary(string op)() scope
if (op == "++" || op == "--")
{ mixin(op ~ `_index;`); }
auto ref opIndex()(ptrdiff_t index)
{ return _field[_index + index]; }
static if (!__traits(compiles, &_field[_index]))
{
auto ref opIndexAssign(T)(auto ref T value, ptrdiff_t index)
{ return _field[_index + index] = value; }
auto ref opIndexUnary(string op)(ptrdiff_t index)
{ mixin (`return ` ~ op ~ `_field[_index + index];`); }
auto ref opIndexOpAssign(string op, T)(T value, ptrdiff_t index)
{ mixin (`return _field[_index + index] ` ~ op ~ `= value;`); }
}
void opOpAssign(string op)(ptrdiff_t index) scope
if (op == "+" || op == "-")
{ mixin(`_index ` ~ op ~ `= index;`); }
auto opBinary(string op)(ptrdiff_t index)
if (op == "+" || op == "-")
{
auto ret = this;
mixin(`ret ` ~ op ~ `= index;`);
return ret;
}
ptrdiff_t opBinary(string op : "-")(scope ref const typeof(this) right) scope const
{ return this._index - right._index; }
bool opEquals()(scope ref const typeof(this) right) scope const
{ return this._index == right._index; }
ptrdiff_t opCmp()(scope ref const typeof(this) right) scope const
{ return this._index - right._index; }
///
auto assumeFieldsHaveZeroShift() @property
{
if (_expect(_index != 0, false))
{
version (D_Exceptions)
throw assumeZeroShiftException;
else
assert(0, assumeZeroShiftExceptionMsg);
}
static if (hasZeroShiftFieldMember!Field)
return _field.assumeFieldsHaveZeroShift;
else
return _field;
}
}
auto FlattenedIterator__map(Iterator, size_t N, SliceKind kind, alias fun)(FlattenedIterator!(Iterator, N, kind) it)
{
import mir.ndslice.topology: map;
auto slice = it._slice.map!fun;
return FlattenedIterator!(TemplateArgsOf!(typeof(slice)))(it._indices, slice);
}
version(mir_ndslice_test) unittest
{
import mir.ndslice.topology;
import mir.ndslice.allocation;
auto v = iota(3, 3).universal.flattened.map!(a => a).slice;
uint r;
auto w = iota(3, 3).universal.flattened.map!(a => a).map!(a => a * r).slice;
}
/++
Creates an iterator on top of all elements in a slice.
`FieldIterator` is used by $(SUBREF topology, bitwise), $(SUBREF topology, ndiota), and others.
+/
struct FlattenedIterator(Iterator, size_t N, SliceKind kind)
if (N > 1 && (kind == Universal || kind == Canonical))
{
@fmamath:
///
ptrdiff_t[N] _indices;
///
Slice!(Iterator, N, kind) _slice;
///
auto lightConst()() const @property
{
return FlattenedIterator!(LightConstOf!Iterator, N, kind)(_indices, _slice.lightConst);
}
///
auto lightImmutable()() immutable @property
{
return FlattenedIterator!(LightImmutableOf!Iterator, N, kind)(_indices, _slice.lightImmutable);
}
///
static alias __map(alias fun) = FlattenedIterator__map!(Iterator, N, kind, fun);
private ptrdiff_t getShift()(ptrdiff_t n)
{
ptrdiff_t _shift;
n += _indices[$ - 1];
foreach_reverse (i; Iota!(1, N))
{
immutable v = n / ptrdiff_t(_slice._lengths[i]);
n %= ptrdiff_t(_slice._lengths[i]);
static if (i == _slice.S)
_shift += (n - _indices[i]);
else
_shift += (n - _indices[i]) * _slice._strides[i];
n = _indices[i - 1] + v;
}
_shift += (n - _indices[0]) * _slice._strides[0];
return _shift;
}
auto ref opUnary(string op : "*")()
{
return *_slice._iterator;
}
void opUnary(string op)() scope
if (op == "--" || op == "++")
{
foreach_reverse (i; Iota!N)
{
static if (i == _slice.S)
mixin(op ~ `_slice._iterator;`);
else
mixin(`_slice._iterator ` ~ op[0] ~ `= _slice._strides[i];`);
mixin (op ~ `_indices[i];`);
static if (i)
{
static if (op == "++")
{
if (_indices[i] < _slice._lengths[i])
return;
static if (i == _slice.S)
_slice._iterator -= _slice._lengths[i];
else
_slice._iterator -= _slice._lengths[i] * _slice._strides[i];
_indices[i] = 0;
}
else
{
if (_indices[i] >= 0)
return;
static if (i == _slice.S)
_slice._iterator += _slice._lengths[i];
else
_slice._iterator += _slice._lengths[i] * _slice._strides[i];
_indices[i] = _slice._lengths[i] - 1;
}
}
}
}
auto ref opIndex()(ptrdiff_t index)
{
return _slice._iterator[getShift(index)];
}
static if (isMutable!(_slice.DeepElement) && !_slice.hasAccessByRef)
///
auto ref opIndexAssign(E)(scope ref E elem, size_t index) return scope
{
return _slice._iterator[getShift(index)] = elem;
}
void opOpAssign(string op : "+")(ptrdiff_t n) scope
{
ptrdiff_t _shift;
n += _indices[$ - 1];
foreach_reverse (i; Iota!(1, N))
{
immutable v = n / ptrdiff_t(_slice._lengths[i]);
n %= ptrdiff_t(_slice._lengths[i]);
static if (i == _slice.S)
_shift += (n - _indices[i]);
else
_shift += (n - _indices[i]) * _slice._strides[i];
_indices[i] = n;
n = _indices[i - 1] + v;
}
_shift += (n - _indices[0]) * _slice._strides[0];
_indices[0] = n;
foreach_reverse (i; Iota!(1, N))
{
if (_indices[i] >= 0)
break;
_indices[i] += _slice._lengths[i];
_indices[i - 1]--;
}
_slice._iterator += _shift;
}
void opOpAssign(string op : "-")(ptrdiff_t n) scope
{ this += -n; }
auto opBinary(string op)(ptrdiff_t index)
if (op == "+" || op == "-")
{
auto ret = this;
mixin(`ret ` ~ op ~ `= index;`);
return ret;
}
ptrdiff_t opBinary(string op : "-")(scope ref const typeof(this) right) scope const
{
ptrdiff_t ret = this._indices[0] - right._indices[0];
foreach (i; Iota!(1, N))
{
ret *= _slice._lengths[i];
ret += this._indices[i] - right._indices[i];
}
return ret;
}
bool opEquals()(scope ref const typeof(this) right) scope const
{
foreach_reverse (i; Iota!N)
if (this._indices[i] != right._indices[i])
return false;
return true;
}
ptrdiff_t opCmp()(scope ref const typeof(this) right) scope const
{
foreach (i; Iota!(N - 1))
if (auto ret = this._indices[i] - right._indices[i])
return ret;
return this._indices[$ - 1] - right._indices[$ - 1];
}
}
version(mir_ndslice_test) unittest
{
import mir.ndslice.topology;
import mir.ndslice.slice;
auto it0 = iota(3, 4).universal.flattened._iterator;
auto it1 = it0;
assert(it0 == it1);
it0 += 5;
assert(it0 > it1);
it0 -= 5;
assert(*it0 == *it1);
assert(it0 == it1);
it0 += 5;
it0 += 7;
it0 -= 9;
assert(it0 > it1);
it1 += 3;
assert(*it0 == *it1);
assert(it0 == it1);
assert(it0 <= it1);
assert(it0 >= it1);
++it0;
++it0;
++it0;
++it0;
++it0;
++it0;
++it0;
++it0;
++it0;
assert(it0 - it1 == 9);
assert(it1 - it0 == -9);
++it0;
assert(it0 - it1 == 10);
assert(it1 - it0 == -10);
--it0;
assert(it0 - it1 == 9);
assert(it1 - it0 == -9);
assert(it0[-9] == *it1);
assert(*it0 == it1[9]);
--it0;
--it0;
--it0;
--it0;
--it0;
--it0;
--it0;
--it0;
--it0;
assert(*it0 == *it1);
assert(it0 == it1);
assert(it0 <= it1);
assert(it0 >= it1);
}
/++
`StairsIterator` is used by $(SUBREF topology, stairs).
+/
struct StairsIterator(Iterator, string direction)
if (direction == "+" || direction == "-")
{
///
size_t _length;
///
Iterator _iterator;
///
auto lightConst()() const @property
{
return StairsIterator!(LightConstOf!Iterator, direction)(_length, .lightConst(_iterator));
}
///
auto lightImmutable()() immutable @property
{
return StairsIterator!(LightImmutableOf!Iterator, direction)(_length, .lightImmutable(_iterator));
}
@fmamath:
///
Slice!Iterator opUnary(string op : "*")()
{
import mir.ndslice.slice: sliced;
return _iterator.sliced(_length);
}
///
Slice!Iterator opIndex()(ptrdiff_t index)
{
import mir.ndslice.slice: sliced;
static if (direction == "+")
{
auto newLength = _length + index;
auto shift = ptrdiff_t(_length + newLength - 1) * index / 2;
}
else
{
auto newLength = _length - index;
auto shift = ptrdiff_t(_length + newLength + 1) * index / 2;
}
assert(ptrdiff_t(newLength) >= 0);
return (_iterator + shift).sliced(newLength);
}
void opUnary(string op)() scope
if (op == "--" || op == "++")
{
static if (op == "++")
{
_iterator += _length;
static if (direction == "+")
++_length;
else
--_length;
}
else
{
assert(_length);
static if (direction == "+")
--_length;
else
++_length;
_iterator -= _length;
}
}
void opOpAssign(string op)(ptrdiff_t index) scope
if (op == "-" || op == "+")
{
static if (op == direction)
auto newLength = _length + index;
else
auto newLength = _length - index;
static if (direction == "+")
auto shift = ptrdiff_t(_length + newLength - 1) * index / 2;
else
auto shift = ptrdiff_t(_length + newLength + 1) * index / 2;
assert(ptrdiff_t(newLength) >= 0);
_length = newLength;
static if (op == "+")
_iterator += shift;
else
_iterator -= shift;
}
auto opBinary(string op)(ptrdiff_t index)
if (op == "+" || op == "-")
{
auto ret = this;
mixin(`ret ` ~ op ~ `= index;`);
return ret;
}
ptrdiff_t opBinary(string op : "-")(scope ref const typeof(this) right) scope const
{
static if (direction == "+")
return this._length - right._length;
else
return right._length - this._length;
}
bool opEquals()(scope ref const typeof(this) right) scope const
{ return this._length == right._length; }
ptrdiff_t opCmp()(scope ref const typeof(this) right) scope const
{ return this - right; }
}
///
version(mir_ndslice_test) unittest
{
// 0
// 1 2
// 3 4 5
// 6 7 8 9
// 10 11 12 13 14
auto it = StairsIterator!(IotaIterator!size_t, "+")(1, IotaIterator!size_t());
assert(*it == [0]);
assert(it[4] == [10, 11, 12, 13, 14]);
assert(*(it + 4) == [10, 11, 12, 13, 14]);
++it;
assert(*it == [1, 2]);
it += 3;
assert(*it == [10, 11, 12, 13, 14]);
assert(it[-3] == [1, 2]);
assert(*(it - 3) == [1, 2]);
assert(it + 1 > it);
assert(it + 1 - 1 == it);
assert(it - 3 - it == -3);
--it;
assert(*it == [6, 7, 8, 9]);
}
///
version(mir_ndslice_test) unittest
{
// [0, 1, 2, 3, 4],
// [5, 6, 7, 8],
// [9, 10, 11],
// [12, 13],
// [14]]);
auto it = StairsIterator!(IotaIterator!size_t, "-")(5, IotaIterator!size_t());
assert(*it == [0, 1, 2, 3, 4]);
assert(it[4] == [14]);
assert(*(it + 4) == [14]);
++it;
assert(*it == [5, 6, 7, 8]);
it += 3;
assert(*it == [14]);
assert(it[-3] == [5, 6, 7, 8]);
assert(*(it - 3) == [5, 6, 7, 8]);
assert(it + 1 > it);
assert(it + 1 - 1 == it);
assert(it - 3 - it == -3);
--it;
assert(*it == [12, 13]);
}
/++
Element type of $(LREF TripletIterator).
+/
struct Triplet(Iterator, SliceKind kind = Contiguous)
{
@fmamath:
///
size_t _iterator;
///
Slice!(Iterator, 1, kind) _slice;
///
auto lightConst()() const @property
{
return Triplet!(LightConstOf!Iterator, kind)(_iterator, slice.lightConst);
}
///
auto lightImmutable()() immutable @property
{
return Triplet!(LightImmutableOf!Iterator, kind)(_iterator, slice.lightImmutable);
}
@property
{
///
auto ref center()
{
assert(_iterator < _slice.length);
return _slice[_iterator];
}
///
Slice!(Iterator, 1, kind) left()
{
assert(_iterator < _slice.length);
return _slice[0 .. _iterator];
}
///
Slice!(Iterator, 1, kind) right()
{
assert(_iterator < _slice.length);
return _slice[_iterator + 1 .. $];
}
}
}
/++
Iterates triplets position in a slice.
`TripletIterator` is used by $(SUBREF topology, triplets).
+/
struct TripletIterator(Iterator, SliceKind kind = Contiguous)
{
@fmamath:
///
size_t _iterator;
///
Slice!(Iterator, 1, kind) _slice;
///
auto lightConst()() const @property
{
return TripletIterator!(LightConstOf!Iterator, kind)(_iterator, _slice.lightConst);
}
///
auto lightImmutable()() immutable @property
{
return TripletIterator!(LightImmutableOf!Iterator, kind)(_iterator, _slice.lightImmutable);
}
///
Triplet!(Iterator, kind) opUnary(string op : "*")()
{
return typeof(return)(_iterator, _slice);
}
///
Triplet!(Iterator, kind) opIndex()(ptrdiff_t index)
{
return typeof(return)(_iterator + index, _slice);
}
mixin(std_ops);
}
| D |
module dport.gui.button;
import derelict.opengl3.gl3;
import dport.gl.shader,
dport.gl.object;
import dport.gui.base,
dport.gui.element,
dport.gui.drawtext,
dport.gui.rshape;
import dport.utils.system;
mixin( defaultModuleLogUtils( "ButtonException" ) );
import std.stdio;
abstract class Button: Element
{
private:
bool prepare = 0;
void mouse_hook( in ivec2 p, in MouseEvent me )
{
if( me.type == me.Type.RELEASED )
{
if( prepare && p in drawRect )
onClick();
prepare = 0;
grab = 0;
}
if( me.type == me.Type.PRESSED )
{
prepare = 1;
grab = 1;
onPress();
}
}
public:
EmptySignal onClick;
EmptySignal onPress;
this( Element par, in irect r )
{
super( par );
mouse.connect( &mouse_hook );
release.connect( (){ prepare = 0; } );
reshape( r );
}
}
class SimpleButton: Button
{
col4[string] color_sheme;
col4 curColor, nColor;
float speed = 10;
RShape shape;
TextElement label;
this( Element par, in irect r, wstring str=""w, void delegate() onclick=null )
{
super( par, r );
shape = new RShape( this.info.shader );
shape.notUseTexture();
draw.connect( &(shape.draw.opCall) );
label = new TextElement( this, this.info.font, false );
label.textAlign = TextElement.TextAlign.CENTER;
label.setTextData( TextData( str, r.h / 3 * 2 ) );
label.baseLine = cast(int)(r.h * 0.7);
reshape.connect( (r){
auto inrect = irect( 0, 0, r.w, r.h );
shape.reshape( inrect );
label.reshape( inrect );
} );
if( onclick !is null )
onClick.connect( onclick );
color_sheme = [
"default": col4( .3f, .3f, .3f, .6f ),
"active": col4( .1f, .6f, .9f, .8f ),
"press": col4( .8f, .7f, .1f, .9f ),
];
curColor = color_sheme["default"];
nColor = color_sheme["default"];
idle.connect( (dt){
if( dt * speed > 1.0 ) speed = 1.0 / dt;
curColor += ( nColor - curColor ) * speed * dt;
shape.setColor( curColor );
} );
activate.connect( (){ nColor = color_sheme["active"]; speed = 15; } );
release.connect( (){ nColor = color_sheme["default"]; speed = 5; } );
onPress.connect( (){ nColor = color_sheme["press"]; speed = 250; } );
onClick.connect( (){ nColor = color_sheme["active"]; speed = 5;} );
reshape( rect );
}
void setLabel( wstring str )
{
label.setTextData( TextData( str, rect.h / 3 * 2 ) );
}
}
class DataButton(T): SimpleButton
{
T data;
Signal!T onClickData;
this( Element par, in irect r, wstring str, T indata )
{
data = indata;
super( par, r, str, (){ onClickData( data ); } );
}
}
| D |
/Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/Async.build/Exports.swift.o : /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/core.git-9210800844849382486/Sources/Async/Async+NIO.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/core.git-9210800844849382486/Sources/Async/Future+Variadic.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/core.git-9210800844849382486/Sources/Async/Deprecated.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/core.git-9210800844849382486/Sources/Async/Future+Void.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/core.git-9210800844849382486/Sources/Async/FutureType.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/core.git-9210800844849382486/Sources/Async/Collection+Future.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/core.git-9210800844849382486/Sources/Async/Future+DoCatch.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/core.git-9210800844849382486/Sources/Async/Future+Global.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/core.git-9210800844849382486/Sources/Async/Future+Transform.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/core.git-9210800844849382486/Sources/Async/Future+Flatten.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/core.git-9210800844849382486/Sources/Async/Future+Map.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/core.git-9210800844849382486/Sources/Async/Worker.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/core.git-9210800844849382486/Sources/Async/QueueHandler.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/core.git-9210800844849382486/Sources/Async/AsyncError.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/core.git-9210800844849382486/Sources/Async/Exports.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/NIO.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/NIOConcurrencyHelpers.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOAtomics/include/cpp_magic.h /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIODarwin/include/c_nio_darwin.h /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOAtomics/include/c-atomics.h /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOLinux/include/c_nio_linux.h /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/swift-nio-zlib-support.git--1071467962839356487/module.modulemap /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/CNIOSHA1.build/module.modulemap /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/CNIOOpenSSL.build/module.modulemap /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/CNIOZlib.build/module.modulemap /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/CNIODarwin.build/module.modulemap /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/CNIOHTTPParser.build/module.modulemap /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/CNIOAtomics.build/module.modulemap /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/CNIOLinux.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/Darwin.apinotes
/Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/Async.build/Exports~partial.swiftmodule : /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/core.git-9210800844849382486/Sources/Async/Async+NIO.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/core.git-9210800844849382486/Sources/Async/Future+Variadic.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/core.git-9210800844849382486/Sources/Async/Deprecated.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/core.git-9210800844849382486/Sources/Async/Future+Void.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/core.git-9210800844849382486/Sources/Async/FutureType.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/core.git-9210800844849382486/Sources/Async/Collection+Future.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/core.git-9210800844849382486/Sources/Async/Future+DoCatch.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/core.git-9210800844849382486/Sources/Async/Future+Global.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/core.git-9210800844849382486/Sources/Async/Future+Transform.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/core.git-9210800844849382486/Sources/Async/Future+Flatten.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/core.git-9210800844849382486/Sources/Async/Future+Map.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/core.git-9210800844849382486/Sources/Async/Worker.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/core.git-9210800844849382486/Sources/Async/QueueHandler.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/core.git-9210800844849382486/Sources/Async/AsyncError.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/core.git-9210800844849382486/Sources/Async/Exports.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/NIO.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/NIOConcurrencyHelpers.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOAtomics/include/cpp_magic.h /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIODarwin/include/c_nio_darwin.h /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOAtomics/include/c-atomics.h /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOLinux/include/c_nio_linux.h /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/swift-nio-zlib-support.git--1071467962839356487/module.modulemap /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/CNIOSHA1.build/module.modulemap /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/CNIOOpenSSL.build/module.modulemap /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/CNIOZlib.build/module.modulemap /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/CNIODarwin.build/module.modulemap /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/CNIOHTTPParser.build/module.modulemap /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/CNIOAtomics.build/module.modulemap /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/CNIOLinux.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/Darwin.apinotes
/Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/Async.build/Exports~partial.swiftdoc : /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/core.git-9210800844849382486/Sources/Async/Async+NIO.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/core.git-9210800844849382486/Sources/Async/Future+Variadic.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/core.git-9210800844849382486/Sources/Async/Deprecated.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/core.git-9210800844849382486/Sources/Async/Future+Void.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/core.git-9210800844849382486/Sources/Async/FutureType.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/core.git-9210800844849382486/Sources/Async/Collection+Future.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/core.git-9210800844849382486/Sources/Async/Future+DoCatch.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/core.git-9210800844849382486/Sources/Async/Future+Global.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/core.git-9210800844849382486/Sources/Async/Future+Transform.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/core.git-9210800844849382486/Sources/Async/Future+Flatten.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/core.git-9210800844849382486/Sources/Async/Future+Map.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/core.git-9210800844849382486/Sources/Async/Worker.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/core.git-9210800844849382486/Sources/Async/QueueHandler.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/core.git-9210800844849382486/Sources/Async/AsyncError.swift /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/core.git-9210800844849382486/Sources/Async/Exports.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.apinotesc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/ObjectiveC.swiftmodule /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/NIO.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Darwin.swiftmodule /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/NIOConcurrencyHelpers.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/x86_64/SwiftOnoneSupport.swiftmodule /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOAtomics/include/cpp_magic.h /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIODarwin/include/c_nio_darwin.h /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOAtomics/include/c-atomics.h /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/swift-nio.git-3108475404973543938/Sources/CNIOLinux/include/c_nio_linux.h /Users/user/Documents/RiseTimeAssets/server/.build/checkouts/swift-nio-zlib-support.git--1071467962839356487/module.modulemap /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/CNIOSHA1.build/module.modulemap /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/CNIOOpenSSL.build/module.modulemap /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/CNIOZlib.build/module.modulemap /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/CNIODarwin.build/module.modulemap /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/CNIOHTTPParser.build/module.modulemap /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/CNIOAtomics.build/module.modulemap /Users/user/Documents/RiseTimeAssets/server/.build/x86_64-apple-macosx10.10/debug/CNIOLinux.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/Darwin.apinotes
| D |
module platform.definitions;
version(PlatformOSX) {
alias char Char;
import core.parameters;
static const Parameter_Colorbpp Colorbpp = Parameter_Colorbpp.Color8bpp;
static const Parameter_ColorType ColorType = Parameter_ColorType.ColorRGBA;
const auto FontMonospace = "Courier";
const auto FontTimes = "Times New Roman";
const auto FontSans = "Sans";
const auto FontSerif = "Sans Serif";
const auto FontSystem = "Sans Serif";
const int KeyBackspace = 0x8; //0x08
const int KeyTab = 0x9; //0x09
const int KeyReturn = 0xD; //0x0D
const int KeyAmbiShift = 0x10; //0x10
const int KeyAmbiControl = 0x11; //0x11
const int KeyAmbiAlt = 0x12; //0x12
const int KeyPause = 0x13; //0x13
const int KeyCapsLock = 0x14; //0x14
const int KeyEscape = 0x1b; //0x1B
const int KeySpace = 0x20; //0x20
const int KeyPageUp = 0x21; //0x21
const int KeyPageDown = 0x22; //0x22
const int KeyEnd = 0x23; //0x23
const int KeyHome = 0x24; //0x24
const int KeyArrowLeft = 0x25; //0x25
const int KeyArrowUp = 0x26; //0x26
const int KeyArrowRight = 0x27; //0x27
const int KeyArrowDown = 0x28; //0x28
const int KeyInsert = 0x2D; //0x2D
const int KeyDelete = 0x2E; //0x2E
const int Key0 = 0x30;
const int Key1 = 0x31;
const int Key2 = 0x32;
const int Key3 = 0x33;
const int Key4 = 0x34;
const int Key5 = 0x35;
const int Key6 = 0x36;
const int Key7 = 0x37;
const int Key8 = 0x38;
const int Key9 = 0x39;
//SECOND LEVEL
const int KeyA = 0x41;
const int KeyB = 0x42;
const int KeyC = 0x43;
const int KeyD = 0x44;
const int KeyE = 0x45;
const int KeyF = 0x46;
const int KeyG = 0x47;
const int KeyH = 0x48;
const int KeyI = 0x49;
const int KeyJ = 0x4A;
const int KeyK = 0x4B;
const int KeyL = 0x4C;
const int KeyM = 0x4D;
const int KeyN = 0x4E;
const int KeyO = 0x4F;
const int KeyP = 0x50;
const int KeyQ = 0x51;
const int KeyR = 0x52;
const int KeyS = 0x53;
const int KeyT = 0x54;
const int KeyU = 0x55;
const int KeyV = 0x56;
const int KeyW = 0x57;
const int KeyX = 0x58;
const int KeyY = 0x59;
const int KeyZ = 0x5A;
const int KeyNumPad0 = 0x60; //0x60
const int KeyNumPad1 = 0x61; //0x61
const int KeyNumPad2 = 0x62; //0x62
const int KeyNumPad3 = 0x63; //0x63
const int KeyNumPad4 = 0x64; //0x64
const int KeyNumPad5 = 0x65; //0x65
const int KeyNumPad6 = 0x66; //0x66
const int KeyNumPad7 = 0x67; //0x67
const int KeyNumPad8 = 0x68; //0x68
const int KeyNumPad9 = 0x69; //0x69
const int KeyF1 = 0x70; //0x70
const int KeyF2 = 0x71; //0x71
const int KeyF3 = 0x72; //0x72
const int KeyF4 = 0x73; //0x73
const int KeyF5 = 0x74; //0x74
const int KeyF6 = 0x75; //0x75
const int KeyF7 = 0x76; //0x76
const int KeyF8 = 0x77; //0x77
const int KeyF9 = 0x78; //0x78
const int KeyF10 = 0x79; //0x79
const int KeyF11 = 0x7a; //0x7A
const int KeyF12 = 0x7b; //0x7B
const int KeyF13 = 0x7c; //0x7C
const int KeyF14 = 0x7d; //0x7D
const int KeyF15 = 0x7e; //0x7E
const int KeyF16 = 0x7f; //0x7F
//THIRD LEVEL
const int KeyF17 = 0x80; //0x80
const int KeyF18 = 0x81; //0x81
const int KeyF19 = 0x82; //0x82
const int KeyF20 = 0x83; //0x83
const int KeyF21 = 0x84; //0x84
const int KeyF22 = 0x85; //0x85
const int KeyF23 = 0x86; //0x86
const int KeyF24 = 0x87; //0x87
const int KeyNumLock = 0x90; //0x90
const int KeyScrollLock = 0x91; //0x91
const int KeyLeftShift = 0xA0; //0xA0
const int KeyRightShift = 0xA1; //0xA1
const int KeyLeftControl = 0xA2; //0xA2
const int KeyRightControl = 0xA3; //0xA3
const int KeyLeftAlt = 0xA4; //0xA4
const int KeyRightAlt = 0xA5; //0xA5
const uint KeySingleQuote = '`';
const uint KeySemicolon = ';';
const uint KeyLeftBracket = '[';
const uint KeyRightBracket = ']';
const uint KeyComma = ',';
const uint KeyPeriod = '.';
const uint KeyForeslash = '/';
const uint KeyBackslash = '\\';
const uint KeyQuote = '\'';
const uint KeyMinus = '-';
const uint KeyEquals = '=';
}
| D |
module android.java.android.telephony.SubscriptionManager;
public import android.java.android.telephony.SubscriptionManager_d_interface;
import arsd.jni : ImportExportImpl;
mixin ImportExportImpl!SubscriptionManager;
import import8 = android.java.android.os.ParcelUuid;
import import0 = android.java.android.telephony.SubscriptionManager;
import import9 = android.java.java.lang.Class;
import import6 = android.java.java.util.List;
import import5 = android.java.android.telephony.SubscriptionInfo;
| D |
/**
* Instruction scheduler
*
* Compiler implementation of the
* $(LINK2 http://www.dlang.org, D programming language).
*
* Copyright: Copyright (C) 1995-1998 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/cgsched.c, backend/cgsched.d)
*/
module dmd.backend.cgsched;
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.code;
import dmd.backend.code_x86;
import dmd.backend.dlist;
import dmd.backend.global;
import dmd.backend.mem;
import dmd.backend.ty;
import dmd.backend.barray;
extern (C++):
nothrow:
@safe:
int REGSIZE();
code *gen1(code *c, uint op);
code *gen2(code *c, uint op, uint rm);
private uint mask(uint m) { return 1 << m; }
// is32bitaddr works correctly only when x is 0 or 1. This is
// true today for the current definition of I32, but if the definition
// of I32 changes, this macro will need to change as well
//
// Note: even for linux targets, CFaddrsize can be set by the inline
// assembler.
private bool is32bitaddr(bool x, uint Iflags) { return I64 || (x ^ ((Iflags & CFaddrsize) != 0)); }
// If we use Pentium Pro scheduler
@trusted
private bool PRO() { return config.target_cpu >= TARGET_PentiumPro; }
private enum FP : ubyte
{
fstp = 1, /// FSTP mem
fld = 2, /// FLD mem
fop = 3, /// Fop ST0,mem or Fop ST0
}
private enum CIFL : ubyte
{
arraybounds = 1, /// this instruction is a jmp to array bounds
ea = 2, /// this instruction has a memory-referencing
/// modregrm EA byte
nostage = 4, /// don't stage these instructions
push = 8, /// it's a push we can swap around
}
// Struct where we gather information about an instruction
struct Cinfo
{
code *c; // the instruction
ubyte pair; // pairing information
ubyte sz; // operand size
ubyte isz; // instruction size
// For floating point scheduling
ubyte fxch_pre;
ubyte fxch_post;
FP fp_op; /// FPxxxx
ubyte flags; /// CIFLxxx
uint r; // read mask
uint w; // write mask
uint a; // registers used in addressing mode
ubyte reg; // reg field of modregrm byte
ubyte uops; // Pentium Pro micro-ops
uint sibmodrm; // (sib << 8) + mod__rm byte
uint spadjust; // if !=0, then amount ESP changes as a result of this
// instruction being executed
int fpuadjust; // if !=0, then amount FPU stack changes as a result
// of this instruction being executed
@trusted
nothrow void print() // pretty-printer
{
Cinfo *ci = &this;
if (ci == null)
{
printf("Cinfo 0\n");
return;
}
printf("Cinfo %p: c %p, pair %x, sz %d, isz %d, flags - ",
ci,c,pair,sz,isz);
if (ci.flags & CIFL.arraybounds)
printf("arraybounds,");
if (ci.flags & CIFL.ea)
printf("ea,");
if (ci.flags & CIFL.nostage)
printf("nostage,");
if (ci.flags & CIFL.push)
printf("push,");
if (ci.flags & ~(CIFL.arraybounds|CIFL.nostage|CIFL.push|CIFL.ea))
printf("bad flag,");
printf("\n\tr %x w %x a %x reg %x uops %x sibmodrm %x spadjust %d\n",
cast(int)r,cast(int)w,cast(int)a,reg,uops,sibmodrm,cast(int)spadjust);
if (ci.fp_op)
{
__gshared const(char*)[3] fpops = ["fstp","fld","fop"];
printf("\tfp_op %s, fxch_pre %x, fxch_post %x\n",
fpops[fp_op-1],fxch_pre,fxch_post);
}
}
}
/*****************************************
* Do Pentium optimizations.
* Input:
* scratch scratch registers we can use
*/
@trusted
private void cgsched_pentium(code **pc,regm_t scratch)
{
//printf("scratch = x%02x\n",scratch);
if (config.target_scheduler >= TARGET_80486)
{
if (!I64)
*pc = peephole(*pc,0);
if (I32) // forget about 16 bit code
{
if (config.target_cpu == TARGET_Pentium ||
config.target_cpu == TARGET_PentiumMMX)
*pc = simpleops(*pc,scratch);
*pc = schedule(*pc,0);
}
}
}
/************************************
* Entry point
*/
@trusted
public void cgsched_block(block* b)
{
if (config.flags4 & CFG4speed &&
config.target_cpu >= TARGET_Pentium &&
b.BC != BCasm)
{
regm_t scratch = allregs;
scratch &= ~(b.Bregcon.used | b.Bregcon.params | mfuncreg);
scratch &= ~(b.Bregcon.immed.mval | b.Bregcon.cse.mval);
cgsched_pentium(&b.Bcode,scratch);
//printf("after schedule:\n"); WRcodlst(b.Bcode);
}
}
enum
{
NP = 0, /// not pairable
PU = 1, /// pairable in U only, never executed in V
PV = 2, /// pairable in V only
UV = (PU|PV), /// pairable in both U and V
PE = 4, /// register contention exception
PF = 8, /// flags contention exception
FX = 0x10, /// pairable with FXCH instruction
}
extern (D) private immutable ubyte[256] pentcycl =
[
UV,UV,UV,UV, UV,UV,NP,NP, // 0
UV,UV,UV,UV, UV,UV,NP,NP, // 8
PU,PU,PU,PU, PU,PU,NP,NP, // 10
PU,PU,PU,PU, PU,PU,NP,NP, // 18
UV,UV,UV,UV, UV,UV,NP,NP, // 20
UV,UV,UV,UV, UV,UV,NP,NP, // 28
UV,UV,UV,UV, UV,UV,NP,NP, // 30
UV,UV,UV,UV, UV,UV,NP,NP, // 38
UV,UV,UV,UV, UV,UV,UV,UV, // 40
UV,UV,UV,UV, UV,UV,UV,UV, // 48
PE|UV,PE|UV,PE|UV,PE|UV, PE|UV,PE|UV,PE|UV,PE|UV, // 50 PUSH reg
PE|UV,PE|UV,PE|UV,PE|UV, PE|UV,PE|UV,PE|UV,PE|UV, // 58 POP reg
NP,NP,NP,NP, NP,NP,NP,NP, // 60
PE|UV,NP,PE|UV,NP, NP,NP,NP,NP, // 68
PV|PF,PV|PF,PV|PF,PV|PF, PV|PF,PV|PF,PV|PF,PV|PF, // 70 Jcc rel8
PV|PF,PV|PF,PV|PF,PV|PF, PV|PF,PV|PF,PV|PF,PV|PF, // 78 Jcc rel8
NP,NP,NP,NP, NP,NP,NP,NP, // 80
UV,UV,UV,UV, NP,UV,NP,NP, // 88
NP,NP,NP,NP, NP,NP,NP,NP, // 90
NP,NP,NP,NP, NP,NP,NP,NP, // 98
UV,UV,UV,UV, NP,NP,NP,NP, // A0
UV,UV,NP,NP, NP,NP,NP,NP, // A8
UV,UV,UV,UV, UV,UV,UV,UV, // B0
UV,UV,UV,UV, UV,UV,UV,UV, // B8
NP,NP,NP,NP, NP,NP,NP,NP, // C0
NP,NP,NP,NP, NP,NP,NP,NP, // C8
PU,PU,NP,NP, NP,NP,NP,NP, // D0
FX,NP,FX,FX, NP,NP,FX,NP, // D8 all floating point
NP,NP,NP,NP, NP,NP,NP,NP, // E0
PE|PV,PV,NP,PV, NP,NP,NP,NP, // E8
NP,NP,NP,NP, NP,NP,NP,NP, // F0
NP,NP,NP,NP, NP,NP,NP,NP, // F8
];
/********************************************
* For each opcode, determine read [0] and written [1] masks.
*/
enum
{
EA = 0x100000,
R = 0x200000, /// register (reg of modregrm field)
N = 0x400000, /// other things modified, not swappable
B = 0x800000, /// it's a byte operation
C = 0x1000000, /// floating point flags
mMEM = 0x2000000, /// memory
S = 0x4000000, /// floating point stack
F = 0x8000000, /// flags
}
extern (D) private immutable uint[2][256] oprw =
[
// 00
[ EA|R|B, F|EA|B ], // ADD
[ EA|R, F|EA ],
[ EA|R|B, F|R|B ],
[ EA|R, F|R ],
[ mAX, F|mAX ],
[ mAX, F|mAX ],
[ N, N ], // PUSH ES
[ N, N ], // POP ES
// 08
[ EA|R|B, F|EA|B ], // OR
[ EA|R, F|EA ],
[ EA|R|B, F|R|B ],
[ EA|R, F|R ],
[ mAX, F|mAX ],
[ mAX, F|mAX ],
[ N, N ], // PUSH CS
[ N, N ], // 2 byte escape
// 10
[ F|EA|R|B,F|EA|B ], // ADC
[ F|EA|R, F|EA ],
[ F|EA|R|B,F|R|B ],
[ F|EA|R, F|R ],
[ F|mAX, F|mAX ],
[ F|mAX, F|mAX ],
[ N, N ], // PUSH SS
[ N, N ], // POP SS
// 18
[ F|EA|R|B,F|EA|B ], // SBB
[ F|EA|R, F|EA ],
[ F|EA|R|B,F|R|B ],
[ F|EA|R, F|R ],
[ F|mAX, F|mAX ],
[ F|mAX, F|mAX ],
[ N, N ], // PUSH DS
[ N, N ], // POP DS
// 20
[ EA|R|B, F|EA|B ], // AND
[ EA|R, F|EA ],
[ EA|R|B, F|R|B ],
[ EA|R, F|R ],
[ mAX, F|mAX ],
[ mAX, F|mAX ],
[ N, N ], // SEG ES
[ F|mAX, F|mAX ], // DAA
// 28
[ EA|R|B, F|EA|B ], // SUB
[ EA|R, F|EA ],
[ EA|R|B, F|R|B ],
[ EA|R, F|R ],
[ mAX, F|mAX ],
[ mAX, F|mAX ],
[ N, N ], // SEG CS
[ F|mAX, F|mAX ], // DAS
// 30
[ EA|R|B, F|EA|B ], // XOR
[ EA|R, F|EA ],
[ EA|R|B, F|R|B ],
[ EA|R, F|R ],
[ mAX, F|mAX ],
[ mAX, F|mAX ],
[ N, N ], // SEG SS
[ F|mAX, F|mAX ], // AAA
// 38
[ EA|R|B, F ], // CMP
[ EA|R, F ],
[ EA|R|B, F ],
[ EA|R, F ],
[ mAX, F ], // CMP AL,imm8
[ mAX, F ], // CMP EAX,imm16/32
[ N, N ], // SEG DS
[ N, N ], // AAS
// 40
[ mAX, F|mAX ], // INC EAX
[ mCX, F|mCX ],
[ mDX, F|mDX ],
[ mBX, F|mBX ],
[ mSP, F|mSP ],
[ mBP, F|mBP ],
[ mSI, F|mSI ],
[ mDI, F|mDI ],
// 48
[ mAX, F|mAX ], // DEC EAX
[ mCX, F|mCX ],
[ mDX, F|mDX ],
[ mBX, F|mBX ],
[ mSP, F|mSP ],
[ mBP, F|mBP ],
[ mSI, F|mSI ],
[ mDI, F|mDI ],
// 50
[ mAX|mSP, mSP|mMEM ], // PUSH EAX
[ mCX|mSP, mSP|mMEM ],
[ mDX|mSP, mSP|mMEM ],
[ mBX|mSP, mSP|mMEM ],
[ mSP|mSP, mSP|mMEM ],
[ mBP|mSP, mSP|mMEM ],
[ mSI|mSP, mSP|mMEM ],
[ mDI|mSP, mSP|mMEM ],
// 58
[ mSP|mMEM, mAX|mSP ], // POP EAX
[ mSP|mMEM, mCX|mSP ],
[ mSP|mMEM, mDX|mSP ],
[ mSP|mMEM, mBX|mSP ],
[ mSP|mMEM, mSP|mSP ],
[ mSP|mMEM, mBP|mSP ],
[ mSP|mMEM, mSI|mSP ],
[ mSP|mMEM, mDI|mSP ],
// 60
[ N, N ], // PUSHA
[ N, N ], // POPA
[ N, N ], // BOUND Gv,Ma
[ N, N ], // ARPL Ew,Rw
[ N, N ], // SEG FS
[ N, N ], // SEG GS
[ N, N ], // operand size prefix
[ N, N ], // address size prefix
// 68
[ mSP, mSP|mMEM ], // PUSH immed16/32
[ EA, F|R ], // IMUL Gv,Ev,lv
[ mSP, mSP|mMEM ], // PUSH immed8
[ EA, F|R ], // IMUL Gv,Ev,lb
[ N, N ], // INSB Yb,DX
[ N, N ], // INSW/D Yv,DX
[ N, N ], // OUTSB DX,Xb
[ N, N ], // OUTSW/D DX,Xv
// 70
[ F|N, N ],
[ F|N, N ],
[ F|N, N ],
[ F|N, N ],
[ F|N, N ],
[ F|N, N ],
[ F|N, N ],
[ F|N, N ],
// 78
[ F|N, N ],
[ F|N, N ],
[ F|N, N ],
[ F|N, N ],
[ F|N, N ],
[ F|N, N ],
[ F|N, N ],
[ F|N, N ],
// 80
[ N, N ],
[ N, N ],
[ N, N ],
[ N, N ],
[ EA|R, F ], // TEST EA,r8
[ EA|R, F ], // TEST EA,r16/32
[ EA|R, EA|R ], // XCHG EA,r8
[ EA|R, EA|R ], // XCHG EA,r16/32
// 88
[ R|B, EA|B ], // MOV EA8,r8
[ R, EA ], // MOV EA,r16/32
[ EA|B, R|B ], // MOV r8,EA8
[ EA, R ], // MOV r16/32,EA
[ N, N ], // MOV EA,segreg
[ EA, R ], // LEA r16/32,EA
[ N, N ], // MOV segreg,EA
[ mSP|mMEM, EA|mSP ], // POP mem16/32
// 90
[ 0, 0 ], // NOP
[ mAX|mCX, mAX|mCX ],
[ mAX|mDX, mAX|mDX ],
[ mAX|mBX, mAX|mBX ],
[ mAX|mSP, mAX|mSP ],
[ mAX|mBP, mAX|mBP ],
[ mAX|mSI, mAX|mSI ],
[ mAX|mDI, mAX|mDI ],
// 98
[ mAX, mAX ], // CBW
[ mAX, mDX ], // CWD
[ N, N|F ], // CALL far ptr
[ N, N ], // WAIT
[ F|mSP, mSP|mMEM ], // PUSHF
[ mSP|mMEM, F|mSP ], // POPF
[ mAX, F ], // SAHF
[ F, mAX ], // LAHF
// A0
[ mMEM, mAX ], // MOV AL,moffs8
[ mMEM, mAX ], // MOV EAX,moffs32
[ mAX, mMEM ], // MOV moffs8,AL
[ mAX, mMEM ], // MOV moffs32,EAX
[ N, N ], // MOVSB
[ N, N ], // MOVSW/D
[ N, N ], // CMPSB
[ N, N ], // CMPSW/D
// A8
[ mAX, F ], // TEST AL,imm8
[ mAX, F ], // TEST AX,imm16
[ N, N ], // STOSB
[ N, N ], // STOSW/D
[ N, N ], // LODSB
[ N, N ], // LODSW/D
[ N, N ], // SCASB
[ N, N ], // SCASW/D
// B0
[ 0, mAX ], // MOV AL,imm8
[ 0, mCX ],
[ 0, mDX ],
[ 0, mBX ],
[ 0, mAX ],
[ 0, mCX ],
[ 0, mDX ],
[ 0, mBX ],
// B8
[ 0, mAX ], // MOV AX,imm16
[ 0, mCX ],
[ 0, mDX ],
[ 0, mBX ],
[ 0, mSP ],
[ 0, mBP ],
[ 0, mSI ],
[ 0, mDI ],
// C0
[ EA, F|EA ], // Shift Eb,Ib
[ EA, F|EA ],
[ N, N ],
[ N, N ],
[ N, N ],
[ N, N ],
[ 0, EA|B ], // MOV EA8,imm8
[ 0, EA ], // MOV EA,imm16
// C8
[ N, N ], // ENTER
[ N, N ], // LEAVE
[ N, N ], // RETF lw
[ N, N ], // RETF
[ N, N ], // INT 3
[ N, N ], // INT lb
[ N, N ], // INTO
[ N, N ], // IRET
// D0
[ EA, F|EA ], // Shift EA,1
[ EA, F|EA ],
[ EA|mCX, F|EA ], // Shift EA,CL
[ EA|mCX, F|EA ],
[ mAX, F|mAX ], // AAM
[ mAX, F|mAX ], // AAD
[ N, N ], // reserved
[ mAX|mBX|mMEM, mAX ], // XLAT
// D8
[ N, N ],
[ N, N ],
[ N, N ],
[ N, N ],
[ N, N ],
[ N, N ],
[ N, N ],
[ N, N ],
// E0
[ F|mCX|N,mCX|N ], // LOOPNE jb
[ F|mCX|N,mCX|N ], // LOOPE jb
[ mCX|N, mCX|N ], // LOOP jb
[ mCX|N, N ], // JCXZ jb
[ N, N ], // IN AL,lb
[ N, N ], // IN EAX,lb
[ N, N ], // OUT lb,AL
[ N, N ], // OUT lb,EAX
// E8
[ N, N|F ], // CALL jv
[ N, N ], // JMP Jv
[ N, N ], // JMP Ab
[ N, N ], // JMP jb
[ N|mDX, N|mAX ], // IN AL,DX
[ N|mDX, N|mAX ], // IN AX,DX
[ N|mAX|mDX,N ], // OUT DX,AL
[ N|mAX|mDX,N ], // OUT DX,AX
// F0
[ N, N ], // LOCK
[ N, N ], // reserved
[ N, N ], // REPNE
[ N, N ], // REP,REPE
[ N, N ], // HLT
[ F, F ], // CMC
[ N, N ],
[ N, N ],
// F8
[ 0, F ], // CLC
[ 0, F ], // STC
[ N, N ], // CLI
[ N, N ], // STI
[ N, N ], // CLD
[ N, N ], // STD
[ EA, F|EA ], // INC/DEC
[ N, N ],
];
/****************************************
* Same thing, but for groups.
*/
extern (D) private immutable uint[2][8][8] grprw =
[
[
// Grp 1
[ EA, F|EA ], // ADD
[ EA, F|EA ], // OR
[ F|EA, F|EA ], // ADC
[ F|EA, F|EA ], // SBB
[ EA, F|EA ], // AND
[ EA, F|EA ], // SUB
[ EA, F|EA ], // XOR
[ EA, F ], // CMP
],
[
// Grp 3
[ EA, F ], // TEST EA,imm
[ N, N ], // reserved
[ EA, EA ], // NOT
[ EA, F|EA ], // NEG
[ mAX|EA, F|mAX|mDX ], // MUL
[ mAX|EA, F|mAX|mDX ], // IMUL
[ mAX|mDX|EA, F|mAX|mDX ], // DIV
// Could generate an exception we want to catch
//mAX|mDX|EA|N, F|mAX|mDX|N, // IDIV
[ mAX|mDX|EA, F|mAX|mDX ], // IDIV
],
[
// Grp 5
[ EA, F|EA ], // INC Ev
[ EA, F|EA ], // DEC Ev
[ N|EA, N ], // CALL Ev
[ N|EA, N ], // CALL eP
[ N|EA, N ], // JMP Ev
[ N|EA, N ], // JMP Ep
[ mSP|EA, mSP|mMEM ], // PUSH Ev
[ N, N ], // reserved
],
[
// Grp 3, byte version
[ EA|B, F ], // TEST EA,imm
[ N, N ], // reserved
[ EA|B, EA|B ], // NOT
[ EA|B, F|EA|B ], // NEG
[ mAX|EA, F|mAX ], // MUL
[ mAX|EA, F|mAX ], // IMUL
[ mAX|EA, F|mAX ], // DIV
// Could generate an exception we want to catch
//mAX|EA|N, F|mAX|N, // IDIV
[ mAX|EA, F|mAX ], // IDIV
]
];
/********************************************
* For floating point opcodes 0xD8..0xDF, with Irm < 0xC0.
* [][][0] = read
* [1] = write
*/
extern (D) private immutable uint[2][8][8] grpf1 =
[
[
// 0xD8
[ EA|S, S|C ], // FADD float
[ EA|S, S|C ], // FMUL float
[ EA|S, C ], // FCOM float
[ EA|S, S|C ], // FCOMP float
[ EA|S, S|C ], // FSUB float
[ EA|S, S|C ], // FSUBR float
[ EA|S, S|C ], // FDIV float
[ EA|S, S|C ], // FDIVR float
],
[
// 0xD9
[ EA, S|C ], // FLD float
[ N, N ], //
[ S, EA|C ], // FST float
[ S, EA|S|C ], // FSTP float
[ N, N ], // FLDENV
[ N, N ], // FLDCW
[ N, N ], // FSTENV
[ N, N ], // FSTCW
],
[
// 0xDA
[ EA|S, S|C ], // FIADD long
[ EA|S, S|C ], // FIMUL long
[ EA|S, C ], // FICOM long
[ EA|S, S|C ], // FICOMP long
[ EA|S, S|C ], // FISUB long
[ EA|S, S|C ], // FISUBR long
[ EA|S, S|C ], // FIDIV long
[ EA|S, S|C ], // FIDIVR long
],
[
// 0xDB
[ EA, S|C ], // FILD long
[ S, EA|S|C ], // FISTTP int
[ S, EA|C ], // FIST long
[ S, EA|S|C ], // FISTP long
[ N, N ], //
[ EA, S|C ], // FLD real80
[ N, N ], //
[ S, EA|S|C ], // FSTP real80
],
[
// 0xDC
[ EA|S, S|C ], // FADD double
[ EA|S, S|C ], // FMUL double
[ EA|S, C ], // FCOM double
[ EA|S, S|C ], // FCOMP double
[ EA|S, S|C ], // FSUB double
[ EA|S, S|C ], // FSUBR double
[ EA|S, S|C ], // FDIV double
[ EA|S, S|C ], // FDIVR double
],
[
// 0xDD
[ EA, S|C ], // FLD double
[ S, EA|S|C ], // FISTTP long
[ S, EA|C ], // FST double
[ S, EA|S|C ], // FSTP double
[ N, N ], // FRSTOR
[ N, N ], //
[ N, N ], // FSAVE
[ C, EA ], // FSTSW
],
[
// 0xDE
[ EA|S, S|C ], // FIADD short
[ EA|S, S|C ], // FIMUL short
[ EA|S, C ], // FICOM short
[ EA|S, S|C ], // FICOMP short
[ EA|S, S|C ], // FISUB short
[ EA|S, S|C ], // FISUBR short
[ EA|S, S|C ], // FIDIV short
[ EA|S, S|C ], // FIDIVR short
],
[
// 0xDF
[ EA, S|C ], // FILD short
[ S, EA|S|C ], // FISTTP short
[ S, EA|C ], // FIST short
[ S, EA|S|C ], // FISTP short
[ EA, S|C ], // FBLD packed BCD
[ EA, S|C ], // FILD long long
[ S, EA|S|C ], // FBSTP packed BCD
[ S, EA|S|C ], // FISTP long long
]
];
/********************************************
* Micro-ops for floating point opcodes 0xD8..0xDF, with Irm < 0xC0.
*/
extern (D) private immutable ubyte[8][8] uopsgrpf1 =
[
[
// 0xD8
2, // FADD float
2, // FMUL float
2, // FCOM float
2, // FCOMP float
2, // FSUB float
2, // FSUBR float
2, // FDIV float
2, // FDIVR float
],
[
// 0xD9
1, // FLD float
0, //
2, // FST float
2, // FSTP float
5, // FLDENV
3, // FLDCW
5, // FSTENV
5, // FSTCW
],
[
// 0xDA
5, // FIADD long
5, // FIMUL long
5, // FICOM long
5, // FICOMP long
5, // FISUB long
5, // FISUBR long
5, // FIDIV long
5, // FIDIVR long
],
[
// 0xDB
4, // FILD long
0, //
4, // FIST long
4, // FISTP long
0, //
4, // FLD real80
0, //
5, // FSTP real80
],
[
// 0xDC
2, // FADD double
2, // FMUL double
2, // FCOM double
2, // FCOMP double
2, // FSUB double
2, // FSUBR double
2, // FDIV double
2, // FDIVR double
],
[
// 0xDD
1, // FLD double
0, //
2, // FST double
2, // FSTP double
5, // FRSTOR
0, //
5, // FSAVE
5, // FSTSW
],
[
// 0xDE
5, // FIADD short
5, // FIMUL short
5, // FICOM short
5, // FICOMP short
5, // FISUB short
5, // FISUBR short
5, // FIDIV short
5, // FIDIVR short
],
[
// 0xDF
4, // FILD short
0, //
4, // FIST short
4, // FISTP short
5, // FBLD packed BCD
4, // FILD long long
5, // FBSTP packed BCD
4, // FISTP long long
]
];
/**************************************************
* Determine number of micro-ops for Pentium Pro and Pentium II processors.
* 0 means special case,
* 5 means 'complex'
*/
extern (D) private immutable ubyte[256] insuops =
[ 0,0,0,0, 1,1,4,5, /* 00 */
0,0,0,0, 1,1,4,0, /* 08 */
0,0,0,0, 2,2,4,5, /* 10 */
0,0,0,0, 2,2,4,5, /* 18 */
0,0,0,0, 1,1,0,1, /* 20 */
0,0,0,0, 1,1,0,1, /* 28 */
0,0,0,0, 1,1,0,1, /* 30 */
0,0,0,0, 1,1,0,1, /* 38 */
1,1,1,1, 1,1,1,1, /* 40 */
1,1,1,1, 1,1,1,1, /* 48 */
3,3,3,3, 3,3,3,3, /* 50 */
2,2,2,2, 3,2,2,2, /* 58 */
5,5,5,5, 0,0,0,0, /* 60 */
3,3,0,0, 5,5,5,5, /* 68 */
1,1,1,1, 1,1,1,1, /* 70 */
1,1,1,1, 1,1,1,1, /* 78 */
0,0,0,0, 0,0,0,0, /* 80 */
0,0,0,0, 0,1,4,0, /* 88 */
1,3,3,3, 3,3,3,3, /* 90 */
1,1,5,0, 5,5,1,1, /* 98 */
1,1,2,2, 5,5,5,5, /* A0 */
1,1,3,3, 2,2,3,3, /* A8 */
1,1,1,1, 1,1,1,1, /* B0 */
1,1,1,1, 1,1,1,1, /* B8 */
0,0,5,4, 0,0,0,0, /* C0 */
5,3,5,5, 5,3,5,5, /* C8 */
0,0,0,0, 4,3,0,2, /* D0 */
0,0,0,0, 0,0,0,0, /* D8 */
4,4,4,2, 5,5,5,5, /* E0 */
4,1,5,1, 5,5,5,5, /* E8 */
0,0,5,5, 5,1,0,0, /* F0 */
1,1,5,5, 4,4,0,0, /* F8 */
];
extern (D) private immutable ubyte[8] uopsx = [ 1,1,2,5,1,1,1,5 ];
/************************************************
* Determine number of micro-ops for Pentium Pro and Pentium II processors.
* 5 means 'complex'.
* Doesn't currently handle:
* floating point
* MMX
* 0F opcodes
* prefix bytes
*/
private int uops(code *c)
{ int n;
int op;
int op2;
op = c.Iop & 0xFF;
if ((c.Iop & 0xFF00) == 0x0F00)
op = 0x0F;
n = insuops[op];
if (!n) // if special case
{ ubyte irm,mod,reg,rm;
irm = c.Irm;
mod = (irm >> 6) & 3;
reg = (irm >> 3) & 7;
rm = irm & 7;
switch (op)
{
case 0x10:
case 0x11: // ADC rm,r
case 0x18:
case 0x19: // SBB rm,r
n = (mod == 3) ? 2 : 4;
break;
case 0x12:
case 0x13: // ADC r,rm
case 0x1A:
case 0x1B: // SBB r,rm
n = (mod == 3) ? 2 : 3;
break;
case 0x00:
case 0x01: // ADD rm,r
case 0x08:
case 0x09: // OR rm,r
case 0x20:
case 0x21: // AND rm,r
case 0x28:
case 0x29: // SUB rm,r
case 0x30:
case 0x31: // XOR rm,r
n = (mod == 3) ? 1 : 4;
break;
case 0x02:
case 0x03: // ADD r,rm
case 0x0A:
case 0x0B: // OR r,rm
case 0x22:
case 0x23: // AND r,rm
case 0x2A:
case 0x2B: // SUB r,rm
case 0x32:
case 0x33: // XOR r,rm
case 0x38:
case 0x39: // CMP rm,r
case 0x3A:
case 0x3B: // CMP r,rm
case 0x69: // IMUL rm,r,imm
case 0x6B: // IMUL rm,r,imm8
case 0x84:
case 0x85: // TEST rm,r
n = (mod == 3) ? 1 : 2;
break;
case 0x80:
case 0x81:
case 0x82:
case 0x83:
if (reg == 2 || reg == 3) // ADC/SBB rm,imm
n = (mod == 3) ? 2 : 4;
else if (reg == 7) // CMP rm,imm
n = (mod == 3) ? 1 : 2;
else
n = (mod == 3) ? 1 : 4;
break;
case 0x86:
case 0x87: // XCHG rm,r
n = (mod == 3) ? 3 : 5;
break;
case 0x88:
case 0x89: // MOV rm,r
n = (mod == 3) ? 1 : 2;
break;
case 0x8A:
case 0x8B: // MOV r,rm
n = 1;
break;
case 0x8C: // MOV Sreg,rm
n = (mod == 3) ? 1 : 3;
break;
case 0x8F:
if (reg == 0) // POP m
n = 5;
break;
case 0xC6:
case 0xC7:
if (reg == 0) // MOV rm,imm
n = (mod == 3) ? 1 : 2;
break;
case 0xD0:
case 0xD1:
if (reg == 2 || reg == 3) // RCL/RCR rm,1
n = (mod == 3) ? 2 : 4;
else
n = (mod == 3) ? 1 : 4;
break;
case 0xC0:
case 0xC1: // RCL/RCR rm,imm8
case 0xD2:
case 0xD3:
if (reg == 2 || reg == 3) // RCL/RCR rm,CL
n = 5;
else
n = (mod == 3) ? 1 : 4;
break;
case 0xD8:
case 0xD9:
case 0xDA:
case 0xDB:
case 0xDC:
case 0xDD:
case 0xDE:
case 0xDF:
// Floating point opcodes
if (irm < 0xC0)
{ n = uopsgrpf1[op - 0xD8][reg];
break;
}
n = uopsx[op - 0xD8];
switch (op)
{
case 0xD9:
switch (irm)
{
case 0xE0: // FCHS
n = 3;
break;
case 0xE8:
case 0xE9:
case 0xEA:
case 0xEB:
case 0xEC:
case 0xED:
n = 2;
break;
case 0xF0:
case 0xF1:
case 0xF2:
case 0xF3:
case 0xF4:
case 0xF5:
case 0xF8:
case 0xF9:
case 0xFB:
case 0xFC:
case 0xFD:
case 0xFE:
case 0xFF:
n = 5;
break;
default:
break;
}
break;
case 0xDE:
if (irm == 0xD9) // FCOMPP
n = 2;
break;
default:
break;
}
break;
case 0xF6:
if (reg == 6 || reg == 7) // DIV AL,rm8
n = (mod == 3) ? 3 : 4;
else if (reg == 4 || reg == 5 || reg == 0) // MUL/IMUL/TEST rm8
n = (mod == 3) ? 1 : 2;
else if (reg == 2 || reg == 3) // NOT/NEG rm
n = (mod == 3) ? 1 : 4;
break;
case 0xF7:
if (reg == 6 || reg == 7) // DIV EAX,rm
n = 4;
else if (reg == 4 || reg == 5) // MUL/IMUL rm
n = (mod == 3) ? 3 : 4;
else if (reg == 2 || reg == 3) // NOT/NEG rm
n = (mod == 3) ? 1 : 4;
break;
case 0xFF:
if (reg == 2 || reg == 3 || // CALL rm, CALL m,rm
reg == 5) // JMP seg:offset
n = 5;
else if (reg == 4)
n = (mod == 3) ? 1 : 2;
else if (reg == 0 || reg == 1) // INC/DEC rm
n = (mod == 3) ? 1 : 4;
else if (reg == 6) // PUSH rm
n = (mod == 3) ? 3 : 4;
break;
case 0x0F:
op2 = c.Iop & 0xFF;
if ((op2 & 0xF0) == 0x80) // Jcc
{ n = 1;
break;
}
if ((op2 & 0xF0) == 0x90) // SETcc
{ n = (mod == 3) ? 1 : 3;
break;
}
if (op2 == 0xB6 || op2 == 0xB7 || // MOVZX
op2 == 0xBE || op2 == 0xBF) // MOVSX
{ n = 1;
break;
}
if (op2 == 0xAF) // IMUL r,m
{ n = (mod == 3) ? 1 : 2;
break;
}
break;
default:
break;
}
}
if (n == 0)
n = 5; // copout for now
return n;
}
/******************************************
* Determine pairing classification.
* Don't deal with floating point, just assume they are all NP (Not Pairable).
* Returns:
* NP,UV,PU,PV optionally OR'd with PE
*/
private int pair_class(code *c)
{ ubyte op;
ubyte irm,mod,reg,rm;
uint a32;
int pc;
// Of course, with Intel this is *never* simple, and Intel's
// documentation is vague about the specifics.
op = c.Iop & 0xFF;
if ((c.Iop & 0xFF00) == 0x0F00)
op = 0x0F;
pc = pentcycl[op];
a32 = I32;
if (c.Iflags & CFaddrsize)
a32 ^= 1;
irm = c.Irm;
mod = (irm >> 6) & 3;
reg = (irm >> 3) & 7;
rm = irm & 7;
switch (op)
{
case 0x0F: // 2 byte opcode
if ((c.Iop & 0xF0) == 0x80) // if Jcc
pc = PV | PF;
break;
case 0x80:
case 0x81:
case 0x83:
if (reg == 2 || // ADC EA,immed
reg == 3) // SBB EA,immed
{ pc = PU;
goto L2;
}
goto L1; // AND/OR/XOR/ADD/SUB/CMP EA,immed
case 0x84:
case 0x85: // TEST EA,reg
if (mod == 3) // TEST reg,reg
pc = UV;
break;
case 0xC0:
case 0xC1:
if (reg >= 4)
pc = PU;
break;
case 0xC6:
case 0xC7:
if (reg == 0) // MOV EA,immed
{
L1:
pc = UV;
L2:
// if EA contains a displacement then
// can't execute in V, or pair in U
switch (mod)
{ case 0:
if (a32)
{ if (rm == 5 ||
(rm == 4 && (c.Isib & 7) == 5)
)
pc = NP;
}
else if (rm == 6)
pc = NP;
break;
case 1:
case 2:
pc = NP;
break;
default:
break;
}
}
break;
case 0xD9:
if (irm < 0xC0)
{
if (reg == 0)
pc = FX;
}
else if (irm < 0xC8)
pc = FX;
else if (irm < 0xD0)
pc = PV;
else
{
switch (irm)
{
case 0xE0:
case 0xE1:
case 0xE4:
pc = FX;
break;
default:
break;
}
}
break;
case 0xDB:
if (irm < 0xC0 && (reg == 0 || reg == 5))
pc = FX;
break;
case 0xDD:
if (irm < 0xC0)
{
if (reg == 0)
pc = FX;
}
else if (irm >= 0xE0 && irm < 0xF0)
pc = FX;
break;
case 0xDF:
if (irm < 0xC0 && (reg == 0 || reg == 5))
pc = FX;
break;
case 0xFE:
if (reg == 0 || reg == 1) // INC/DEC EA
pc = UV;
break;
case 0xFF:
if (reg == 0 || reg == 1) // INC/DEC EA
pc = UV;
else if (reg == 2 || reg == 4) // CALL/JMP near ptr EA
pc = PE|PV;
else if (reg == 6 && mod == 3) // PUSH reg
pc = PE | UV;
break;
default:
break;
}
if (c.Iflags & CFPREFIX && pc == UV) // if prefix byte
pc = PU;
return pc;
}
/******************************************
* For an instruction, determine what is read
* and what is written, and what is used for addressing.
* Determine operand size if EA (larger is ok).
*/
@trusted
private void getinfo(Cinfo *ci,code *c)
{
memset(ci,0,Cinfo.sizeof);
if (!c)
return;
ci.c = c;
if (PRO)
{
ci.uops = cast(ubyte)uops(c);
ci.isz = cast(ubyte)calccodsize(c);
}
else
ci.pair = cast(ubyte)pair_class(c);
ubyte op;
ubyte op2;
ubyte irm,mod,reg,rm;
uint a32;
int pc;
uint r,w;
int sz = I32 ? 4 : 2;
ci.r = 0;
ci.w = 0;
ci.a = 0;
op = c.Iop & 0xFF;
if ((c.Iop & 0xFF00) == 0x0F00)
op = 0x0F;
//printf("\tgetinfo %x, op %x \n",c,op);
pc = pentcycl[op];
a32 = I32;
if (c.Iflags & CFaddrsize)
a32 ^= 1;
if (c.Iflags & CFopsize)
sz ^= 2 | 4;
irm = c.Irm;
mod = (irm >> 6) & 3;
reg = (irm >> 3) & 7;
rm = irm & 7;
r = oprw[op][0];
w = oprw[op][1];
switch (op)
{
case 0x50:
case 0x51:
case 0x52:
case 0x53:
case 0x55:
case 0x56:
case 0x57: // PUSH reg
ci.flags |= CIFL.push;
goto Lpush;
case 0x54: // PUSH ESP
case 0x6A: // PUSH imm8
case 0x68: // PUSH imm
case 0x0E:
case 0x16:
case 0x1E:
case 0x06:
case 0x9C:
Lpush:
ci.spadjust = -sz;
ci.a |= mSP;
break;
case 0x58:
case 0x59:
case 0x5A:
case 0x5B:
case 0x5C:
case 0x5D:
case 0x5E:
case 0x5F: // POP reg
case 0x1F:
case 0x07:
case 0x17:
case 0x9D: // POPF
Lpop:
ci.spadjust = sz;
ci.a |= mSP;
break;
case 0x80:
if (reg == 7) // CMP
c.Iflags |= CFpsw;
r = B | grprw[0][reg][0]; // Grp 1 (byte)
w = B | grprw[0][reg][1];
break;
case 0x81:
case 0x83:
if (reg == 7) // CMP
c.Iflags |= CFpsw;
else if (irm == modregrm(3,0,SP)) // ADD ESP,imm
{
assert(c.IFL2 == FLconst);
ci.spadjust = (op == 0x81) ? c.IEV2.Vint : cast(byte)c.IEV2.Vint;
}
else if (irm == modregrm(3,5,SP)) // SUB ESP,imm
{
assert(c.IFL2 == FLconst);
ci.spadjust = (op == 0x81) ? -c.IEV2.Vint : -cast(int)cast(byte)c.IEV2.Vint;
}
r = grprw[0][reg][0]; // Grp 1
w = grprw[0][reg][1];
break;
case 0x8F:
if (reg == 0) // POP rm
goto Lpop;
break;
case 0xA0:
case 0xA1:
case 0xA2:
case 0xA3:
// Fake having an EA to simplify code in conflict()
ci.flags |= CIFL.ea;
ci.reg = 0;
ci.sibmodrm = a32 ? modregrm(0,0,5) : modregrm(0,0,6);
c.IFL1 = c.IFL2;
c.IEV1 = c.IEV2;
break;
case 0xC2:
case 0xC3:
case 0xCA:
case 0xCB: // RET
ci.a |= mSP;
break;
case 0xE8:
if (c.Iflags & CFclassinit) // call to __j_classinit
{ r = 0;
w = F;
version (CLASSINIT2)
ci.pair = UV; // it is patched to CMP EAX,0
else
ci.pair = NP;
}
break;
case 0xF6:
r = grprw[3][reg][0]; // Grp 3, byte version
w = grprw[3][reg][1];
break;
case 0xF7:
r = grprw[1][reg][0]; // Grp 3
w = grprw[1][reg][1];
break;
case 0x0F:
op2 = c.Iop & 0xFF;
if ((op2 & 0xF0) == 0x80) // if Jxx instructions
{
ci.r = F | N;
ci.w = N;
goto Lret;
}
ci.r = N;
ci.w = N; // copout for now
goto Lret;
case 0xD7: // XLAT
ci.a = mAX | mBX;
break;
case 0xFF:
r = grprw[2][reg][0]; // Grp 5
w = grprw[2][reg][1];
if (reg == 6) // PUSH rm
goto Lpush;
break;
case 0x38:
case 0x39:
case 0x3A:
case 0x3B:
case 0x3C: // CMP AL,imm8
case 0x3D: // CMP EAX,imm32
// For CMP opcodes, always test for flags
c.Iflags |= CFpsw;
break;
case ESCAPE:
if (c.Iop == (ESCAPE | ESCadjfpu))
ci.fpuadjust = c.IEV1.Vint;
break;
case 0xD0:
case 0xD1:
case 0xD2:
case 0xD3:
case 0xC0:
case 0xC1:
if (reg == 2 || reg == 3) // if RCL or RCR
c.Iflags |= CFpsw; // always test for flags
break;
case 0xD8:
case 0xD9:
case 0xDA:
case 0xDB:
case 0xDC:
case 0xDD:
case 0xDE:
case 0xDF:
if (irm < 0xC0)
{ r = grpf1[op - 0xD8][reg][0];
w = grpf1[op - 0xD8][reg][1];
switch (op)
{
case 0xD8:
if (reg == 3) // if FCOMP
ci.fpuadjust = -1;
else
ci.fp_op = FP.fop;
break;
case 0xD9:
if (reg == 0) // if FLD float
{ ci.fpuadjust = 1;
ci.fp_op = FP.fld;
}
else if (reg == 3) // if FSTP float
{ ci.fpuadjust = -1;
ci.fp_op = FP.fstp;
}
else if (reg == 5 || reg == 7)
sz = 2;
else if (reg == 4 || reg == 6)
sz = 28;
break;
case 0xDA:
if (reg == 3) // if FICOMP
ci.fpuadjust = -1;
break;
case 0xDB:
if (reg == 0 || reg == 5)
{ ci.fpuadjust = 1;
ci.fp_op = FP.fld; // FILD / FLD long double
}
if (reg == 3 || reg == 7)
ci.fpuadjust = -1;
if (reg == 7)
ci.fp_op = FP.fstp; // FSTP long double
if (reg == 5 || reg == 7)
sz = 10;
break;
case 0xDC:
sz = 8;
if (reg == 3) // if FCOMP
ci.fpuadjust = -1;
else
ci.fp_op = FP.fop;
break;
case 0xDD:
if (reg == 0) // if FLD double
{ ci.fpuadjust = 1;
ci.fp_op = FP.fld;
}
if (reg == 3) // if FSTP double
{ ci.fpuadjust = -1;
ci.fp_op = FP.fstp;
}
if (reg == 7)
sz = 2;
else if (reg == 4 || reg == 6)
sz = 108;
else
sz = 8;
break;
case 0xDE:
sz = 2;
if (reg == 3) // if FICOMP
ci.fpuadjust = -1;
break;
case 0xDF:
sz = 2;
if (reg == 4 || reg == 6)
sz = 10;
else if (reg == 5 || reg == 7)
sz = 8;
if (reg == 0 || reg == 4 || reg == 5)
ci.fpuadjust = 1;
else if (reg == 3 || reg == 6 || reg == 7)
ci.fpuadjust = -1;
break;
default:
break;
}
break;
}
else if (op == 0xDE)
{ ci.fpuadjust = -1; // pop versions of Fop's
if (irm == 0xD9)
ci.fpuadjust = -2; // FCOMPP
}
// Most floating point opcodes aren't staged, but are
// sent right through, in order to make use of the large
// latencies with floating point instructions.
if (ci.fp_op == FP.fld ||
(op == 0xD9 && (irm & 0xF8) == 0xC0))
{ } // FLD ST(i)
else
ci.flags |= CIFL.nostage;
switch (op)
{
case 0xD8:
r = S;
w = C;
if ((irm & ~7) == 0xD0)
w |= S;
break;
case 0xD9:
// FCHS or FABS or FSQRT
if (irm == 0xE0 || irm == 0xE1 || irm == 0xFA)
ci.fp_op = FP.fop;
r = S;
w = S|C;
break;
case 0xDA:
if (irm == 0xE9) // FUCOMPP
{ r = S;
w = S|C;
break;
}
break;
case 0xDB:
if (irm == 0xE2) // FCLEX
{ r = 0;
w = C;
break;
}
if (irm == 0xE3) // FINIT
{ r = 0;
w = S|C;
break;
}
break;
case 0xDC:
case 0xDE:
if ((irm & 0xF0) != 0xD0)
{ r = S;
w = S|C;
break;
}
break;
case 0xDD:
// Not entirely correct, but conservative
r = S;
w = S|C;
break;
case 0xDF:
if (irm == 0xE0) // FSTSW AX
{ r = C;
w = mAX;
break;
}
break;
default:
break;
}
break;
default:
//printf("\t\tNo special case\n");
break;
}
if ((r | w) & B) // if byte operation
sz = 1; // operand size is 1
ci.r = r & ~(R | EA);
ci.w = w & ~(R | EA);
if (r & R)
ci.r |= mask((r & B) ? (reg & 3) : reg);
if (w & R)
ci.w |= mask((w & B) ? (reg & 3) : reg);
// OR in bits for EA addressing mode
if ((r | w) & EA)
{ ubyte sib;
sib = 0;
switch (mod)
{
case 0:
if (a32)
{
if (rm == 4)
{
sib = c.Isib;
if ((sib & modregrm(0,7,0)) != modregrm(0,4,0))
ci.a |= mask((sib >> 3) & 7); // index register
if ((sib & 7) != 5)
ci.a |= mask(sib & 7); // base register
}
else if (rm != 5)
ci.a |= mask(rm);
}
else
{
immutable ubyte[8] ea16 = [mBX|mSI,mBX|mDI,mBP|mSI,mBP|mDI,mSI,mDI,0,mBX];
ci.a |= ea16[rm];
}
goto Lmem;
case 1:
case 2:
if (a32)
{
if (rm == 4)
{
sib = c.Isib;
if ((sib & modregrm(0,7,0)) != modregrm(0,4,0))
ci.a |= mask((sib >> 3) & 7); // index register
ci.a |= mask(sib & 7); // base register
}
else
ci.a |= mask(rm);
}
else
{
immutable ubyte[8] ea16 = [mBX|mSI,mBX|mDI,mBP|mSI,mBP|mDI,mSI,mDI,mBP,mBX];
ci.a |= ea16[rm];
}
Lmem:
if (r & EA)
ci.r |= mMEM;
if (w & EA)
ci.w |= mMEM;
ci.flags |= CIFL.ea;
break;
case 3:
if (r & EA)
ci.r |= mask((r & B) ? (rm & 3) : rm);
if (w & EA)
ci.w |= mask((w & B) ? (rm & 3) : rm);
break;
default:
assert(0);
}
// Adjust sibmodrm so that addressing modes can be compared simply
irm &= modregrm(3,0,7);
if (a32)
{
if (irm != modregrm(0,0,5))
{
switch (mod)
{
case 0:
if ((sib & 7) != 5) // if not disp32[index]
{
c.IFL1 = FLconst;
c.IEV1.Vpointer = 0;
irm |= 0x80;
}
break;
case 1:
c.IEV1.Vpointer = cast(byte) c.IEV1.Vpointer;
irm = modregrm(2, 0, rm);
break;
default:
break;
}
}
}
else
{
if (irm != modregrm(0,0,6))
{
switch (mod)
{
case 0:
c.IFL1 = FLconst;
c.IEV1.Vpointer = 0;
irm |= 0x80;
break;
case 1:
c.IEV1.Vpointer = cast(byte) c.IEV1.Vpointer;
irm = modregrm(2, 0, rm);
break;
default:
break;
}
}
}
ci.r |= ci.a;
ci.reg = reg;
ci.sibmodrm = (sib << 8) | irm;
}
Lret:
if (ci.w & mSP) // if stack pointer is modified
ci.w |= mMEM; // then we are implicitly writing to memory
if (op == LEA) // if LEA
ci.r &= ~mMEM; // memory is not actually read
ci.sz = cast(ubyte)sz;
//printf("\t\t"); ci.print();
}
/******************************************
* Determine if two instructions can pair.
* Assume that in general, cu can pair in the U pipe and cv in the V.
* Look for things like register contentions.
* Input:
* cu instruction for U pipe
* cv instruction for V pipe
* Returns:
* !=0 if they can pair
*/
private int pair_test(Cinfo *cu,Cinfo *cv)
{
uint pcu;
uint pcv;
uint r1,w1;
uint r2,w2;
uint x;
pcu = cu.pair;
if (!(pcu & PU))
{
// See if pairs with FXCH and cv is FXCH
if (pcu & FX && cv.c.Iop == 0xD9 && (cv.c.Irm & ~7) == 0xC8)
goto Lpair;
goto Lnopair;
}
pcv = cv.pair;
if (!(pcv & PV))
goto Lnopair;
r1 = cu.r;
w1 = cu.w;
r2 = cv.r;
w2 = cv.w;
x = w1 & (r2 | w2) & ~(F|mMEM); // register contention
if (x && // if register contention
!(x == mSP && pcu & pcv & PE) // and not exception
)
goto Lnopair;
// Look for flags contention
if (w1 & r2 & F && !(pcv & PF))
goto Lnopair;
Lpair:
return 1;
Lnopair:
return 0;
}
/******************************************
* Determine if two instructions have an AGI or register contention.
* Returns:
* !=0 if they have an AGI
*/
private int pair_agi(Cinfo *c1, Cinfo *c2)
{
uint x = c1.w & c2.a;
return x && !(x == mSP && c1.pair & c2.pair & PE);
}
/********************************************
* Determine if three instructions can decode simultaneously
* in Pentium Pro and Pentium II.
* Input:
* c0,c1,c2 candidates for decoders 0,1,2
* c2 can be null
* Returns:
* !=0 if they can decode simultaneously
*/
private int triple_test(Cinfo *c0, Cinfo *c1, Cinfo *c2)
{
assert(c0);
if (!c1)
return 0;
int c2isz = c2 ? c2.isz : 0;
if (c0.isz > 7 || c1.isz > 7 || c2isz > 7 ||
c0.isz + c1.isz + c2isz > 16)
return 0;
// 4-1-1 decode
if (c1.uops > 1 ||
(c2 && c2.uops > 1))
return 0;
return 1;
}
/********************************************
* Get next instruction worth looking at for scheduling.
* Returns:
* null no more instructions
*/
private code * cnext(code *c)
{
while (1)
{
c = code_next(c);
if (!c)
break;
if (c.Iflags & (CFtarg | CFtarg2))
break;
if (!(c.Iop == NOP ||
c.Iop == (ESCAPE | ESClinnum)))
break;
}
return c;
}
/******************************************
* Instruction scheduler.
* Input:
* c list of instructions to schedule
* scratch scratch registers we can use
* Returns:
* revised list of scheduled instructions
*/
///////////////////////////////////
// Determine if c1 and c2 are swappable.
// c1 comes before c2.
// If they do not conflict
// return 0
// If they do conflict
// return 0x100 + delay_clocks
// Input:
// fpsched if 1, then adjust fxch_pre and fxch_post to swap,
// then return 0
// if 2, then adjust ci1 as well as ci2
@trusted
private int conflict(Cinfo *ci1,Cinfo *ci2,int fpsched)
{
code *c1;
code *c2;
uint r1,w1,a1;
uint r2,w2,a2;
int sz1,sz2;
int i = 0;
int delay_clocks;
c1 = ci1.c;
c2 = ci2.c;
//printf("conflict %x %x\n",c1,c2);
r1 = ci1.r;
w1 = ci1.w;
a1 = ci1.a;
sz1 = ci1.sz;
r2 = ci2.r;
w2 = ci2.w;
a2 = ci2.a;
sz2 = ci2.sz;
//printf("r1 %lx w1 %lx a1 %lx sz1 %x\n",r1,w1,a1,sz1);
//printf("r2 %lx w2 %lx a2 %lx sz2 %x\n",r2,w2,a2,sz2);
if ((c1.Iflags | c2.Iflags) & (CFvolatile | CFvex))
goto Lconflict;
// Determine if we should handle FPU register conflicts separately
//if (fpsched) printf("fp_op %d,%d:\n",ci1.fp_op,ci2.fp_op);
if (fpsched && ci1.fp_op && ci2.fp_op)
{
w1 &= ~(S|C);
r1 &= ~(S|C);
w2 &= ~(S|C);
r2 &= ~(S|C);
}
else
fpsched = 0;
if ((r1 | r2) & N)
{
goto Lconflict;
}
static if (0)
{
if (c1.Iop == 0xFF && c2.Iop == 0x8B)
{ c1.print(); c2.print(); i = 1;
printf("r1=%lx, w1=%lx, a1=%lx, sz1=%d, r2=%lx, w2=%lx, a2=%lx, sz2=%d\n",r1,w1,a1,sz1,r2,w2,a2,sz2);
}
}
L1:
if (w1 & r2 || (r1 | w1) & w2)
{ ubyte ifl1,ifl2;
if (i) printf("test\n");
static if (0)
{
if (c1.IFL1 != c2.IFL1) printf("t1\n");
if ((c1.Irm & modregrm(3,0,7)) != (c2.Irm & modregrm(3,0,7))) printf("t2\n");
if ((issib(c1.Irm) && c1.Isib != c2.Isib)) printf("t3\n");
if (c1.IEV1.Vpointer + sz1 <= c2.IEV1.Vpointer) printf("t4\n");
if (c2.IEV1.Vpointer + sz2 <= c1.IEV1.Vpointer) printf("t5\n");
}
// make sure CFpsw is reliably set
if (w1 & w2 & F && // if both instructions write to flags
w1 != F &&
w2 != F &&
!((r1 | r2) & F) && // but neither instruction reads them
!((c1.Iflags | c2.Iflags) & CFpsw)) // and we don't care about flags
{
w1 &= ~F;
w2 &= ~F; // remove conflict
goto L1; // and try again
}
// If other than the memory reference is a conflict
if (w1 & r2 & ~mMEM || (r1 | w1) & w2 & ~mMEM)
{ if (i) printf("\t1\n");
if (i) printf("r1=%x, w1=%x, a1=%x, sz1=%d, r2=%x, w2=%x, a2=%x, sz2=%d\n",r1,w1,a1,sz1,r2,w2,a2,sz2);
goto Lconflict;
}
// If referring to distinct types, then no dependency
if (c1.Irex && c2.Irex && c1.Irex != c2.Irex)
goto Lswap;
ifl1 = c1.IFL1;
ifl2 = c2.IFL1;
// Special case: Allow indexed references using registers other than
// ESP and EBP to be swapped with PUSH instructions
if (((c1.Iop & ~7) == 0x50 || // PUSH reg
c1.Iop == 0x6A || // PUSH imm8
c1.Iop == 0x68 || // PUSH imm16/imm32
(c1.Iop == 0xFF && ci1.reg == 6) // PUSH EA
) &&
ci2.flags & CIFL.ea && !(a2 & mSP) &&
!(a2 & mBP && cast(int)c2.IEV1.Vpointer < 0)
)
{
if (c1.Iop == 0xFF)
{
if (!(w2 & mMEM))
goto Lswap;
}
else
goto Lswap;
}
// Special case: Allow indexed references using registers other than
// ESP and EBP to be swapped with PUSH instructions
if (((c2.Iop & ~7) == 0x50 || // PUSH reg
c2.Iop == 0x6A || // PUSH imm8
c2.Iop == 0x68 || // PUSH imm16/imm32
(c2.Iop == 0xFF && ci2.reg == 6) // PUSH EA
) &&
ci1.flags & CIFL.ea && !(a1 & mSP) &&
!(a2 & mBP && cast(int)c2.IEV1.Vpointer < 0)
)
{
if (c2.Iop == 0xFF)
{
if (!(w1 & mMEM))
goto Lswap;
}
else
goto Lswap;
}
// If not both an EA addressing mode, conflict
if (!(ci1.flags & ci2.flags & CIFL.ea))
{ if (i) printf("\t2\n");
goto Lconflict;
}
if (ci1.sibmodrm == ci2.sibmodrm)
{ if (ifl1 != ifl2)
goto Lswap;
switch (ifl1)
{
case FLconst:
if (c1.IEV1.Vint != c2.IEV1.Vint &&
(c1.IEV1.Vint + sz1 <= c2.IEV1.Vint ||
c2.IEV1.Vint + sz2 <= c1.IEV1.Vint))
goto Lswap;
break;
case FLdatseg:
if (c1.IEV1.Vseg != c2.IEV1.Vseg ||
c1.IEV1.Vint + sz1 <= c2.IEV1.Vint ||
c2.IEV1.Vint + sz2 <= c1.IEV1.Vint)
goto Lswap;
break;
default:
break;
}
}
if ((c1.Iflags | c2.Iflags) & CFunambig &&
(ifl1 != ifl2 ||
ci1.sibmodrm != ci2.sibmodrm ||
(c1.IEV1.Vint != c2.IEV1.Vint &&
(c1.IEV1.Vint + sz1 <= c2.IEV1.Vint ||
c2.IEV1.Vint + sz2 <= c1.IEV1.Vint)
)
)
)
{
// Assume that [EBP] and [ESP] can point to the same location
if (((a1 | a2) & (mBP | mSP)) == (mBP | mSP))
goto Lconflict;
goto Lswap;
}
if (i) printf("\t3\n");
goto Lconflict;
}
Lswap:
if (fpsched)
{
//printf("\tfpsched %d,%d:\n",ci1.fp_op,ci2.fp_op);
ubyte x1 = ci1.fxch_pre;
ubyte y1 = ci1.fxch_post;
ubyte x2 = ci2.fxch_pre;
ubyte y2 = ci2.fxch_post;
static uint X(uint a, uint b) { return (a << 8) | b; }
switch (X(ci1.fp_op,ci2.fp_op))
{
case X(FP.fstp, FP.fld):
if (x1 || y1)
goto Lconflict;
if (x2)
goto Lconflict;
if (y2 == 0)
ci2.fxch_post++;
else if (y2 == 1)
{
ci2.fxch_pre++;
ci2.fxch_post++;
}
else
{
goto Lconflict;
}
break;
case X(FP.fstp, FP.fop):
if (x1 || y1)
goto Lconflict;
ci2.fxch_pre++;
ci2.fxch_post++;
break;
case X(FP.fop, FP.fop):
if (x1 == 0 && y1 == 1 && x2 == 0 && y2 == 0)
{ ci2.fxch_pre = 1;
ci2.fxch_post = 1;
break;
}
if (x1 == 0 && y1 == 0 && x2 == 1 && y2 == 1)
break;
goto Lconflict;
case X(FP.fop, FP.fld):
if (x1 || y1)
goto Lconflict;
if (x2)
goto Lconflict;
if (y2)
break;
else if (fpsched == 2)
ci1.fxch_post = 1;
ci2.fxch_post = 1;
break;
default:
goto Lconflict;
}
//printf("\tpre = %d, post = %d\n",ci2.fxch_pre,ci2.fxch_post);
}
//printf("w1 = x%x, w2 = x%x\n",w1,w2);
if (i) printf("no conflict\n\n");
return 0;
Lconflict:
//printf("r1=%x, w1=%x, r2=%x, w2=%x\n",r1,w1,r2,w2);
delay_clocks = 0;
// Determine if AGI
if (!PRO && pair_agi(ci1,ci2))
delay_clocks = 1;
// Special delays for floating point
if (fpsched)
{ if (ci1.fp_op == FP.fld && ci2.fp_op == FP.fstp)
delay_clocks = 1;
else if (ci1.fp_op == FP.fop && ci2.fp_op == FP.fstp)
delay_clocks = 3;
else if (ci1.fp_op == FP.fop && ci2.fp_op == FP.fop)
delay_clocks = 2;
}
else if (PRO)
{
// Look for partial register write stalls
if (w1 & r2 & ALLREGS && sz1 < sz2)
delay_clocks = 7;
}
else if ((w1 | r1) & (w2 | r2) & (C | S))
{
int op = c1.Iop;
int reg = c1.Irm & modregrm(0,7,0);
if (ci1.fp_op == FP.fld ||
(op == 0xD9 && (c1.Irm & 0xF8) == 0xC0)
)
{ } // FLD
else if (op == 0xD9 && (c1.Irm & 0xF8) == 0xC8)
{ } // FXCH
else if (c2.Iop == 0xD9 && (c2.Irm & 0xF8) == 0xC8)
{ } // FXCH
else
delay_clocks = 3;
}
if (i) printf("conflict %d\n\n",delay_clocks);
return 0x100 + delay_clocks;
}
enum TBLMAX = 2*3*20; // must be divisible by both 2 and 3
// (U,V pipe in Pentium, 3 decode units
// in Pentium Pro)
struct Schedule
{
nothrow:
Cinfo*[TBLMAX] tbl; // even numbers are U pipe, odd numbers are V
int tblmax; // max number of slots used
Cinfo[TBLMAX] cinfo;
int cinfomax;
Barray!(Cinfo*) stagelist; // list of instructions in staging area
int fpustackused; // number of slots in FPU stack that are used
@trusted
void initialize(int fpustackinit) // initialize scheduler
{
//printf("Schedule::initialize(fpustackinit = %d)\n", fpustackinit);
memset(&this, 0, Schedule.sizeof);
fpustackused = fpustackinit;
}
@trusted
void dtor()
{
stagelist.dtor();
}
@trusted
code **assemble(code **pc) // reassemble scheduled instructions
{
code *c;
debug
if (debugs) printf("assemble:\n");
assert(!*pc);
// Try to insert the rest of the staged instructions
size_t sli;
for (sli = 0; sli < stagelist.length; ++sli)
{
Cinfo* ci = stagelist[sli];
if (!ci)
continue;
if (!insert(ci))
break;
}
// Get the instructions out of the schedule table
assert(cast(uint)tblmax <= TBLMAX);
for (int i = 0; i < tblmax; i++)
{
Cinfo* ci = tbl[i];
debug
if (debugs)
{
if (PRO)
{ immutable char[4][3] tbl = [ "0 "," 1 "," 2" ];
if (ci)
printf("%s %d ",tbl[i - ((i / 3) * 3)].ptr,ci.uops);
else
printf("%s ",tbl[i - ((i / 3) * 3)].ptr);
}
else
{
printf((i & 1) ? " V " : "U ");
}
if (ci)
ci.c.print();
else
printf("\n");
}
if (!ci)
continue;
fpustackused += ci.fpuadjust;
//printf("stage()1: fpustackused = %d\n", fpustackused);
c = ci.c;
if (i == 0)
c.Iflags |= CFtarg; // by definition, first is always a jump target
else
c.Iflags &= ~CFtarg; // the rest are not
// Put in any FXCH prefix
if (ci.fxch_pre)
{ code *cf;
assert(i);
cf = gen2(null,0xD9,0xC8 + ci.fxch_pre);
*pc = cf;
pc = &cf.next;
}
*pc = c;
do
{
assert(*pc != code_next(*pc));
pc = &(*pc).next;
} while (*pc);
// Put in any FXCH postfix
if (ci.fxch_post)
{
for (int j = i + 1; j < tblmax; j++)
{ if (tbl[j])
{ if (tbl[j].fxch_pre == ci.fxch_post)
{
tbl[j].fxch_pre = 0; // they cancel each other out
goto L1;
}
break;
}
}
{ code *cf;
cf = gen2(null,0xD9,0xC8 + ci.fxch_post);
*pc = cf;
pc = &cf.next;
}
}
L1:
}
// Just append any instructions left in the staging area
foreach (ci; stagelist[sli .. stagelist.length])
{
if (!ci)
continue;
debug
if (debugs) { printf("appending: "); ci.c.print(); }
*pc = ci.c;
do
{
pc = &(*pc).next;
} while (*pc);
fpustackused += ci.fpuadjust;
//printf("stage()2: fpustackused = %d\n", fpustackused);
}
stagelist.setLength(0);
return pc;
}
/******************************
* Insert c into scheduling table.
* Returns:
* 0 could not be scheduled; have to start a new one
*/
int insert(Cinfo *ci)
{ code *c;
int clocks;
int i;
int ic = 0;
int imin;
targ_size_t offset;
targ_size_t vpointer;
int movesp = 0;
int reg2 = -1; // avoid "may be uninitialized" warning
//printf("insert "); ci.c.print();
//printf("insert() %d\n", fpustackused);
c = ci.c;
//printf("\tc.Iop %x\n",c.Iop);
vpointer = c.IEV1.Vpointer;
assert(cast(uint)tblmax <= TBLMAX);
if (tblmax == TBLMAX) // if out of space
goto Lnoinsert;
if (tblmax == 0) // if table is empty
{ // Just stuff it in the first slot
i = tblmax;
goto Linsert;
}
else if (c.Iflags & (CFtarg | CFtarg2))
// Jump targets can only be first in the scheduler
goto Lnoinsert;
// Special case of:
// PUSH reg1
// MOV reg2,x[ESP]
if (c.Iop == 0x8B &&
(c.Irm & modregrm(3,0,7)) == modregrm(1,0,4) &&
c.Isib == modregrm(0,4,SP) &&
c.IFL1 == FLconst &&
(cast(byte)c.IEV1.Vpointer) >= REGSIZE
)
{
movesp = 1; // this is a MOV reg2,offset[ESP]
offset = cast(byte)c.IEV1.Vpointer;
reg2 = (c.Irm >> 3) & 7;
}
// Start at tblmax, and back up until we get a conflict
ic = -1;
imin = 0;
for (i = tblmax; i >= 0; i--)
{
Cinfo* cit = tbl[i];
if (!cit)
continue;
// Look for special case swap
if (movesp &&
(cit.c.Iop & ~7) == 0x50 && // if PUSH reg1
(cit.c.Iop & 7) != reg2 && // if reg1 != reg2
(cast(byte)c.IEV1.Vpointer) >= -cit.spadjust
)
{
c.IEV1.Vpointer += cit.spadjust;
//printf("\t1, spadjust = %d, ptr = x%x\n",cit.spadjust,c.IEV1.Vpointer);
continue;
}
if (movesp &&
cit.c.Iop == 0x83 &&
cit.c.Irm == modregrm(3,5,SP) && // if SUB ESP,offset
cit.c.IFL2 == FLconst &&
(cast(byte)c.IEV1.Vpointer) >= -cit.spadjust
)
{
//printf("\t2, spadjust = %d\n",cit.spadjust);
c.IEV1.Vpointer += cit.spadjust;
continue;
}
clocks = conflict(cit,ci,1);
if (clocks)
{ int j;
ic = i; // where the conflict occurred
clocks &= 0xFF; // convert to delay count
// Move forward the delay clocks
if (clocks == 0)
j = i + 1;
else if (PRO)
j = (((i + 3) / 3) * 3) + clocks * 3;
else
{ j = ((i + 2) & ~1) + clocks * 2;
// It's possible we skipped over some AGI generating
// instructions due to movesp.
int k;
for (k = i + 1; k < j; k++)
{
if (k >= TBLMAX)
goto Lnoinsert;
if (tbl[k] && pair_agi(tbl[k],ci))
{
k = ((k + 2) & ~1) + 1;
}
}
j = k;
}
if (j >= TBLMAX) // exceed table size?
goto Lnoinsert;
imin = j; // first possible slot c can go in
break;
}
}
// Scan forward looking for a hole to put it in
for (i = imin; i < TBLMAX; i++)
{
if (tbl[i])
{
// In case, due to movesp, we skipped over some AGI instructions
if (!PRO && pair_agi(tbl[i],ci))
{
i = ((i + 2) & ~1) + 1;
if (i >= TBLMAX)
goto Lnoinsert;
}
}
else
{
if (PRO)
{ int i0 = (i / 3) * 3; // index of decode unit 0
Cinfo *ci0;
assert(((TBLMAX / 3) * 3) == TBLMAX);
switch (i - i0)
{
case 0: // i0 can handle any instruction
goto Linsert;
case 1:
ci0 = tbl[i0];
if (ci.uops > 1)
{
if (i0 >= imin && ci0.uops == 1)
goto L1;
i++;
break;
}
if (triple_test(ci0,ci,tbl[i0 + 2]))
goto Linsert;
break;
case 2:
ci0 = tbl[i0];
if (ci.uops > 1)
{
if (i0 >= imin && ci0.uops == 1)
{
if (i >= tblmax)
{ if (i + 1 >= TBLMAX)
goto Lnoinsert;
tblmax = i + 1;
}
tbl[i0 + 2] = tbl[i0 + 1];
tbl[i0 + 1] = ci0;
i = i0;
goto Linsert;
}
break;
}
if (triple_test(ci0,tbl[i0 + 1],ci))
goto Linsert;
break;
default:
assert(0);
}
}
else
{
assert((TBLMAX & 1) == 0);
if (i & 1) // if V pipe
{
if (pair_test(tbl[i - 1],ci))
{
goto Linsert;
}
else if (i > imin && pair_test(ci,tbl[i - 1]))
{
L1:
tbl[i] = tbl[i - 1];
if (i >= tblmax)
tblmax = i + 1;
i--;
//printf("\tswapping with x%02x\n",tbl[i + 1].c.Iop);
goto Linsert;
}
}
else // will always fit in U pipe
{
assert(!tbl[i + 1]); // because V pipe should be empty
goto Linsert;
}
}
}
}
Lnoinsert:
//printf("\tnoinsert\n");
c.IEV1.Vpointer = vpointer; // reset to original value
return 0;
Linsert:
// Insert at location i
assert(i < TBLMAX);
assert(tblmax <= TBLMAX);
tbl[i] = ci;
//printf("\tinsert at location %d\n",i);
// If it's a scheduled floating point code, we have to adjust
// the FXCH values
if (ci.fp_op)
{
ci.fxch_pre = 0;
ci.fxch_post = 0; // start over again
int fpu = fpustackused;
for (int j = 0; j < tblmax; j++)
{
if (tbl[j])
{
fpu += tbl[j].fpuadjust;
if (fpu >= 8) // if FPU stack overflow
{ tbl[i] = null;
//printf("fpu stack overflow\n");
goto Lnoinsert;
}
}
}
for (int j = tblmax; j > i; j--)
{
if (j < TBLMAX && tbl[j])
conflict(tbl[j],ci,2);
}
}
if (movesp)
{ // Adjust [ESP] offsets
//printf("\tic = %d, inserting at %d\n",ic,i);
assert(cast(uint)tblmax <= TBLMAX);
for (int j = ic + 1; j < i; j++)
{
Cinfo* cit = tbl[j];
if (cit)
{
c.IEV1.Vpointer -= cit.spadjust;
//printf("\t3, spadjust = %d, ptr = x%x\n",cit.spadjust,c.IEV1.Vpointer);
}
}
}
if (i >= tblmax)
tblmax = i + 1;
// Now do a hack. Look back at immediately preceding instructions,
// and see if we can swap with a push.
if (0 && movesp)
{
while (1)
{
int j;
for (j = 1; i > j; j++)
if (tbl[i - j])
break;
if (i >= j && tbl[i - j] &&
(tbl[i - j].c.Iop & ~7) == 0x50 && // if PUSH reg1
(tbl[i - j].c.Iop & 7) != reg2 && // if reg1 != reg2
cast(byte)c.IEV1.Vpointer >= REGSIZE)
{
//printf("\t-4 prec, i-j=%d, i=%d\n",i-j,i);
assert(cast(uint)i < TBLMAX);
assert(cast(uint)(i - j) < TBLMAX);
tbl[i] = tbl[i - j];
tbl[i - j] = ci;
i -= j;
c.IEV1.Vpointer -= REGSIZE;
}
else
break;
}
}
//printf("\tinsert\n");
return 1;
}
/******************************
* Insert c into staging area.
* Params:
* c = instruction to stage
* Returns:
* false if could not be scheduled; have to start a new one
*/
@trusted
bool stage(code *c)
{
//printf("stage: "); c.print();
if (cinfomax == TBLMAX) // if out of space
return false;
auto ci = &cinfo[cinfomax++];
getinfo(ci,c);
if (c.Iflags & (CFtarg | CFtarg2 | CFvolatile | CFvex))
{
// Insert anything in stagelist
foreach (ref cs; stagelist[])
{
if (cs)
{
if (!insert(cs))
return false;
cs = null;
}
}
return insert(ci) != 0;
}
// Look through stagelist, and insert any AGI conflicting instructions
bool agi = false;
foreach (ref cs; stagelist[])
{
if (cs)
{
if (pair_agi(cs,ci))
{
if (!insert(cs))
goto Lnostage;
cs = null;
agi = true; // we put out an AGI
}
}
}
// Look through stagelist, and insert any other conflicting instructions
foreach (i, ref cs; stagelist[])
{
if (!cs)
continue;
if (conflict(cs,ci,0) && // if conflict
!(cs.flags & ci.flags & CIFL.push))
{
if (cs.spadjust)
{
// We need to insert all previous adjustments to ESP
foreach (ref ca; stagelist[0 .. i])
{
if (ca && ca.spadjust)
{
if (!insert(ca))
goto Lnostage;
ca = null;
}
}
}
if (!insert(cs))
goto Lnostage;
cs = null;
}
}
// If floating point opcode, don't stage it, send it right out
if (!agi && ci.flags & CIFL.nostage)
{
if (!insert(ci))
goto Lnostage;
return true;
}
stagelist.push(ci); // append to staging list
return true;
Lnostage:
return false;
}
}
/********************************************
* Snip off tail of instruction sequence.
* Returns:
* next instruction (the tail) or
* null for no more instructions
*/
private code * csnip(code *c)
{
if (c)
{
uint iflags = c.Iflags & CFclassinit;
code **pc;
while (1)
{
pc = &c.next;
c = *pc;
if (!c)
break;
if (c.Iflags & (CFtarg | CFtarg2))
break;
if (!(c.Iop == NOP ||
c.Iop == (ESCAPE | ESClinnum) ||
c.Iflags & iflags))
break;
}
*pc = null;
}
return c;
}
/******************************
* Schedule Pentium instructions,
* based on Steve Russell's algorithm.
*/
@trusted
private code *schedule(code *c,regm_t scratch)
{
code *cresult = null;
code **pctail = &cresult;
Schedule sch = void;
sch.initialize(0); // initialize scheduling table
while (c)
{
if ((c.Iop == NOP ||
((c.Iop & ESCAPEmask) == ESCAPE && c.Iop != (ESCAPE | ESCadjfpu)) ||
c.Iflags & CFclassinit) &&
!(c.Iflags & (CFtarg | CFtarg2)))
{ code *cn;
// Just append this instruction to pctail and go to the next one
*pctail = c;
cn = code_next(c);
c.next = null;
pctail = &c.next;
c = cn;
continue;
}
//printf("init\n");
sch.initialize(sch.fpustackused); // initialize scheduling table
while (c)
{
//printf("insert %p\n",c);
if (!sch.stage(c)) // store c in scheduling table
break;
c = csnip(c);
}
//printf("assem %d\n",sch.tblmax);
pctail = sch.assemble(pctail); // reassemble instruction stream
}
sch.dtor();
return cresult;
}
/**************************************************************************/
/********************************************
* Replace any occurrence of r1 in EA with r2.
*/
private void repEA(code *c,uint r1,uint r2)
{
uint mod,reg,rm;
uint rmn;
rmn = c.Irm;
mod = rmn & 0xC0;
reg = rmn & modregrm(0,7,0);
rm = rmn & 7;
if (mod == 0xC0 && rm == r1)
{ } //c.Irm = mod | reg | r2;
else if (is32bitaddr(I32,c.Iflags) &&
// If not disp32
(rmn & modregrm(3,0,7)) != modregrm(0,0,5))
{
if (rm == 4)
{ // SIB byte addressing
uint sib;
uint base;
uint index;
sib = c.Isib;
base = sib & 7;
index = (sib >> 3) & 7;
if (base == r1 &&
!(r1 == 5 && mod == 0) &&
!(r2 == 5 && mod == 0)
)
base = r2;
if (index == r1)
index = r2;
c.Isib = cast(ubyte)((sib & 0xC0) | (index << 3) | base);
}
else if (rm == r1)
{
if (r1 == BP && r2 == SP)
{ // Replace [EBP] with [ESP]
c.Irm = cast(ubyte)(mod | reg | 4);
c.Isib = modregrm(0,4,SP);
}
else if (r2 == BP && mod == 0)
{
c.Irm = cast(ubyte)(modregrm(1,0,0) | reg | r2);
c.IFL1 = FLconst;
c.IEV1.Vint = 0;
}
else
c.Irm = cast(ubyte)(mod | reg | r2);
}
}
}
/******************************************
* Instruction scheduler.
* Input:
* c list of instructions to schedule
* scratch scratch registers we can use
* Returns:
* revised list of scheduled instructions
*/
/******************************************
* Swap c1 and c2.
* c1 comes before c2.
* Swap in place to not disturb addresses of jmp targets
*/
private void code_swap(code *c1,code *c2)
{ code cs;
// Special case of:
// PUSH reg1
// MOV reg2,x[ESP]
//printf("code_swap(%x, %x)\n",c1,c2);
if ((c1.Iop & ~7) == 0x50 &&
c2.Iop == 0x8B &&
(c2.Irm & modregrm(3,0,7)) == modregrm(1,0,4) &&
c2.Isib == modregrm(0,4,SP) &&
c2.IFL1 == FLconst &&
(cast(byte)c2.IEV1.Vpointer) >= REGSIZE &&
(c1.Iop & 7) != ((c2.Irm >> 3) & 7)
)
c2.IEV1.Vpointer -= REGSIZE;
cs = *c2;
*c2 = *c1;
*c1 = cs;
// Retain original CFtarg
c1.Iflags = (c1.Iflags & ~(CFtarg | CFtarg2)) | (c2.Iflags & (CFtarg | CFtarg2));
c2.Iflags = (c2.Iflags & ~(CFtarg | CFtarg2)) | (cs.Iflags & (CFtarg | CFtarg2));
c1.next = c2.next;
c2.next = cs.next;
}
private code *peephole(code *cstart,regm_t scratch)
{
// Look for cases of:
// MOV r1,r2
// OP ?,r1
// we can replace with:
// MOV r1,r2
// OP ?,r2
// to improve pairing
code *c1;
uint r1,r2;
uint mod,reg,rm;
//printf("peephole\n");
for (code *c = cstart; c; c = c1)
{
ubyte rmn;
//c.print();
c1 = cnext(c);
Ln:
if (!c1)
break;
if (c1.Iflags & (CFtarg | CFtarg2))
continue;
// Do:
// PUSH reg
if (I32 && (c.Iop & ~7) == 0x50)
{
uint regx = c.Iop & 7;
// MOV [ESP],regx => NOP
if (c1.Iop == 0x8B &&
c1.Irm == modregrm(0,regx,4) &&
c1.Isib == modregrm(0,4,SP))
{ c1.Iop = NOP;
continue;
}
// PUSH [ESP] => PUSH regx
if (c1.Iop == 0xFF &&
c1.Irm == modregrm(0,6,4) &&
c1.Isib == modregrm(0,4,SP))
{ c1.Iop = 0x50 + regx;
continue;
}
// CMP [ESP],imm => CMP regx,i,,
if (c1.Iop == 0x83 &&
c1.Irm == modregrm(0,7,4) &&
c1.Isib == modregrm(0,4,SP))
{ c1.Irm = modregrm(3,7,regx);
if (c1.IFL2 == FLconst && cast(byte)c1.IEV2.Vuns == 0)
{ // to TEST regx,regx
c1.Iop = (c1.Iop & 1) | 0x84;
c1.Irm = modregrm(3,regx,regx);
}
continue;
}
}
// Do:
// MOV reg,[ESP] => PUSH reg
// ADD ESP,4 => NOP
if (I32 && c.Iop == 0x8B && (c.Irm & 0xC7) == modregrm(0,0,4) &&
c.Isib == modregrm(0,4,SP) &&
c1.Iop == 0x83 && (c1.Irm & 0xC7) == modregrm(3,0,SP) &&
!(c1.Iflags & CFpsw) && c1.IFL2 == FLconst && c1.IEV2.Vint == 4)
{
uint regx = (c.Irm >> 3) & 7;
c.Iop = 0x58 + regx;
c1.Iop = NOP;
continue;
}
// Combine two SUBs of the same register
if (c.Iop == c1.Iop &&
c.Iop == 0x83 &&
(c.Irm & 0xC0) == 0xC0 &&
(c.Irm & modregrm(3,0,7)) == (c1.Irm & modregrm(3,0,7)) &&
!(c1.Iflags & CFpsw) &&
c.IFL2 == FLconst && c1.IFL2 == FLconst
)
{ int i = cast(byte)c.IEV2.Vint;
int i1 = cast(byte)c1.IEV2.Vint;
switch ((c.Irm & modregrm(0,7,0)) | ((c1.Irm & modregrm(0,7,0)) >> 3))
{
case (0 << 3) | 0: // ADD, ADD
case (5 << 3) | 5: // SUB, SUB
i += i1;
goto Laa;
case (0 << 3) | 5: // ADD, SUB
case (5 << 3) | 0: // SUB, ADD
i -= i1;
goto Laa;
Laa:
if (cast(byte)i != i)
c.Iop &= ~2;
c.IEV2.Vint = i;
c1.Iop = NOP;
if (i == 0)
c.Iop = NOP;
continue;
default:
break;
}
}
if (c.Iop == 0x8B && (c.Irm & 0xC0) == 0xC0) // MOV r1,r2
{ r1 = (c.Irm >> 3) & 7;
r2 = c.Irm & 7;
}
else if (c.Iop == 0x89 && (c.Irm & 0xC0) == 0xC0) // MOV r1,r2
{ r1 = c.Irm & 7;
r2 = (c.Irm >> 3) & 7;
}
else
{
continue;
}
rmn = c1.Irm;
mod = rmn & 0xC0;
reg = rmn & modregrm(0,7,0);
rm = rmn & 7;
if (cod3_EA(c1))
repEA(c1,r1,r2);
switch (c1.Iop)
{
case 0x50:
case 0x51:
case 0x52:
case 0x53:
case 0x54:
case 0x55:
case 0x56:
case 0x57: // PUSH reg
if ((c1.Iop & 7) == r1)
{ c1.Iop = 0x50 | r2;
//printf("schedule PUSH reg\n");
}
break;
case 0x81:
case 0x83:
// Look for CMP EA,imm
if (reg == modregrm(0,7,0))
{
if (mod == 0xC0 && rm == r1)
c1.Irm = cast(ubyte)(mod | reg | r2);
}
break;
case 0x84: // TEST reg,byte ptr EA
if (r1 >= 4 || r2 >= 4) // if not a byte register
break;
if ((rmn & 0xC0) == 0xC0)
{
if ((rmn & 3) == r1)
{ c1.Irm = rmn = cast(ubyte)((rmn & modregrm(3,7,4)) | r2);
//printf("schedule 1\n");
}
}
if ((rmn & modregrm(0,3,0)) == modregrm(0,r1,0))
{ c1.Irm = (rmn & modregrm(3,4,7)) | modregrm(0,r2,0);
//printf("schedule 2\n");
}
break;
case 0x85: // TEST reg,word ptr EA
if ((rmn & 0xC0) == 0xC0)
{
if ((rmn & 7) == r1)
{ c1.Irm = rmn = cast(ubyte)((rmn & modregrm(3,7,0)) | r2);
//printf("schedule 3\n");
}
}
if ((rmn & modregrm(0,7,0)) == modregrm(0,r1,0))
{ c1.Irm = (rmn & modregrm(3,0,7)) | modregrm(0,r2,0);
//printf("schedule 4\n");
}
break;
case 0x89: // MOV EA,reg
if ((rmn & modregrm(0,7,0)) == modregrm(0,r1,0))
{ c1.Irm = (rmn & modregrm(3,0,7)) | modregrm(0,r2,0);
//printf("schedule 5\n");
if (c1.Irm == modregrm(3,r2,r2))
goto Lnop;
}
break;
case 0x8B: // MOV reg,EA
if ((rmn & 0xC0) == 0xC0 &&
(rmn & 7) == r1) // if EA == r1
{ c1.Irm = cast(ubyte)((rmn & modregrm(3,7,0)) | r2);
//printf("schedule 6\n");
if (c1.Irm == modregrm(3,r2,r2))
goto Lnop;
}
break;
case 0x3C: // CMP AL,imm8
if (r1 == AX && r2 < 4)
{ c1.Iop = 0x80;
c1.Irm = modregrm(3,7,r2);
//printf("schedule 7, r2 = %d\n", r2);
}
break;
case 0x3D: // CMP AX,imm16
if (r1 == AX)
{ c1.Iop = 0x81;
c1.Irm = modregrm(3,7,r2);
if (c1.IFL2 == FLconst &&
c1.IEV2.Vuns == cast(byte)c1.IEV2.Vuns)
c1.Iop = 0x83;
//printf("schedule 8\n");
}
break;
default:
break;
}
continue;
Lnop:
c1.Iop = NOP;
c1 = cnext(c1);
goto Ln;
}
return cstart;
}
/*****************************************************************/
/**********************************************
* Replace complex instructions with simple ones more conducive
* to scheduling.
*/
@trusted
code *simpleops(code *c,regm_t scratch)
{ code *cstart;
uint reg;
code *c2;
// Worry about using registers not saved yet by prolog
scratch &= ~fregsaved;
if (!(scratch & (scratch - 1))) // if 0 or 1 registers
return c;
reg = findreg(scratch);
cstart = c;
for (code** pc = &cstart; *pc; pc = &(*pc).next)
{
c = *pc;
if (c.Iflags & (CFtarg | CFtarg2 | CFopsize))
continue;
if (c.Iop == 0x83 &&
(c.Irm & modregrm(0,7,0)) == modregrm(0,7,0) &&
(c.Irm & modregrm(3,0,0)) != modregrm(3,0,0)
)
{ // Replace CMP mem,imm with:
// MOV reg,mem
// CMP reg,imm
targ_long imm;
//printf("replacing CMP\n");
c.Iop = 0x8B;
c.Irm = (c.Irm & modregrm(3,0,7)) | modregrm(0,reg,0);
c2 = code_calloc();
if (reg == AX)
c2.Iop = 0x3D;
else
{ c2.Iop = 0x83;
c2.Irm = modregrm(3,7,reg);
}
c2.IFL2 = c.IFL2;
c2.IEV2 = c.IEV2;
// See if c2 should be replaced by a TEST
imm = c2.IEV2.Vuns;
if (!(c2.Iop & 1))
imm &= 0xFF;
else if (I32 ? c.Iflags & CFopsize : !(c.Iflags & CFopsize))
imm = cast(short) imm;
if (imm == 0)
{
c2.Iop = 0x85; // TEST reg,reg
c2.Irm = modregrm(3,reg,reg);
}
goto L1;
}
else if (c.Iop == 0xFF &&
(c.Irm & modregrm(0,7,0)) == modregrm(0,6,0) &&
(c.Irm & modregrm(3,0,0)) != modregrm(3,0,0)
)
{ // Replace PUSH mem with:
// MOV reg,mem
// PUSH reg
// printf("replacing PUSH\n");
c.Iop = 0x8B;
c.Irm = (c.Irm & modregrm(3,0,7)) | modregrm(0,reg,0);
c2 = gen1(null,0x50 + reg);
L1:
//c.print();
//c2.print();
c2.next = c.next;
c.next = c2;
// Switch to another reg
if (scratch & ~mask(reg))
reg = findreg(scratch & ~mask(reg));
}
}
return cstart;
}
}
| D |
/* Sample MinWin application: idle processing
*
* Written by Ben Hinkle and released to the public domain, as
* explained at http://creativecommons.org/licenses/publicdomain
* Report comments and bugs at dsource: http://www.dsource.org/projects/minwin
*/
module minwin.samples.idle;
import minwin.all;
import std.random;
import std.string;
import std.utf;
extern (C)
int MinWinMain(Application* app) {
Window win = new Window("Idle processing");
char[] text = "Idle processing...";
char[] cur = "";
win.quitOnDestroy = true;
win.paintDelegate ~= delegate void(Component source, GContext gc) {
auto Font font = new Font("",14,FontWeight.Bold);
Font oldfont = gc.setFont(font);
gc.drawText(100,100,text);
gc.setFont(oldfont);
};
win.keyDelegate ~= delegate void(Component source, KeyEvent* event) {
if (event.id == KeyPressedEvent) {
char[4] buf;
cur = toUTF8(buf,event.keyCode).dup;
}
};
app.idleTime = 1000; // every second
app.idleDelegate ~= delegate void() {
text = cur ~ " " ~ toString(rand());
win.repaint();
};
win.visible = true;
return app.enterEventLoop();
}
| D |
/Users/Thomas_Stuart/Desktop/FakeTumblr-master/Build/Intermediates/Pods.build/Debug-iphonesimulator/AlamofireImage.build/Objects-normal/x86_64/AFIError.o : /Users/Thomas_Stuart/Desktop/FakeTumblr-master/Pods/AlamofireImage/Source/Image.swift /Users/Thomas_Stuart/Desktop/FakeTumblr-master/Pods/AlamofireImage/Source/UIImage+AlamofireImage.swift /Users/Thomas_Stuart/Desktop/FakeTumblr-master/Pods/AlamofireImage/Source/UIButton+AlamofireImage.swift /Users/Thomas_Stuart/Desktop/FakeTumblr-master/Pods/AlamofireImage/Source/Request+AlamofireImage.swift /Users/Thomas_Stuart/Desktop/FakeTumblr-master/Pods/AlamofireImage/Source/UIImageView+AlamofireImage.swift /Users/Thomas_Stuart/Desktop/FakeTumblr-master/Pods/AlamofireImage/Source/ImageCache.swift /Users/Thomas_Stuart/Desktop/FakeTumblr-master/Pods/AlamofireImage/Source/ImageDownloader.swift /Users/Thomas_Stuart/Desktop/FakeTumblr-master/Pods/AlamofireImage/Source/ImageFilter.swift /Users/Thomas_Stuart/Desktop/FakeTumblr-master/Pods/AlamofireImage/Source/AFIError.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Users/Thomas_Stuart/Desktop/FakeTumblr-master/Build/Files/Debug-iphonesimulator/Alamofire/Alamofire.framework/Modules/Alamofire.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/Thomas_Stuart/Desktop/FakeTumblr-master/Pods/Target\ Support\ Files/AlamofireImage/AlamofireImage-umbrella.h /Users/Thomas_Stuart/Desktop/FakeTumblr-master/Pods/Target\ Support\ Files/Alamofire/Alamofire-umbrella.h /Users/Thomas_Stuart/Desktop/FakeTumblr-master/Build/Files/Debug-iphonesimulator/Alamofire/Alamofire.framework/Headers/Alamofire-Swift.h /Users/Thomas_Stuart/Desktop/FakeTumblr-master/Build/Intermediates/Pods.build/Debug-iphonesimulator/AlamofireImage.build/unextended-module.modulemap /Users/Thomas_Stuart/Desktop/FakeTumblr-master/Build/Intermediates/Pods.build/Debug-iphonesimulator/Alamofire.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/Thomas_Stuart/Desktop/FakeTumblr-master/Build/Intermediates/Pods.build/Debug-iphonesimulator/AlamofireImage.build/Objects-normal/x86_64/AFIError~partial.swiftmodule : /Users/Thomas_Stuart/Desktop/FakeTumblr-master/Pods/AlamofireImage/Source/Image.swift /Users/Thomas_Stuart/Desktop/FakeTumblr-master/Pods/AlamofireImage/Source/UIImage+AlamofireImage.swift /Users/Thomas_Stuart/Desktop/FakeTumblr-master/Pods/AlamofireImage/Source/UIButton+AlamofireImage.swift /Users/Thomas_Stuart/Desktop/FakeTumblr-master/Pods/AlamofireImage/Source/Request+AlamofireImage.swift /Users/Thomas_Stuart/Desktop/FakeTumblr-master/Pods/AlamofireImage/Source/UIImageView+AlamofireImage.swift /Users/Thomas_Stuart/Desktop/FakeTumblr-master/Pods/AlamofireImage/Source/ImageCache.swift /Users/Thomas_Stuart/Desktop/FakeTumblr-master/Pods/AlamofireImage/Source/ImageDownloader.swift /Users/Thomas_Stuart/Desktop/FakeTumblr-master/Pods/AlamofireImage/Source/ImageFilter.swift /Users/Thomas_Stuart/Desktop/FakeTumblr-master/Pods/AlamofireImage/Source/AFIError.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Users/Thomas_Stuart/Desktop/FakeTumblr-master/Build/Files/Debug-iphonesimulator/Alamofire/Alamofire.framework/Modules/Alamofire.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/Thomas_Stuart/Desktop/FakeTumblr-master/Pods/Target\ Support\ Files/AlamofireImage/AlamofireImage-umbrella.h /Users/Thomas_Stuart/Desktop/FakeTumblr-master/Pods/Target\ Support\ Files/Alamofire/Alamofire-umbrella.h /Users/Thomas_Stuart/Desktop/FakeTumblr-master/Build/Files/Debug-iphonesimulator/Alamofire/Alamofire.framework/Headers/Alamofire-Swift.h /Users/Thomas_Stuart/Desktop/FakeTumblr-master/Build/Intermediates/Pods.build/Debug-iphonesimulator/AlamofireImage.build/unextended-module.modulemap /Users/Thomas_Stuart/Desktop/FakeTumblr-master/Build/Intermediates/Pods.build/Debug-iphonesimulator/Alamofire.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/Thomas_Stuart/Desktop/FakeTumblr-master/Build/Intermediates/Pods.build/Debug-iphonesimulator/AlamofireImage.build/Objects-normal/x86_64/AFIError~partial.swiftdoc : /Users/Thomas_Stuart/Desktop/FakeTumblr-master/Pods/AlamofireImage/Source/Image.swift /Users/Thomas_Stuart/Desktop/FakeTumblr-master/Pods/AlamofireImage/Source/UIImage+AlamofireImage.swift /Users/Thomas_Stuart/Desktop/FakeTumblr-master/Pods/AlamofireImage/Source/UIButton+AlamofireImage.swift /Users/Thomas_Stuart/Desktop/FakeTumblr-master/Pods/AlamofireImage/Source/Request+AlamofireImage.swift /Users/Thomas_Stuart/Desktop/FakeTumblr-master/Pods/AlamofireImage/Source/UIImageView+AlamofireImage.swift /Users/Thomas_Stuart/Desktop/FakeTumblr-master/Pods/AlamofireImage/Source/ImageCache.swift /Users/Thomas_Stuart/Desktop/FakeTumblr-master/Pods/AlamofireImage/Source/ImageDownloader.swift /Users/Thomas_Stuart/Desktop/FakeTumblr-master/Pods/AlamofireImage/Source/ImageFilter.swift /Users/Thomas_Stuart/Desktop/FakeTumblr-master/Pods/AlamofireImage/Source/AFIError.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Users/Thomas_Stuart/Desktop/FakeTumblr-master/Build/Files/Debug-iphonesimulator/Alamofire/Alamofire.framework/Modules/Alamofire.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/QuartzCore.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Metal.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/Thomas_Stuart/Desktop/FakeTumblr-master/Pods/Target\ Support\ Files/AlamofireImage/AlamofireImage-umbrella.h /Users/Thomas_Stuart/Desktop/FakeTumblr-master/Pods/Target\ Support\ Files/Alamofire/Alamofire-umbrella.h /Users/Thomas_Stuart/Desktop/FakeTumblr-master/Build/Files/Debug-iphonesimulator/Alamofire/Alamofire.framework/Headers/Alamofire-Swift.h /Users/Thomas_Stuart/Desktop/FakeTumblr-master/Build/Intermediates/Pods.build/Debug-iphonesimulator/AlamofireImage.build/unextended-module.modulemap /Users/Thomas_Stuart/Desktop/FakeTumblr-master/Build/Intermediates/Pods.build/Debug-iphonesimulator/Alamofire.build/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
| D |
// Written in the D programming language.
/**
Utilities for manipulating files and scanning directories. Functions
in this module handle files as a unit, e.g., read or write one _file
at a time. For opening files and manipulating them via handles refer
to module $(LINK2 std_stdio.html,$(D std.stdio)).
Macros:
WIKI = Phobos/StdFile
Copyright: Copyright Digital Mars 2007 - 2011.
License: $(WEB boost.org/LICENSE_1_0.txt, Boost License 1.0).
Authors: $(WEB digitalmars.com, Walter Bright),
$(WEB erdani.org, Andrei Alexandrescu),
Jonathan M Davis
Source: $(PHOBOSSRC std/_file.d)
*/
module std.file;
import core.stdc.stdlib, core.stdc.string, core.stdc.errno;
import std.conv;
import std.datetime;
import std.exception;
import std.path;
import std.range.primitives;
import std.traits;
import std.typecons;
import std.typetuple;
import std.internal.cstring;
version (Windows)
{
import core.sys.windows.windows, std.windows.syserror;
}
else version (Posix)
{
import core.sys.posix.dirent, core.sys.posix.fcntl, core.sys.posix.sys.stat,
core.sys.posix.sys.time, core.sys.posix.unistd, core.sys.posix.utime;
}
else
static assert(false, "Module " ~ .stringof ~ " not implemented for this OS.");
// Character type used for operating system filesystem APIs
version (Windows)
{
private alias FSChar = wchar;
}
else version (Posix)
{
private alias FSChar = char;
}
else
static assert(0);
package @property string deleteme() @safe
{
import std.process : thisProcessID;
static _deleteme = "deleteme.dmd.unittest.pid";
static _first = true;
if(_first)
{
_deleteme = buildPath(tempDir(), _deleteme) ~ to!string(thisProcessID);
_first = false;
}
return _deleteme;
}
version(Android)
{
package enum system_directory = "/system/etc";
package enum system_file = "/system/etc/hosts";
}
else version(Posix)
{
package enum system_directory = "/usr/include";
package enum system_file = "/usr/include/assert.h";
}
// @@@@ TEMPORARY - THIS SHOULD BE IN THE CORE @@@
// {{{
version (Windows)
{
enum FILE_ATTRIBUTE_REPARSE_POINT = 0x400;
// Required by tempPath():
private extern(Windows) DWORD GetTempPathW(DWORD nBufferLength,
LPWSTR lpBuffer);
// Required by rename():
enum MOVEFILE_REPLACE_EXISTING = 1;
private extern(Windows) DWORD MoveFileExW(LPCWSTR lpExistingFileName,
LPCWSTR lpNewFileName,
DWORD dwFlags);
}
// }}}
/++
Exception thrown for file I/O errors.
+/
class FileException : Exception
{
/++
OS error code.
+/
immutable uint errno;
/++
Constructor which takes an error message.
Params:
name = Name of file for which the error occurred.
msg = Message describing the error.
file = The file where the error occurred.
line = The line where the error occurred.
+/
this(in char[] name, in char[] msg, string file = __FILE__, size_t line = __LINE__) @safe pure
{
if(msg.empty)
super(name.idup, file, line);
else
super(text(name, ": ", msg), file, line);
errno = 0;
}
/++
Constructor which takes the error number ($(LUCKY GetLastError)
in Windows, $(D_PARAM errno) in Posix).
Params:
name = Name of file for which the error occurred.
errno = The error number.
file = The file where the error occurred.
Defaults to $(D __FILE__).
line = The line where the error occurred.
Defaults to $(D __LINE__).
+/
version(Windows) this(in char[] name,
uint errno = .GetLastError(),
string file = __FILE__,
size_t line = __LINE__) @safe
{
this(name, sysErrorString(errno), file, line);
this.errno = errno;
}
else version(Posix) this(in char[] name,
uint errno = .errno,
string file = __FILE__,
size_t line = __LINE__) @trusted
{
auto s = strerror(errno);
this(name, to!string(s), file, line);
this.errno = errno;
}
}
private T cenforce(T)(T condition, lazy const(char)[] name, string file = __FILE__, size_t line = __LINE__)
{
if (condition)
return condition;
version (Windows)
{
throw new FileException(name, .GetLastError(), file, line);
}
else version (Posix)
{
throw new FileException(name, .errno, file, line);
}
}
version (Windows)
@trusted
private T cenforce(T)(T condition, const(char)[] name, const(FSChar)* namez, string file = __FILE__, size_t line = __LINE__)
{
if (condition)
return condition;
if (!name)
{
import core.stdc.wchar_ : wcslen;
import std.conv : to;
auto len = wcslen(namez);
name = to!string(namez[0 .. len]);
}
throw new FileException(name, .GetLastError(), file, line);
}
version (Posix)
@trusted
private T cenforce(T)(T condition, const(char)[] name, const(FSChar)* namez, string file = __FILE__, size_t line = __LINE__)
{
if (condition)
return condition;
if (!name)
{
import core.stdc.string : strlen;
auto len = strlen(namez);
name = namez[0 .. len].idup;
}
throw new FileException(name, .errno, file, line);
}
/* **********************************
* Basic File operations.
*/
/********************************************
Read entire contents of file $(D name) and returns it as an untyped
array. If the file size is larger than $(D upTo), only $(D upTo)
bytes are read.
Example:
----
import std.file, std.stdio;
void main()
{
auto bytes = cast(ubyte[]) read("filename", 5);
if (bytes.length == 5)
writefln("The fifth byte of the file is 0x%x", bytes[4]);
}
----
Params:
name = string or range of characters representing the file _name
upTo = if present, the maximum number of bytes to read
Returns: Untyped array of bytes _read.
Throws: $(LREF FileException) on error.
*/
void[] read(R)(R name, size_t upTo = size_t.max)
if (isInputRange!R && isSomeChar!(ElementEncodingType!R))
{
static if (isNarrowString!R && is(Unqual!(ElementEncodingType!R) == char))
return readImpl(name, name.tempCString!FSChar(), upTo);
else
return readImpl(null, name.tempCString!FSChar(), upTo);
}
version (Posix) private void[] readImpl(const(char)[] name, const(FSChar)* namez, size_t upTo = size_t.max) @trusted
{
import std.algorithm : min;
import std.array : uninitializedArray;
import core.memory : GC;
// A few internal configuration parameters {
enum size_t
minInitialAlloc = 1024 * 4,
maxInitialAlloc = size_t.max / 2,
sizeIncrement = 1024 * 16,
maxSlackMemoryAllowed = 1024;
// }
immutable fd = core.sys.posix.fcntl.open(namez,
core.sys.posix.fcntl.O_RDONLY);
cenforce(fd != -1, name);
scope(exit) core.sys.posix.unistd.close(fd);
stat_t statbuf = void;
cenforce(fstat(fd, &statbuf) == 0, name, namez);
immutable initialAlloc = to!size_t(statbuf.st_size
? min(statbuf.st_size + 1, maxInitialAlloc)
: minInitialAlloc);
void[] result = uninitializedArray!(ubyte[])(initialAlloc);
scope(failure) delete result;
size_t size = 0;
for (;;)
{
immutable actual = core.sys.posix.unistd.read(fd, result.ptr + size,
min(result.length, upTo) - size);
cenforce(actual != -1, name, namez);
if (actual == 0) break;
size += actual;
if (size < result.length) continue;
immutable newAlloc = size + sizeIncrement;
result = GC.realloc(result.ptr, newAlloc, GC.BlkAttr.NO_SCAN)[0 .. newAlloc];
}
return result.length - size >= maxSlackMemoryAllowed
? GC.realloc(result.ptr, size, GC.BlkAttr.NO_SCAN)[0 .. size]
: result[0 .. size];
}
version (Windows) private void[] readImpl(const(char)[] name, const(FSChar)* namez, size_t upTo = size_t.max) @safe
{
import std.algorithm : min;
import std.array : uninitializedArray;
static trustedCreateFileW(const(wchar)* namez, DWORD dwDesiredAccess, DWORD dwShareMode,
SECURITY_ATTRIBUTES *lpSecurityAttributes, DWORD dwCreationDisposition,
DWORD dwFlagsAndAttributes, HANDLE hTemplateFile) @trusted
{
return CreateFileW(namez, dwDesiredAccess, dwShareMode,
lpSecurityAttributes, dwCreationDisposition,
dwFlagsAndAttributes, hTemplateFile);
}
static trustedCloseHandle(HANDLE hObject) @trusted
{
return CloseHandle(hObject);
}
static trustedGetFileSize(HANDLE hFile, out ulong fileSize) @trusted
{
DWORD sizeHigh;
DWORD sizeLow = GetFileSize(hFile, &sizeHigh);
bool result = sizeLow != INVALID_FILE_SIZE;
if (result)
fileSize = makeUlong(sizeLow, sizeHigh);
return result;
}
static trustedReadFile(HANDLE hFile, void *lpBuffer, ulong nNumberOfBytesToRead) @trusted
{
// Read by chunks of size < 4GB (Windows API limit)
ulong totalNumRead = 0;
while (totalNumRead != nNumberOfBytesToRead)
{
uint chunkSize = min(nNumberOfBytesToRead - totalNumRead, 0xffff_0000);
DWORD numRead = void;
auto result = ReadFile(hFile, lpBuffer + totalNumRead, chunkSize, &numRead, null);
if (result == 0 || numRead != chunkSize)
return false;
totalNumRead += chunkSize;
}
return true;
}
alias defaults =
TypeTuple!(GENERIC_READ,
FILE_SHARE_READ | FILE_SHARE_WRITE, (SECURITY_ATTRIBUTES*).init,
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN,
HANDLE.init);
auto h = trustedCreateFileW(namez, defaults);
cenforce(h != INVALID_HANDLE_VALUE, name, namez);
scope(exit) cenforce(trustedCloseHandle(h), name, namez);
ulong fileSize = void;
cenforce(trustedGetFileSize(h, fileSize), name, namez);
size_t size = min(upTo, fileSize);
auto buf = uninitializedArray!(ubyte[])(size);
scope(failure) delete buf;
cenforce(trustedReadFile(h, buf.ptr, size), name, namez);
return buf[0 .. size];
}
@safe unittest
{
write(deleteme, "1234");
scope(exit) { assert(exists(deleteme)); remove(deleteme); }
assert(read(deleteme, 2) == "12");
import std.utf : byChar;
assert(read(deleteme.byChar) == "1234");
}
version (linux) @safe unittest
{
// A file with "zero" length that doesn't have 0 length at all
auto s = std.file.readText("/proc/sys/kernel/osrelease");
assert(s.length > 0);
//writefln("'%s'", s);
}
@safe unittest
{
scope(exit) if (exists(deleteme)) remove(deleteme);
import std.stdio;
auto f = File(deleteme, "w");
f.write("abcd"); f.flush();
assert(read(deleteme) == "abcd");
}
/********************************************
Read and validates (using $(XREF utf, validate)) a text file. $(D S)
can be a type of array of characters of any width and constancy. No
width conversion is performed; if the width of the characters in file
$(D name) is different from the width of elements of $(D S),
validation will fail.
Params:
name = string or range of characters representing the file _name
Returns: Array of characters read.
Throws: $(D FileException) on file error, $(D UTFException) on UTF
decoding error.
Example:
----
enforce(system("echo abc>deleteme") == 0);
scope(exit) remove("deleteme");
enforce(chomp(readText("deleteme")) == "abc");
----
*/
S readText(S = string, R)(R name)
if (isSomeString!S &&
(isInputRange!R && isSomeChar!(ElementEncodingType!R) || isSomeString!R))
{
import std.utf : validate;
static auto trustedCast(void[] buf) @trusted { return cast(S)buf; }
auto result = trustedCast(read(name));
validate(result);
return result;
}
@safe unittest
{
import std.string;
write(deleteme, "abc\n");
scope(exit) { assert(exists(deleteme)); remove(deleteme); }
enforce(chomp(readText(deleteme)) == "abc");
}
/*********************************************
Write $(D buffer) to file $(D name).
Params:
name = string or range of characters representing the file _name
buffer = data to be written to file
Throws: $(D FileException) on error.
Example:
----
import std.file;
void main()
{
int[] a = [ 0, 1, 1, 2, 3, 5, 8 ];
write("filename", a);
assert(cast(int[]) read("filename") == a);
}
----
*/
void write(R)(R name, const void[] buffer)
if (isInputRange!R && isSomeChar!(ElementEncodingType!R) || isSomeString!R)
{
static if (isNarrowString!R && is(Unqual!(ElementEncodingType!R) == char))
writeImpl(name, name.tempCString!FSChar(), buffer, false);
else
writeImpl(null, name.tempCString!FSChar(), buffer, false);
}
/*********************************************
Appends $(D buffer) to file $(D name).
Params:
name = string or range of characters representing the file _name
buffer = data to be appended to file
Throws: $(D FileException) on error.
Example:
----
import std.file;
void main()
{
int[] a = [ 0, 1, 1, 2, 3, 5, 8 ];
write("filename", a);
int[] b = [ 13, 21 ];
append("filename", b);
assert(cast(int[]) read("filename") == a ~ b);
}
----
*/
void append(R)(R name, const void[] buffer)
if (isInputRange!R && isSomeChar!(ElementEncodingType!R) || isSomeString!R)
{
static if (isNarrowString!R && is(Unqual!(ElementEncodingType!R) == char))
writeImpl(name, name.tempCString!FSChar(), buffer, true);
else
writeImpl(null, name.tempCString!FSChar(), buffer, true);
}
// Posix implementation helper for write and append
version(Posix) private void writeImpl(const(char)[] name, const(FSChar)* namez,
in void[] buffer, bool append) @trusted
{
// append or write
auto mode = append ? O_CREAT | O_WRONLY | O_APPEND
: O_CREAT | O_WRONLY | O_TRUNC;
immutable fd = core.sys.posix.fcntl.open(namez, mode, octal!666);
cenforce(fd != -1, name, namez);
{
scope(failure) core.sys.posix.unistd.close(fd);
immutable size = buffer.length;
cenforce(
core.sys.posix.unistd.write(fd, buffer.ptr, size) == size,
name, namez);
}
cenforce(core.sys.posix.unistd.close(fd) == 0, name, namez);
}
// Windows implementation helper for write and append
version(Windows) private void writeImpl(const(char)[] name, const(FSChar)* namez,
in void[] buffer, bool append) @trusted
{
if (append)
{
alias defaults =
TypeTuple!(GENERIC_WRITE, 0, null, OPEN_ALWAYS,
FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN,
HANDLE.init);
auto h = CreateFileW(namez, defaults);
cenforce(h != INVALID_HANDLE_VALUE, name, namez);
scope(exit) cenforce(CloseHandle(h), name, namez);
DWORD numwritten;
cenforce(SetFilePointer(h, 0, null, FILE_END) != INVALID_SET_FILE_POINTER
&& WriteFile(h,buffer.ptr,to!DWORD(buffer.length),&numwritten,null) != 0
&& buffer.length == numwritten,
name, namez);
}
else // write
{
alias defaults =
TypeTuple!(GENERIC_WRITE, 0, null, CREATE_ALWAYS,
FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN,
HANDLE.init);
auto h = CreateFileW(namez, defaults);
cenforce(h != INVALID_HANDLE_VALUE, name, namez);
scope(exit) cenforce(CloseHandle(h), name, namez);
DWORD numwritten;
cenforce(WriteFile(h, buffer.ptr, to!DWORD(buffer.length), &numwritten, null) != 0
&& buffer.length == numwritten,
name, namez);
}
}
/***************************************************
* Rename file $(D from) to $(D to).
* If the target file exists, it is overwritten.
* Params:
* from = string or range of characters representing the existing file name
* to = string or range of characters representing the target file name
* Throws: $(D FileException) on error.
*/
void rename(RF, RT)(RF from, RT to)
if ((isInputRange!RF && isSomeChar!(ElementEncodingType!RF) || isSomeString!RF) &&
(isInputRange!RT && isSomeChar!(ElementEncodingType!RT) || isSomeString!RT))
{
// Place outside of @trusted block
auto fromz = from.tempCString!FSChar();
auto toz = to.tempCString!FSChar();
static if (isNarrowString!RF && is(Unqual!(ElementEncodingType!RF) == char))
alias f = from;
else
enum string f = null;
static if (isNarrowString!RT && is(Unqual!(ElementEncodingType!RT) == char))
alias t = to;
else
enum string t = null;
renameImpl(f, t, fromz, toz);
}
private void renameImpl(const(char)[] f, const(char)[] t, const(FSChar)* fromz, const(FSChar)* toz) @trusted
{
version(Windows)
{
auto result = MoveFileExW(fromz, toz, MOVEFILE_REPLACE_EXISTING);
if (!result)
{
import core.stdc.wchar_ : wcslen;
import std.conv : to;
if (!f)
f = to!(typeof(f))(fromz[0 .. wcslen(fromz)]);
if (!t)
t = to!(typeof(t))(toz[0 .. wcslen(toz)]);
enforce(false,
new FileException(
text("Attempting to rename file ", f, " to ", t)));
}
}
else version(Posix)
{
import core.stdc.stdio;
cenforce(core.stdc.stdio.rename(fromz, toz) == 0, t, toz);
}
}
@safe unittest
{
import std.utf : byWchar;
auto t1 = deleteme, t2 = deleteme~"2";
scope(exit) foreach (t; [t1, t2]) if (t.exists) t.remove();
write(t1, "1");
rename(t1, t2);
assert(readText(t2) == "1");
write(t1, "2");
rename(t1, t2.byWchar);
assert(readText(t2) == "2");
}
/***************************************************
Delete file $(D name).
Params:
name = string or range of characters representing the file name
Throws: $(D FileException) on error.
*/
void remove(R)(R name)
if (isInputRange!R && isSomeChar!(ElementEncodingType!R))
{
static if (isNarrowString!R && is(Unqual!(ElementEncodingType!R) == char))
removeImpl(name, name.tempCString!FSChar());
else
removeImpl(null, name.tempCString!FSChar());
}
private void removeImpl(const(char)[] name, const(FSChar)* namez) @trusted
{
version(Windows)
{
cenforce(DeleteFileW(namez), name, namez);
}
else version(Posix)
{
import core.stdc.stdio;
if (!name)
{
import core.stdc.string : strlen;
auto len = strlen(namez);
name = namez[0 .. len];
}
cenforce(core.stdc.stdio.remove(namez) == 0,
"Failed to remove file " ~ name);
}
}
version(Windows) private WIN32_FILE_ATTRIBUTE_DATA getFileAttributesWin(R)(R name)
if (isInputRange!R && isSomeChar!(ElementEncodingType!R))
{
auto namez = name.tempCString!FSChar();
WIN32_FILE_ATTRIBUTE_DATA fad = void;
static if (isNarrowString!R && is(Unqual!(ElementEncodingType!R) == char))
{
static void getFA(const(char)[] name, const(FSChar)* namez, out WIN32_FILE_ATTRIBUTE_DATA fad) @trusted
{
enforce(GetFileAttributesExW(namez, GET_FILEEX_INFO_LEVELS.GetFileExInfoStandard, &fad),
new FileException(name.idup));
}
getFA(name, namez, fad);
}
else
{
static void getFA(const(FSChar)* namez, out WIN32_FILE_ATTRIBUTE_DATA fad) @trusted
{
import core.stdc.wchar_ : wcslen;
import std.conv : to;
enforce(GetFileAttributesExW(namez, GET_FILEEX_INFO_LEVELS.GetFileExInfoStandard, &fad),
new FileException(namez[0 .. wcslen(namez)].to!string));
}
getFA(namez, fad);
}
return fad;
}
version(Windows) private ulong makeUlong(DWORD dwLow, DWORD dwHigh) @safe pure nothrow @nogc
{
ULARGE_INTEGER li;
li.LowPart = dwLow;
li.HighPart = dwHigh;
return li.QuadPart;
}
/***************************************************
Get size of file $(D name) in bytes.
Params:
name = string or range of characters representing the file name
Throws: $(D FileException) on error (e.g., file not found).
*/
ulong getSize(R)(R name)
if (isInputRange!R && isSomeChar!(ElementEncodingType!R))
{
version(Windows)
{
with (getFileAttributesWin(name))
return makeUlong(nFileSizeLow, nFileSizeHigh);
}
else version(Posix)
{
auto namez = name.tempCString();
static trustedStat(const(FSChar)* namez, out stat_t buf) @trusted
{
return stat(namez, &buf);
}
static if (isNarrowString!R && is(Unqual!(ElementEncodingType!R) == char))
alias names = name;
else
string names = null;
stat_t statbuf = void;
cenforce(trustedStat(namez, statbuf) == 0, names, namez);
return statbuf.st_size;
}
}
@safe unittest
{
// create a file of size 1
write(deleteme, "a");
scope(exit) { assert(exists(deleteme)); remove(deleteme); }
assert(getSize(deleteme) == 1);
// create a file of size 3
write(deleteme, "abc");
import std.utf : byChar;
assert(getSize(deleteme.byChar) == 3);
}
/++
Get the access and modified times of file or folder $(D name).
Params:
name = File/Folder name to get times for.
accessTime = Time the file/folder was last accessed.
modificationTime = Time the file/folder was last modified.
Throws:
$(D FileException) on error.
+/
void getTimes(R)(R name,
out SysTime accessTime,
out SysTime modificationTime)
if (isInputRange!R && isSomeChar!(ElementEncodingType!R))
{
version(Windows)
{
with (getFileAttributesWin(name))
{
accessTime = FILETIMEToSysTime(&ftLastAccessTime);
modificationTime = FILETIMEToSysTime(&ftLastWriteTime);
}
}
else version(Posix)
{
auto namez = name.tempCString();
static auto trustedStat(const(FSChar)* namez, ref stat_t buf) @trusted
{
return stat(namez, &buf);
}
stat_t statbuf = void;
static if (isNarrowString!R && is(Unqual!(ElementEncodingType!R) == char))
alias names = name;
else
string names = null;
cenforce(trustedStat(namez, statbuf) == 0, names, namez);
accessTime = SysTime(unixTimeToStdTime(statbuf.st_atime));
modificationTime = SysTime(unixTimeToStdTime(statbuf.st_mtime));
}
}
unittest
{
import std.stdio : writefln;
auto currTime = Clock.currTime();
write(deleteme, "a");
scope(exit) { assert(exists(deleteme)); remove(deleteme); }
SysTime accessTime1 = void;
SysTime modificationTime1 = void;
getTimes(deleteme, accessTime1, modificationTime1);
enum leeway = dur!"seconds"(5);
{
auto diffa = accessTime1 - currTime;
auto diffm = modificationTime1 - currTime;
scope(failure) writefln("[%s] [%s] [%s] [%s] [%s]", accessTime1, modificationTime1, currTime, diffa, diffm);
assert(abs(diffa) <= leeway);
assert(abs(diffm) <= leeway);
}
version(fullFileTests)
{
import core.thread;
enum sleepTime = dur!"seconds"(2);
Thread.sleep(sleepTime);
currTime = Clock.currTime();
write(deleteme, "b");
SysTime accessTime2 = void;
SysTime modificationTime2 = void;
getTimes(deleteme, accessTime2, modificationTime2);
{
auto diffa = accessTime2 - currTime;
auto diffm = modificationTime2 - currTime;
scope(failure) writefln("[%s] [%s] [%s] [%s] [%s]", accessTime2, modificationTime2, currTime, diffa, diffm);
//There is no guarantee that the access time will be updated.
assert(abs(diffa) <= leeway + sleepTime);
assert(abs(diffm) <= leeway);
}
assert(accessTime1 <= accessTime2);
assert(modificationTime1 <= modificationTime2);
}
}
/++
$(BLUE This function is Windows-Only.)
Get creation/access/modified times of file $(D name).
This is the same as $(D getTimes) except that it also gives you the file
creation time - which isn't possible on Posix systems.
Params:
name = File name to get times for.
fileCreationTime = Time the file was created.
fileAccessTime = Time the file was last accessed.
fileModificationTime = Time the file was last modified.
Throws:
$(D FileException) on error.
+/
version(StdDdoc) void getTimesWin(R)(R name,
out SysTime fileCreationTime,
out SysTime fileAccessTime,
out SysTime fileModificationTime)
if (isInputRange!R && isSomeChar!(ElementEncodingType!R)) {}
else version(Windows) void getTimesWin(R)(R name,
out SysTime fileCreationTime,
out SysTime fileAccessTime,
out SysTime fileModificationTime)
if (isInputRange!R && isSomeChar!(ElementEncodingType!R))
{
with (getFileAttributesWin(name))
{
fileCreationTime = std.datetime.FILETIMEToSysTime(&ftCreationTime);
fileAccessTime = std.datetime.FILETIMEToSysTime(&ftLastAccessTime);
fileModificationTime = std.datetime.FILETIMEToSysTime(&ftLastWriteTime);
}
}
version(Windows) unittest
{
import std.stdio : writefln;
auto currTime = Clock.currTime();
write(deleteme, "a");
scope(exit) { assert(exists(deleteme)); remove(deleteme); }
SysTime creationTime1 = void;
SysTime accessTime1 = void;
SysTime modificationTime1 = void;
getTimesWin(deleteme, creationTime1, accessTime1, modificationTime1);
enum leeway = dur!"seconds"(5);
{
auto diffc = creationTime1 - currTime;
auto diffa = accessTime1 - currTime;
auto diffm = modificationTime1 - currTime;
scope(failure)
{
writefln("[%s] [%s] [%s] [%s] [%s] [%s] [%s]",
creationTime1, accessTime1, modificationTime1, currTime, diffc, diffa, diffm);
}
// Deleting and recreating a file doesn't seem to always reset the "file creation time"
//assert(abs(diffc) <= leeway);
assert(abs(diffa) <= leeway);
assert(abs(diffm) <= leeway);
}
version(fullFileTests)
{
import core.thread;
Thread.sleep(dur!"seconds"(2));
currTime = Clock.currTime();
write(deleteme, "b");
SysTime creationTime2 = void;
SysTime accessTime2 = void;
SysTime modificationTime2 = void;
getTimesWin(deleteme, creationTime2, accessTime2, modificationTime2);
{
auto diffa = accessTime2 - currTime;
auto diffm = modificationTime2 - currTime;
scope(failure)
{
writefln("[%s] [%s] [%s] [%s] [%s]",
accessTime2, modificationTime2, currTime, diffa, diffm);
}
assert(abs(diffa) <= leeway);
assert(abs(diffm) <= leeway);
}
assert(creationTime1 == creationTime2);
assert(accessTime1 <= accessTime2);
assert(modificationTime1 <= modificationTime2);
}
}
/++
Set access/modified times of file or folder $(D name).
Params:
name = File/Folder name to get times for.
accessTime = Time the file/folder was last accessed.
modificationTime = Time the file/folder was last modified.
Throws:
$(D FileException) on error.
+/
void setTimes(R)(R name,
SysTime accessTime,
SysTime modificationTime) @safe
if (isInputRange!R && isSomeChar!(ElementEncodingType!R))
{
version(Windows)
{
auto namez = name.tempCString!FSChar();
static auto trustedCreateFileW(const(FSChar)* namez, DWORD dwDesiredAccess, DWORD dwShareMode,
SECURITY_ATTRIBUTES *lpSecurityAttributes, DWORD dwCreationDisposition,
DWORD dwFlagsAndAttributes, HANDLE hTemplateFile) @trusted
{
return CreateFileW(namez, dwDesiredAccess, dwShareMode,
lpSecurityAttributes, dwCreationDisposition,
dwFlagsAndAttributes, hTemplateFile);
}
static auto trustedCloseHandle(HANDLE hObject) @trusted
{
return CloseHandle(hObject);
}
static auto trustedSetFileTime(HANDLE hFile, in FILETIME *lpCreationTime,
in ref FILETIME lpLastAccessTime, in ref FILETIME lpLastWriteTime) @trusted
{
return SetFileTime(hFile, lpCreationTime, &lpLastAccessTime, &lpLastWriteTime);
}
const ta = SysTimeToFILETIME(accessTime);
const tm = SysTimeToFILETIME(modificationTime);
alias defaults =
TypeTuple!(GENERIC_WRITE,
0,
null,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL |
FILE_ATTRIBUTE_DIRECTORY |
FILE_FLAG_BACKUP_SEMANTICS,
HANDLE.init);
auto h = trustedCreateFileW(namez, defaults);
static if (isNarrowString!R && is(Unqual!(ElementEncodingType!R) == char))
alias names = name;
else
string names = null;
cenforce(h != INVALID_HANDLE_VALUE, names, namez);
scope(exit)
cenforce(trustedCloseHandle(h), names, namez);
cenforce(trustedSetFileTime(h, null, ta, tm), names, namez);
}
else version(Posix)
{
auto namez = name.tempCString!FSChar();
static auto trustedUtimes(const(FSChar)* namez, const ref timeval[2] times) @trusted
{
return utimes(namez, times);
}
timeval[2] t = void;
t[0] = accessTime.toTimeVal();
t[1] = modificationTime.toTimeVal();
static if (isNarrowString!R && is(Unqual!(ElementEncodingType!R) == char))
alias names = name;
else
string names = null;
cenforce(trustedUtimes(namez, t) == 0, names, namez);
}
}
unittest
{
import std.stdio : File;
string newdir = deleteme ~ r".dir";
string dir = newdir ~ r"/a/b/c";
string file = dir ~ "/file";
if (!exists(dir)) mkdirRecurse(dir);
{ auto f = File(file, "w"); }
foreach (path; [file, dir]) // test file and dir
{
SysTime atime = SysTime(DateTime(2010, 10, 4, 0, 0, 30));
SysTime mtime = SysTime(DateTime(2011, 10, 4, 0, 0, 30));
setTimes(path, atime, mtime);
SysTime atime_res;
SysTime mtime_res;
getTimes(path, atime_res, mtime_res);
assert(atime == atime_res);
assert(mtime == mtime_res);
}
rmdirRecurse(newdir);
}
/++
Returns the time that the given file was last modified.
Throws:
$(D FileException) if the given file does not exist.
+/
SysTime timeLastModified(R)(R name)
if (isInputRange!R && isSomeChar!(ElementEncodingType!R))
{
version(Windows)
{
SysTime dummy;
SysTime ftm;
getTimesWin(name, dummy, dummy, ftm);
return ftm;
}
else version(Posix)
{
auto namez = name.tempCString!FSChar();
static auto trustedStat(const(FSChar)* namez, ref stat_t buf) @trusted
{
return stat(namez, &buf);
}
stat_t statbuf = void;
static if (isNarrowString!R && is(Unqual!(ElementEncodingType!R) == char))
alias names = name;
else
string names = null;
cenforce(trustedStat(namez, statbuf) == 0, names, namez);
return SysTime(unixTimeToStdTime(statbuf.st_mtime));
}
}
/++
Returns the time that the given file was last modified. If the
file does not exist, returns $(D returnIfMissing).
A frequent usage pattern occurs in build automation tools such as
$(WEB gnu.org/software/make, make) or $(WEB
en.wikipedia.org/wiki/Apache_Ant, ant). To check whether file $(D
target) must be rebuilt from file $(D source) (i.e., $(D target) is
older than $(D source) or does not exist), use the comparison
below. The code throws a $(D FileException) if $(D source) does not
exist (as it should). On the other hand, the $(D SysTime.min) default
makes a non-existing $(D target) seem infinitely old so the test
correctly prompts building it.
Params:
name = The name of the file to get the modification time for.
returnIfMissing = The time to return if the given file does not exist.
Examples:
--------------------
if(timeLastModified(source) >= timeLastModified(target, SysTime.min))
{
// must (re)build
}
else
{
// target is up-to-date
}
--------------------
+/
SysTime timeLastModified(R)(R name, SysTime returnIfMissing)
if (isInputRange!R && isSomeChar!(ElementEncodingType!R))
{
version(Windows)
{
if (!exists(name))
return returnIfMissing;
SysTime dummy;
SysTime ftm;
getTimesWin(name, dummy, dummy, ftm);
return ftm;
}
else version(Posix)
{
auto namez = name.tempCString!FSChar();
static auto trustedStat(const(FSChar)* namez, ref stat_t buf) @trusted
{
return stat(namez, &buf);
}
stat_t statbuf = void;
return trustedStat(namez, statbuf) != 0 ?
returnIfMissing :
SysTime(unixTimeToStdTime(statbuf.st_mtime));
}
}
unittest
{
//std.process.system("echo a > deleteme") == 0 || assert(false);
if(exists(deleteme))
remove(deleteme);
write(deleteme, "a\n");
scope(exit)
{
assert(exists(deleteme));
remove(deleteme);
}
// assert(lastModified("deleteme") >
// lastModified("this file does not exist", SysTime.min));
//assert(lastModified("deleteme") > lastModified(__FILE__));
}
/**
* Determine whether the given file (or directory) exists.
* Params:
* name = string or range of characters representing the file name
* Returns:
* true if it exists
*/
bool exists(R)(R name)
if (isInputRange!R && isSomeChar!(ElementEncodingType!R))
{
return existsImpl(name.tempCString!FSChar());
}
private bool existsImpl(const(FSChar)* namez) @trusted nothrow @nogc
{
version(Windows)
{
// http://msdn.microsoft.com/library/default.asp?url=/library/en-us/
// fileio/base/getfileattributes.asp
return GetFileAttributesW(namez) != 0xFFFFFFFF;
}
else version(Posix)
{
/*
The reason why we use stat (and not access) here is
the quirky behavior of access for SUID programs: if
we used access, a file may not appear to "exist",
despite that the program would be able to open it
just fine. The behavior in question is described as
follows in the access man page:
> The check is done using the calling process's real
> UID and GID, rather than the effective IDs as is
> done when actually attempting an operation (e.g.,
> open(2)) on the file. This allows set-user-ID
> programs to easily determine the invoking user's
> authority.
While various operating systems provide eaccess or
euidaccess functions, these are not part of POSIX -
so it's safer to use stat instead.
*/
stat_t statbuf = void;
return lstat(namez, &statbuf) == 0;
}
else
static assert(0);
}
@safe unittest
{
assert(exists("."));
assert(!exists("this file does not exist"));
write(deleteme, "a\n");
scope(exit) { assert(exists(deleteme)); remove(deleteme); }
assert(exists(deleteme));
}
/++
Returns the attributes of the given file.
Note that the file attributes on Windows and Posix systems are
completely different. On Windows, they're what is returned by $(WEB
msdn.microsoft.com/en-us/library/aa364944(v=vs.85).aspx,
GetFileAttributes), whereas on Posix systems, they're the $(LUCKY
st_mode) value which is part of the $(D stat struct) gotten by
calling the $(WEB en.wikipedia.org/wiki/Stat_%28Unix%29, $(D stat))
function.
On Posix systems, if the given file is a symbolic link, then
attributes are the attributes of the file pointed to by the symbolic
link.
Params:
name = The file to get the attributes of.
Throws: $(D FileException) on error.
+/
uint getAttributes(R)(R name)
if (isInputRange!R && isSomeChar!(ElementEncodingType!R))
{
version(Windows)
{
auto namez = name.tempCString!FSChar();
static auto trustedGetFileAttributesW(const(FSChar)* namez) @trusted
{
return GetFileAttributesW(namez);
}
immutable result = trustedGetFileAttributesW(namez);
static if (isNarrowString!R && is(Unqual!(ElementEncodingType!R) == char))
alias names = name;
else
string names = null;
cenforce(result != INVALID_FILE_ATTRIBUTES, names, namez);
return result;
}
else version(Posix)
{
auto namez = name.tempCString!FSChar();
static auto trustedStat(const(FSChar)* namez, ref stat_t buf) @trusted
{
return stat(namez, &buf);
}
stat_t statbuf = void;
static if (isNarrowString!R && is(Unqual!(ElementEncodingType!R) == char))
alias names = name;
else
string names = null;
cenforce(trustedStat(namez, statbuf) == 0, names, namez);
return statbuf.st_mode;
}
}
/++
If the given file is a symbolic link, then this returns the attributes of the
symbolic link itself rather than file that it points to. If the given file
is $(I not) a symbolic link, then this function returns the same result
as getAttributes.
On Windows, getLinkAttributes is identical to getAttributes. It exists on
Windows so that you don't have to special-case code for Windows when dealing
with symbolic links.
Params:
name = The file to get the symbolic link attributes of.
Returns:
the attributes
Throws:
$(D FileException) on error.
+/
uint getLinkAttributes(R)(R name)
if (isInputRange!R && isSomeChar!(ElementEncodingType!R))
{
version(Windows)
{
return getAttributes(name);
}
else version(Posix)
{
auto namez = name.tempCString!FSChar();
static auto trustedLstat(const(FSChar)* namez, ref stat_t buf) @trusted
{
return lstat(namez, &buf);
}
stat_t lstatbuf = void;
static if (isNarrowString!R && is(Unqual!(ElementEncodingType!R) == char))
alias names = name;
else
string names = null;
cenforce(trustedLstat(namez, lstatbuf) == 0, names, namez);
return lstatbuf.st_mode;
}
}
/++
Set the attributes of the given file.
Params:
name = the file name
attributes = the attributes to set the file to
Throws:
$(D FileException) if the given file does not exist.
+/
void setAttributes(R)(R name, uint attributes)
if (isInputRange!R && isSomeChar!(ElementEncodingType!R))
{
version (Windows)
{
auto namez = name.tempCString!FSChar();
static auto trustedSetFileAttributesW(const(FSChar)* namez, uint dwFileAttributes) @trusted
{
return SetFileAttributesW(namez, dwFileAttributes);
}
static if (isNarrowString!R && is(Unqual!(ElementEncodingType!R) == char))
alias names = name;
else
string names = null;
cenforce(trustedSetFileAttributesW(namez, attributes), names, namez);
}
else version (Posix)
{
auto namez = name.tempCString!FSChar();
static auto trustedChmod(const(FSChar)* namez, mode_t mode) @trusted
{
return chmod(namez, mode);
}
assert(attributes <= mode_t.max);
static if (isNarrowString!R && is(Unqual!(ElementEncodingType!R) == char))
alias names = name;
else
string names = null;
cenforce(!trustedChmod(namez, cast(mode_t)attributes), names, namez);
}
}
/++
Returns whether the given file is a directory.
Params:
name = The path to the file.
Throws:
$(D FileException) if the given file does not exist.
Examples:
--------------------
assert(!"/etc/fonts/fonts.conf".isDir);
assert("/usr/share/include".isDir);
--------------------
+/
@property bool isDir(in char[] name) @safe
{
version(Windows)
{
return (getAttributes(name) & FILE_ATTRIBUTE_DIRECTORY) != 0;
}
else version(Posix)
{
return (getAttributes(name) & S_IFMT) == S_IFDIR;
}
}
@safe unittest
{
version(Windows)
{
if("C:\\Program Files\\".exists)
assert("C:\\Program Files\\".isDir);
if("C:\\Windows\\system.ini".exists)
assert(!"C:\\Windows\\system.ini".isDir);
}
else version(Posix)
{
if(system_directory.exists)
assert(system_directory.isDir);
if(system_file.exists)
assert(!system_file.isDir);
}
}
/++
Returns whether the given file attributes are for a directory.
Params:
attributes = The file attributes.
Examples:
--------------------
assert(!attrIsDir(getAttributes("/etc/fonts/fonts.conf")));
assert(!attrIsDir(getLinkAttributes("/etc/fonts/fonts.conf")));
--------------------
+/
bool attrIsDir(uint attributes) @safe pure nothrow @nogc
{
version(Windows)
{
return (attributes & FILE_ATTRIBUTE_DIRECTORY) != 0;
}
else version(Posix)
{
return (attributes & S_IFMT) == S_IFDIR;
}
}
@safe unittest
{
version(Windows)
{
if("C:\\Program Files\\".exists)
{
assert(attrIsDir(getAttributes("C:\\Program Files\\")));
assert(attrIsDir(getLinkAttributes("C:\\Program Files\\")));
}
if("C:\\Windows\\system.ini".exists)
{
assert(!attrIsDir(getAttributes("C:\\Windows\\system.ini")));
assert(!attrIsDir(getLinkAttributes("C:\\Windows\\system.ini")));
}
}
else version(Posix)
{
if(system_directory.exists)
{
assert(attrIsDir(getAttributes(system_directory)));
assert(attrIsDir(getLinkAttributes(system_directory)));
}
if(system_file.exists)
{
assert(!attrIsDir(getAttributes(system_file)));
assert(!attrIsDir(getLinkAttributes(system_file)));
}
}
}
/++
Returns whether the given file (or directory) is a file.
On Windows, if a file is not a directory, then it's a file. So,
either $(D isFile) or $(D isDir) will return true for any given file.
On Posix systems, if $(D isFile) is $(D true), that indicates that the file
is a regular file (e.g. not a block not device). So, on Posix systems, it's
possible for both $(D isFile) and $(D isDir) to be $(D false) for a
particular file (in which case, it's a special file). You can use
$(D getAttributes) to get the attributes to figure out what type of special
it is, or you can use $(D DirEntry) to get at its $(D statBuf), which is the
result from $(D stat). In either case, see the man page for $(D stat) for
more information.
Params:
name = The path to the file.
Throws:
$(D FileException) if the given file does not exist.
Examples:
--------------------
assert("/etc/fonts/fonts.conf".isFile);
assert(!"/usr/share/include".isFile);
--------------------
+/
@property bool isFile(in char[] name) @safe
{
version(Windows)
return !name.isDir;
else version(Posix)
return (getAttributes(name) & S_IFMT) == S_IFREG;
}
@safe unittest
{
version(Windows)
{
if("C:\\Program Files\\".exists)
assert(!"C:\\Program Files\\".isFile);
if("C:\\Windows\\system.ini".exists)
assert("C:\\Windows\\system.ini".isFile);
}
else version(Posix)
{
if(system_directory.exists)
assert(!system_directory.isFile);
if(system_file.exists)
assert(system_file.isFile);
}
}
/++
Returns whether the given file attributes are for a file.
On Windows, if a file is not a directory, it's a file. So, either
$(D attrIsFile) or $(D attrIsDir) will return $(D true) for the
attributes of any given file.
On Posix systems, if $(D attrIsFile) is $(D true), that indicates that the
file is a regular file (e.g. not a block not device). So, on Posix systems,
it's possible for both $(D attrIsFile) and $(D attrIsDir) to be $(D false)
for a particular file (in which case, it's a special file). If a file is a
special file, you can use the attributes to check what type of special file
it is (see the man page for $(D stat) for more information).
Params:
attributes = The file attributes.
Examples:
--------------------
assert(attrIsFile(getAttributes("/etc/fonts/fonts.conf")));
assert(attrIsFile(getLinkAttributes("/etc/fonts/fonts.conf")));
--------------------
+/
bool attrIsFile(uint attributes) @safe pure nothrow @nogc
{
version(Windows)
{
return (attributes & FILE_ATTRIBUTE_DIRECTORY) == 0;
}
else version(Posix)
{
return (attributes & S_IFMT) == S_IFREG;
}
}
@safe unittest
{
version(Windows)
{
if("C:\\Program Files\\".exists)
{
assert(!attrIsFile(getAttributes("C:\\Program Files\\")));
assert(!attrIsFile(getLinkAttributes("C:\\Program Files\\")));
}
if("C:\\Windows\\system.ini".exists)
{
assert(attrIsFile(getAttributes("C:\\Windows\\system.ini")));
assert(attrIsFile(getLinkAttributes("C:\\Windows\\system.ini")));
}
}
else version(Posix)
{
if(system_directory.exists)
{
assert(!attrIsFile(getAttributes(system_directory)));
assert(!attrIsFile(getLinkAttributes(system_directory)));
}
if(system_file.exists)
{
assert(attrIsFile(getAttributes(system_file)));
assert(attrIsFile(getLinkAttributes(system_file)));
}
}
}
/++
Returns whether the given file is a symbolic link.
On Windows, returns $(D true) when the file is either a symbolic link or a
junction point.
Params:
name = The path to the file.
Throws:
$(D FileException) if the given file does not exist.
+/
@property bool isSymlink(in char[] name) @safe
{
version(Windows)
return (getAttributes(name) & FILE_ATTRIBUTE_REPARSE_POINT) != 0;
else version(Posix)
return (getLinkAttributes(name) & S_IFMT) == S_IFLNK;
}
unittest
{
version(Windows)
{
if("C:\\Program Files\\".exists)
assert(!"C:\\Program Files\\".isSymlink);
if("C:\\Users\\".exists && "C:\\Documents and Settings\\".exists)
assert("C:\\Documents and Settings\\".isSymlink);
enum fakeSymFile = "C:\\Windows\\system.ini";
if(fakeSymFile.exists)
{
assert(!fakeSymFile.isSymlink);
assert(!fakeSymFile.isSymlink);
assert(!attrIsSymlink(getAttributes(fakeSymFile)));
assert(!attrIsSymlink(getLinkAttributes(fakeSymFile)));
assert(attrIsFile(getAttributes(fakeSymFile)));
assert(attrIsFile(getLinkAttributes(fakeSymFile)));
assert(!attrIsDir(getAttributes(fakeSymFile)));
assert(!attrIsDir(getLinkAttributes(fakeSymFile)));
assert(getAttributes(fakeSymFile) == getLinkAttributes(fakeSymFile));
}
}
else version(Posix)
{
if(system_directory.exists)
{
assert(!system_directory.isSymlink);
immutable symfile = deleteme ~ "_slink\0";
scope(exit) if(symfile.exists) symfile.remove();
core.sys.posix.unistd.symlink(system_directory, symfile.ptr);
assert(symfile.isSymlink);
assert(!attrIsSymlink(getAttributes(symfile)));
assert(attrIsSymlink(getLinkAttributes(symfile)));
assert(attrIsDir(getAttributes(symfile)));
assert(!attrIsDir(getLinkAttributes(symfile)));
assert(!attrIsFile(getAttributes(symfile)));
assert(!attrIsFile(getLinkAttributes(symfile)));
}
if(system_file.exists)
{
assert(!system_file.isSymlink);
immutable symfile = deleteme ~ "_slink\0";
scope(exit) if(symfile.exists) symfile.remove();
core.sys.posix.unistd.symlink(system_file, symfile.ptr);
assert(symfile.isSymlink);
assert(!attrIsSymlink(getAttributes(symfile)));
assert(attrIsSymlink(getLinkAttributes(symfile)));
assert(!attrIsDir(getAttributes(symfile)));
assert(!attrIsDir(getLinkAttributes(symfile)));
assert(attrIsFile(getAttributes(symfile)));
assert(!attrIsFile(getLinkAttributes(symfile)));
}
}
static assert(__traits(compiles, () @safe { return "dummy".isSymlink; }));
}
/++
Returns whether the given file attributes are for a symbolic link.
On Windows, return $(D true) when the file is either a symbolic link or a
junction point.
Params:
attributes = The file attributes.
Examples:
--------------------
core.sys.posix.unistd.symlink("/etc/fonts/fonts.conf", "/tmp/alink");
assert(!getAttributes("/tmp/alink").isSymlink);
assert(getLinkAttributes("/tmp/alink").isSymlink);
--------------------
+/
bool attrIsSymlink(uint attributes) @safe pure nothrow @nogc
{
version(Windows)
return (attributes & FILE_ATTRIBUTE_REPARSE_POINT) != 0;
else version(Posix)
return (attributes & S_IFMT) == S_IFLNK;
}
/****************************************************
* Change directory to $(D pathname).
* Throws: $(D FileException) on error.
*/
void chdir(in char[] pathname) @safe
{
version(Windows)
{
static auto trustedSetCurrentDirectoryW(in char[] path) @trusted
{
return SetCurrentDirectoryW(path.tempCStringW());
}
cenforce(trustedSetCurrentDirectoryW(pathname), pathname);
}
else version(Posix)
{
static auto trustedChdir(in char[] path) @trusted
{
return core.sys.posix.unistd.chdir(path.tempCString());
}
cenforce(trustedChdir(pathname) == 0, pathname);
}
}
/****************************************************
Make directory $(D pathname).
Throws: $(D FileException) on Posix or $(D WindowsException) on Windows
if an error occured.
*/
void mkdir(in char[] pathname) @safe
{
version(Windows)
{
static auto trustedCreateDirectoryW(in char[] path) @trusted
{
return CreateDirectoryW(path.tempCStringW(), null);
}
wenforce(trustedCreateDirectoryW(pathname), pathname);
}
else version(Posix)
{
static auto trustedMkdir(in char[] path, mode_t mode) @trusted
{
return core.sys.posix.sys.stat.mkdir(path.tempCString(), mode);
}
cenforce(trustedMkdir(pathname, octal!777) == 0, pathname);
}
}
// Same as mkdir but ignores "already exists" errors.
// Returns: "true" if the directory was created,
// "false" if it already existed.
private bool ensureDirExists(in char[] pathname)
{
version(Windows)
{
if (CreateDirectoryW(pathname.tempCStringW(), null))
return true;
cenforce(GetLastError() == ERROR_ALREADY_EXISTS, pathname.idup);
}
else version(Posix)
{
if (core.sys.posix.sys.stat.mkdir(pathname.tempCString(), octal!777) == 0)
return true;
cenforce(errno == EEXIST || errno == EISDIR, pathname);
}
enforce(pathname.isDir, new FileException(pathname.idup));
return false;
}
/****************************************************
* Make directory and all parent directories as needed.
*
* Throws: $(D FileException) on error.
*/
void mkdirRecurse(in char[] pathname)
{
const left = dirName(pathname);
if (left.length != pathname.length && !exists(left))
{
mkdirRecurse(left);
}
if (!baseName(pathname).empty)
{
ensureDirExists(pathname);
}
}
unittest
{
{
immutable basepath = deleteme ~ "_dir";
scope(exit) rmdirRecurse(basepath);
auto path = buildPath(basepath, "a", "..", "b");
mkdirRecurse(path);
path = path.buildNormalizedPath;
assert(path.isDir);
path = buildPath(basepath, "c");
write(path, "");
assertThrown!FileException(mkdirRecurse(path));
path = buildPath(basepath, "d");
mkdirRecurse(path);
mkdirRecurse(path); // should not throw
}
version(Windows)
{
assertThrown!FileException(mkdirRecurse(`1:\foobar`));
}
// bug3570
{
immutable basepath = deleteme ~ "_dir";
version (Windows)
{
immutable path = basepath ~ "\\fake\\here\\";
}
else version (Posix)
{
immutable path = basepath ~ `/fake/here/`;
}
mkdirRecurse(path);
assert(basepath.exists && basepath.isDir);
scope(exit) rmdirRecurse(basepath);
assert(path.exists && path.isDir);
}
}
/****************************************************
Remove directory $(D pathname).
Throws: $(D FileException) on error.
*/
void rmdir(in char[] pathname)
{
version(Windows)
{
cenforce(RemoveDirectoryW(pathname.tempCStringW()),
pathname);
}
else version(Posix)
{
cenforce(core.sys.posix.unistd.rmdir(pathname.tempCString()) == 0,
pathname);
}
}
/++
$(BLUE This function is Posix-Only.)
Creates a symlink.
Params:
original = The file to link from.
link = The symlink to create.
Note:
Relative paths are relative to the current working directory,
not the files being linked to or from.
Throws:
$(D FileException) on error (which includes if the symlink already
exists).
+/
version(StdDdoc) void symlink(C1, C2)(const(C1)[] original, const(C2)[] link) @safe;
else version(Posix) void symlink(C1, C2)(const(C1)[] original, const(C2)[] link) @safe
{
static auto trustedSymlink(const(C1)[] path1, const(C2)[] path2) @trusted
{
return core.sys.posix.unistd.symlink(path1.tempCString(),
path2.tempCString());
}
cenforce(trustedSymlink(original, link) == 0, link);
}
version(Posix) @safe unittest
{
if(system_directory.exists)
{
immutable symfile = deleteme ~ "_slink\0";
scope(exit) if(symfile.exists) symfile.remove();
symlink(system_directory, symfile);
assert(symfile.exists);
assert(symfile.isSymlink);
assert(!attrIsSymlink(getAttributes(symfile)));
assert(attrIsSymlink(getLinkAttributes(symfile)));
assert(attrIsDir(getAttributes(symfile)));
assert(!attrIsDir(getLinkAttributes(symfile)));
assert(!attrIsFile(getAttributes(symfile)));
assert(!attrIsFile(getLinkAttributes(symfile)));
}
if(system_file.exists)
{
assert(!system_file.isSymlink);
immutable symfile = deleteme ~ "_slink\0";
scope(exit) if(symfile.exists) symfile.remove();
symlink(system_file, symfile);
assert(symfile.exists);
assert(symfile.isSymlink);
assert(!attrIsSymlink(getAttributes(symfile)));
assert(attrIsSymlink(getLinkAttributes(symfile)));
assert(!attrIsDir(getAttributes(symfile)));
assert(!attrIsDir(getLinkAttributes(symfile)));
assert(attrIsFile(getAttributes(symfile)));
assert(!attrIsFile(getLinkAttributes(symfile)));
}
}
/++
$(BLUE This function is Posix-Only.)
Returns the path to the file pointed to by a symlink. Note that the
path could be either relative or absolute depending on the symlink.
If the path is relative, it's relative to the symlink, not the current
working directory.
Throws:
$(D FileException) on error.
+/
version(StdDdoc) string readLink(C)(const(C)[] link) @safe;
else version(Posix) string readLink(C)(const(C)[] link) @safe
{
static auto trustedReadlink(const(C)[] path, char[] buf) @trusted
{
return core.sys.posix.unistd.readlink(path.tempCString(), buf.ptr, buf.length);
}
static auto trustedAssumeUnique(ref C[] array) @trusted
{
return assumeUnique(array);
}
enum bufferLen = 2048;
enum maxCodeUnits = 6;
char[bufferLen] buffer;
auto size = trustedReadlink(link, buffer);
cenforce(size != -1, link);
if(size <= bufferLen - maxCodeUnits)
return to!string(buffer[0 .. size]);
auto dynamicBuffer = new char[](bufferLen * 3 / 2);
foreach(i; 0 .. 10)
{
size = trustedReadlink(link, dynamicBuffer);
cenforce(size != -1, link);
if(size <= dynamicBuffer.length - maxCodeUnits)
{
dynamicBuffer.length = size;
return trustedAssumeUnique(dynamicBuffer);
}
dynamicBuffer.length = dynamicBuffer.length * 3 / 2;
}
throw new FileException(to!string(link), "Path is too long to read.");
}
version(Posix) @safe unittest
{
import std.string;
foreach(file; [system_directory, system_file])
{
if(file.exists)
{
immutable symfile = deleteme ~ "_slink\0";
scope(exit) if(symfile.exists) symfile.remove();
symlink(file, symfile);
assert(readLink(symfile) == file, format("Failed file: %s", file));
}
}
assertThrown!FileException(readLink("/doesnotexist"));
}
/****************************************************
* Get the current working directory.
* Throws: $(D FileException) on error.
*/
version(Windows) string getcwd()
{
import std.utf : toUTF8;
/* GetCurrentDirectory's return value:
1. function succeeds: the number of characters that are written to
the buffer, not including the terminating null character.
2. function fails: zero
3. the buffer (lpBuffer) is not large enough: the required size of
the buffer, in characters, including the null-terminating character.
*/
wchar[4096] buffW = void; //enough for most common case
immutable n = cenforce(GetCurrentDirectoryW(to!DWORD(buffW.length), buffW.ptr),
"getcwd");
// we can do it because toUTFX always produces a fresh string
if(n < buffW.length)
{
return toUTF8(buffW[0 .. n]);
}
else //staticBuff isn't enough
{
auto ptr = cast(wchar*) malloc(wchar.sizeof * n);
scope(exit) free(ptr);
immutable n2 = GetCurrentDirectoryW(n, ptr);
cenforce(n2 && n2 < n, "getcwd");
return toUTF8(ptr[0 .. n2]);
}
}
else version (Posix) string getcwd()
{
auto p = cenforce(core.sys.posix.unistd.getcwd(null, 0),
"cannot get cwd");
scope(exit) core.stdc.stdlib.free(p);
return p[0 .. core.stdc.string.strlen(p)].idup;
}
unittest
{
auto s = getcwd();
assert(s.length);
}
version (OSX)
private extern (C) int _NSGetExecutablePath(char* buf, uint* bufsize);
else version (FreeBSD)
private extern (C) int sysctl (const int* name, uint namelen, void* oldp,
size_t* oldlenp, const void* newp, size_t newlen);
/**
* Returns the full path of the current executable.
*
* Throws:
* $(XREF object, Exception)
*/
@trusted string thisExePath ()
{
version (OSX)
{
import core.sys.posix.stdlib : realpath;
uint size;
_NSGetExecutablePath(null, &size); // get the length of the path
auto buffer = new char[size];
_NSGetExecutablePath(buffer.ptr, &size);
auto absolutePath = realpath(buffer.ptr, null); // let the function allocate
scope (exit)
{
if (absolutePath)
free(absolutePath);
}
errnoEnforce(absolutePath);
return to!(string)(absolutePath);
}
else version (linux)
{
return readLink("/proc/self/exe");
}
else version (Windows)
{
wchar[MAX_PATH] buf;
wchar[] buffer = buf[];
while (true)
{
auto len = GetModuleFileNameW(null, buffer.ptr, cast(DWORD) buffer.length);
enforce(len, sysErrorString(GetLastError()));
if (len != buffer.length)
return to!(string)(buffer[0 .. len]);
buffer.length *= 2;
}
}
else version (FreeBSD)
{
enum
{
CTL_KERN = 1,
KERN_PROC = 14,
KERN_PROC_PATHNAME = 12
}
int[4] mib = [CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1];
size_t len;
auto result = sysctl(mib.ptr, mib.length, null, &len, null, 0); // get the length of the path
errnoEnforce(result == 0);
auto buffer = new char[len - 1];
result = sysctl(mib.ptr, mib.length, buffer.ptr, &len, null, 0);
errnoEnforce(result == 0);
return buffer.assumeUnique;
}
else version (Solaris)
{
import core.sys.posix.unistd : getpid;
import std.string : format;
// Only Solaris 10 and later
return readLink(format("/proc/%d/path/a.out", getpid()));
}
else
static assert(0, "thisExePath is not supported on this platform");
}
@safe unittest
{
auto path = thisExePath();
assert(path.exists);
assert(path.isAbsolute);
assert(path.isFile);
}
version(StdDdoc)
{
/++
Info on a file, similar to what you'd get from stat on a Posix system.
+/
struct DirEntry
{
/++
Constructs a DirEntry for the given file (or directory).
Params:
path = The file (or directory) to get a DirEntry for.
Throws:
$(D FileException) if the file does not exist.
+/
this(string path);
version (Windows)
{
private this(string path, in WIN32_FIND_DATAW *fd);
}
else version (Posix)
{
private this(string path, core.sys.posix.dirent.dirent* fd);
}
/++
Returns the path to the file represented by this $(D DirEntry).
Examples:
--------------------
auto de1 = DirEntry("/etc/fonts/fonts.conf");
assert(de1.name == "/etc/fonts/fonts.conf");
auto de2 = DirEntry("/usr/share/include");
assert(de2.name == "/usr/share/include");
--------------------
+/
@property string name() const;
/++
Returns whether the file represented by this $(D DirEntry) is a
directory.
Examples:
--------------------
auto de1 = DirEntry("/etc/fonts/fonts.conf");
assert(!de1.isDir);
auto de2 = DirEntry("/usr/share/include");
assert(de2.isDir);
--------------------
+/
@property bool isDir();
/++
Returns whether the file represented by this $(D DirEntry) is a file.
On Windows, if a file is not a directory, then it's a file. So,
either $(D isFile) or $(D isDir) will return $(D true).
On Posix systems, if $(D isFile) is $(D true), that indicates that
the file is a regular file (e.g. not a block not device). So, on
Posix systems, it's possible for both $(D isFile) and $(D isDir) to
be $(D false) for a particular file (in which case, it's a special
file). You can use $(D attributes) or $(D statBuf) to get more
information about a special file (see the stat man page for more
details).
Examples:
--------------------
auto de1 = DirEntry("/etc/fonts/fonts.conf");
assert(de1.isFile);
auto de2 = DirEntry("/usr/share/include");
assert(!de2.isFile);
--------------------
+/
@property bool isFile();
/++
Returns whether the file represented by this $(D DirEntry) is a
symbolic link.
On Windows, return $(D true) when the file is either a symbolic
link or a junction point.
+/
@property bool isSymlink();
/++
Returns the size of the the file represented by this $(D DirEntry)
in bytes.
+/
@property ulong size();
/++
$(BLUE This function is Windows-Only.)
Returns the creation time of the file represented by this
$(D DirEntry).
+/
@property SysTime timeCreated() const;
/++
Returns the time that the file represented by this $(D DirEntry) was
last accessed.
Note that many file systems do not update the access time for files
(generally for performance reasons), so there's a good chance that
$(D timeLastAccessed) will return the same value as
$(D timeLastModified).
+/
@property SysTime timeLastAccessed();
/++
Returns the time that the file represented by this $(D DirEntry) was
last modified.
+/
@property SysTime timeLastModified();
/++
Returns the attributes of the file represented by this $(D DirEntry).
Note that the file attributes on Windows and Posix systems are
completely different. On, Windows, they're what is returned by
$(D GetFileAttributes)
$(WEB msdn.microsoft.com/en-us/library/aa364944(v=vs.85).aspx, GetFileAttributes)
Whereas, an Posix systems, they're the $(D st_mode) value which is
part of the $(D stat) struct gotten by calling $(D stat).
On Posix systems, if the file represented by this $(D DirEntry) is a
symbolic link, then attributes are the attributes of the file
pointed to by the symbolic link.
+/
@property uint attributes();
/++
On Posix systems, if the file represented by this $(D DirEntry) is a
symbolic link, then $(D linkAttributes) are the attributes of the
symbolic link itself. Otherwise, $(D linkAttributes) is identical to
$(D attributes).
On Windows, $(D linkAttributes) is identical to $(D attributes). It
exists on Windows so that you don't have to special-case code for
Windows when dealing with symbolic links.
+/
@property uint linkAttributes();
version(Windows)
alias stat_t = void*;
/++
$(BLUE This function is Posix-Only.)
The $(D stat) struct gotten from calling $(D stat).
+/
@property stat_t statBuf();
}
}
else version(Windows)
{
struct DirEntry
{
import std.utf : toUTF8;
public:
alias name this;
this(string path)
{
if(!path.exists())
throw new FileException(path, "File does not exist");
_name = path;
with (getFileAttributesWin(path))
{
_size = makeUlong(nFileSizeLow, nFileSizeHigh);
_timeCreated = std.datetime.FILETIMEToSysTime(&ftCreationTime);
_timeLastAccessed = std.datetime.FILETIMEToSysTime(&ftLastAccessTime);
_timeLastModified = std.datetime.FILETIMEToSysTime(&ftLastWriteTime);
_attributes = dwFileAttributes;
}
}
private this(string path, in WIN32_FIND_DATAW *fd)
{
import core.stdc.wchar_ : wcslen;
size_t clength = wcslen(fd.cFileName.ptr);
_name = toUTF8(fd.cFileName[0 .. clength]);
_name = buildPath(path, toUTF8(fd.cFileName[0 .. clength]));
_size = (cast(ulong)fd.nFileSizeHigh << 32) | fd.nFileSizeLow;
_timeCreated = std.datetime.FILETIMEToSysTime(&fd.ftCreationTime);
_timeLastAccessed = std.datetime.FILETIMEToSysTime(&fd.ftLastAccessTime);
_timeLastModified = std.datetime.FILETIMEToSysTime(&fd.ftLastWriteTime);
_attributes = fd.dwFileAttributes;
}
@property string name() const pure nothrow
{
return _name;
}
@property bool isDir() const pure nothrow
{
return (attributes & FILE_ATTRIBUTE_DIRECTORY) != 0;
}
@property bool isFile() const pure nothrow
{
//Are there no options in Windows other than directory and file?
//If there are, then this probably isn't the best way to determine
//whether this DirEntry is a file or not.
return !isDir;
}
@property bool isSymlink() const pure nothrow
{
return (attributes & FILE_ATTRIBUTE_REPARSE_POINT) != 0;
}
@property ulong size() const pure nothrow
{
return _size;
}
@property SysTime timeCreated() const pure nothrow
{
return cast(SysTime)_timeCreated;
}
@property SysTime timeLastAccessed() const pure nothrow
{
return cast(SysTime)_timeLastAccessed;
}
@property SysTime timeLastModified() const pure nothrow
{
return cast(SysTime)_timeLastModified;
}
@property uint attributes() const pure nothrow
{
return _attributes;
}
@property uint linkAttributes() const pure nothrow
{
return _attributes;
}
private:
string _name; /// The file or directory represented by this DirEntry.
SysTime _timeCreated; /// The time when the file was created.
SysTime _timeLastAccessed; /// The time when the file was last accessed.
SysTime _timeLastModified; /// The time when the file was last modified.
ulong _size; /// The size of the file in bytes.
uint _attributes; /// The file attributes from WIN32_FIND_DATAW.
}
}
else version(Posix)
{
struct DirEntry
{
public:
alias name this;
this(string path)
{
if(!path.exists)
throw new FileException(path, "File does not exist");
_name = path;
_didLStat = false;
_didStat = false;
_dTypeSet = false;
}
private this(string path, core.sys.posix.dirent.dirent* fd)
{
immutable len = core.stdc.string.strlen(fd.d_name.ptr);
_name = buildPath(path, fd.d_name[0 .. len]);
_didLStat = false;
_didStat = false;
//fd_d_type doesn't work for all file systems,
//in which case the result is DT_UNKOWN. But we
//can determine the correct type from lstat, so
//we'll only set the dtype here if we could
//correctly determine it (not lstat in the case
//of DT_UNKNOWN in case we don't ever actually
//need the dtype, thus potentially avoiding the
//cost of calling lstat).
static if (__traits(compiles, fd.d_type != DT_UNKNOWN))
{
if(fd.d_type != DT_UNKNOWN)
{
_dType = fd.d_type;
_dTypeSet = true;
}
else
_dTypeSet = false;
}
else
{
// e.g. Solaris does not have the d_type member
_dTypeSet = false;
}
}
@property string name() const pure nothrow
{
return _name;
}
@property bool isDir()
{
_ensureStatOrLStatDone();
return (_statBuf.st_mode & S_IFMT) == S_IFDIR;
}
@property bool isFile()
{
_ensureStatOrLStatDone();
return (_statBuf.st_mode & S_IFMT) == S_IFREG;
}
@property bool isSymlink()
{
_ensureLStatDone();
return (_lstatMode & S_IFMT) == S_IFLNK;
}
@property ulong size()
{
_ensureStatDone();
return _statBuf.st_size;
}
@property SysTime timeStatusChanged()
{
_ensureStatDone();
return SysTime(unixTimeToStdTime(_statBuf.st_ctime));
}
@property SysTime timeLastAccessed()
{
_ensureStatDone();
return SysTime(unixTimeToStdTime(_statBuf.st_ctime));
}
@property SysTime timeLastModified()
{
_ensureStatDone();
return SysTime(unixTimeToStdTime(_statBuf.st_mtime));
}
@property uint attributes()
{
_ensureStatDone();
return _statBuf.st_mode;
}
@property uint linkAttributes()
{
_ensureLStatDone();
return _lstatMode;
}
@property stat_t statBuf()
{
_ensureStatDone();
return _statBuf;
}
private:
/++
This is to support lazy evaluation, because doing stat's is
expensive and not always needed.
+/
void _ensureStatDone() @safe
{
static auto trustedStat(in char[] path, stat_t* buf) @trusted
{
return stat(path.tempCString(), buf);
}
if(_didStat)
return;
enforce(trustedStat(_name, &_statBuf) == 0,
"Failed to stat file `" ~ _name ~ "'");
_didStat = true;
}
/++
This is to support lazy evaluation, because doing stat's is
expensive and not always needed.
Try both stat and lstat for isFile and isDir
to detect broken symlinks.
+/
void _ensureStatOrLStatDone()
{
if(_didStat)
return;
if( stat(_name.tempCString(), &_statBuf) != 0 )
{
_ensureLStatDone();
_statBuf = stat_t.init;
_statBuf.st_mode = S_IFLNK;
}
else
{
_didStat = true;
}
}
/++
This is to support lazy evaluation, because doing stat's is
expensive and not always needed.
+/
void _ensureLStatDone()
{
if(_didLStat)
return;
stat_t statbuf = void;
enforce(lstat(_name.tempCString(), &statbuf) == 0,
"Failed to stat file `" ~ _name ~ "'");
_lstatMode = statbuf.st_mode;
_dTypeSet = true;
_didLStat = true;
}
string _name; /// The file or directory represented by this DirEntry.
stat_t _statBuf = void; /// The result of stat().
uint _lstatMode; /// The stat mode from lstat().
ubyte _dType; /// The type of the file.
bool _didLStat = false; /// Whether lstat() has been called for this DirEntry.
bool _didStat = false; /// Whether stat() has been called for this DirEntry.
bool _dTypeSet = false; /// Whether the dType of the file has been set.
}
}
unittest
{
version(Windows)
{
if("C:\\Program Files\\".exists)
{
auto de = DirEntry("C:\\Program Files\\");
assert(!de.isFile);
assert(de.isDir);
assert(!de.isSymlink);
}
if("C:\\Users\\".exists && "C:\\Documents and Settings\\".exists)
{
auto de = DirEntry("C:\\Documents and Settings\\");
assert(de.isSymlink);
}
if("C:\\Windows\\system.ini".exists)
{
auto de = DirEntry("C:\\Windows\\system.ini");
assert(de.isFile);
assert(!de.isDir);
assert(!de.isSymlink);
}
}
else version(Posix)
{
if(system_directory.exists)
{
{
auto de = DirEntry(system_directory);
assert(!de.isFile);
assert(de.isDir);
assert(!de.isSymlink);
}
immutable symfile = deleteme ~ "_slink\0";
scope(exit) if(symfile.exists) symfile.remove();
core.sys.posix.unistd.symlink(system_directory, symfile.ptr);
{
auto de = DirEntry(symfile);
assert(!de.isFile);
assert(de.isDir);
assert(de.isSymlink);
}
symfile.remove();
core.sys.posix.unistd.symlink((deleteme ~ "_broken_symlink\0").ptr, symfile.ptr);
{
//Issue 8298
DirEntry de = DirEntry(symfile);
assert(!de.isFile);
assert(!de.isDir);
assert(de.isSymlink);
assertThrown(de.size);
assertThrown(de.timeStatusChanged);
assertThrown(de.timeLastAccessed);
assertThrown(de.timeLastModified);
assertThrown(de.attributes);
assertThrown(de.statBuf);
assert(symfile.exists);
symfile.remove();
}
}
if(system_file.exists)
{
auto de = DirEntry(system_file);
assert(de.isFile);
assert(!de.isDir);
assert(!de.isSymlink);
}
}
}
alias PreserveAttributes = Flag!"preserveAttributes";
version (StdDdoc)
{
/// Defaults to PreserveAttributes.yes on Windows, and the opposite on all other platforms.
PreserveAttributes preserveAttributesDefault;
}
else version(Windows)
{
enum preserveAttributesDefault = PreserveAttributes.yes;
}
else
{
enum preserveAttributesDefault = PreserveAttributes.no;
}
/***************************************************
Copy file $(D from) to file $(D to). File timestamps are preserved.
File attributes are preserved, if $(D preserve) equals $(D PreserveAttributes.yes).
On Windows only $(D PreserveAttributes.yes) (the default on Windows) is supported.
If the target file exists, it is overwritten.
Params:
from = string or range of characters representing the existing file name
to = string or range of characters representing the target file name
Throws: $(D FileException) on error.
*/
void copy(RF, RT)(RF from, RT to, PreserveAttributes preserve = preserveAttributesDefault)
if (isInputRange!RF && isSomeChar!(ElementEncodingType!RF) &&
isInputRange!RT && isSomeChar!(ElementEncodingType!RT))
{
// Place outside of @trusted block
auto fromz = from.tempCString!FSChar();
auto toz = to.tempCString!FSChar();
static if (isNarrowString!RF && is(Unqual!(ElementEncodingType!RF) == char))
alias f = from;
else
enum string f = null;
static if (isNarrowString!RT && is(Unqual!(ElementEncodingType!RT) == char))
alias t = to;
else
enum string t = null;
copyImpl(f, t, fromz, toz, preserve);
}
private void copyImpl(const(char)[] f, const(char)[] t, const(FSChar)* fromz, const(FSChar)* toz,
PreserveAttributes preserve) @trusted
{
version(Windows)
{
assert(preserve == Yes.preserve);
immutable result = CopyFileW(fromz, toz, false);
if (!result)
{
import core.stdc.wchar_ : wcslen;
import std.conv : to;
if (!t)
t = to!(typeof(t))(toz[0 .. wcslen(toz)]);
throw new FileException(t);
}
}
else version(Posix)
{
import core.stdc.stdio;
immutable fd = core.sys.posix.fcntl.open(fromz, O_RDONLY);
cenforce(fd != -1, f, fromz);
scope(exit) core.sys.posix.unistd.close(fd);
stat_t statbuf = void;
cenforce(fstat(fd, &statbuf) == 0, f, fromz);
//cenforce(core.sys.posix.sys.stat.fstat(fd, &statbuf) == 0, f, fromz);
immutable fdw = core.sys.posix.fcntl.open(toz,
O_CREAT | O_WRONLY | O_TRUNC, octal!666);
cenforce(fdw != -1, t, toz);
scope(failure) core.stdc.stdio.remove(toz);
{
scope(failure) core.sys.posix.unistd.close(fdw);
auto BUFSIZ = 4096u * 16;
auto buf = core.stdc.stdlib.malloc(BUFSIZ);
if (!buf)
{
BUFSIZ = 4096;
buf = core.stdc.stdlib.malloc(BUFSIZ);
if (!buf)
{
import core.exception : onOutOfMemoryError;
onOutOfMemoryError();
}
}
scope(exit) core.stdc.stdlib.free(buf);
for (auto size = statbuf.st_size; size; )
{
immutable toxfer = (size > BUFSIZ) ? BUFSIZ : cast(size_t) size;
cenforce(
core.sys.posix.unistd.read(fd, buf, toxfer) == toxfer
&& core.sys.posix.unistd.write(fdw, buf, toxfer) == toxfer,
f, fromz);
assert(size >= toxfer);
size -= toxfer;
}
if (preserve)
cenforce(fchmod(fdw, statbuf.st_mode) == 0, f, fromz);
}
cenforce(core.sys.posix.unistd.close(fdw) != -1, f, fromz);
utimbuf utim = void;
utim.actime = cast(time_t)statbuf.st_atime;
utim.modtime = cast(time_t)statbuf.st_mtime;
cenforce(utime(toz, &utim) != -1, f, fromz);
}
}
unittest
{
auto t1 = deleteme, t2 = deleteme~"2";
scope(exit) foreach (t; [t1, t2]) if (t.exists) t.remove();
write(t1, "1");
copy(t1, t2);
assert(readText(t2) == "1");
write(t1, "2");
copy(t1, t2);
assert(readText(t2) == "2");
import std.utf : byChar;
copy(t1.byChar, t2.byChar);
assert(readText(t2.byChar) == "2");
}
version(Posix) unittest //issue 11434
{
auto t1 = deleteme, t2 = deleteme~"2";
scope(exit) foreach (t; [t1, t2]) if (t.exists) t.remove();
write(t1, "1");
setAttributes(t1, octal!767);
copy(t1, t2, Yes.preserveAttributes);
assert(readText(t2) == "1");
assert(getAttributes(t2) == octal!100767);
}
/++
Remove directory and all of its content and subdirectories,
recursively.
Throws:
$(D FileException) if there is an error (including if the given
file is not a directory).
+/
void rmdirRecurse(in char[] pathname)
{
//No references to pathname will be kept after rmdirRecurse,
//so the cast is safe
rmdirRecurse(DirEntry(cast(string)pathname));
}
/++
Remove directory and all of its content and subdirectories,
recursively.
Throws:
$(D FileException) if there is an error (including if the given
file is not a directory).
+/
void rmdirRecurse(ref DirEntry de)
{
if(!de.isDir)
throw new FileException(de.name, "Not a directory");
if (de.isSymlink)
{
version (Windows)
rmdir(de.name);
else
remove(de.name);
}
else
{
// all children, recursively depth-first
foreach(DirEntry e; dirEntries(de.name, SpanMode.depth, false))
{
attrIsDir(e.linkAttributes) ? rmdir(e.name) : remove(e.name);
}
// the dir itself
rmdir(de.name);
}
}
///ditto
//Note, without this overload, passing an RValue DirEntry still works, but
//actually fully reconstructs a DirEntry inside the
//"rmdirRecurse(in char[] pathname)" implementation. That is needlessly
//expensive.
//A DirEntry is a bit big (72B), so keeping the "by ref" signature is desirable.
void rmdirRecurse(DirEntry de)
{
rmdirRecurse(de);
}
version(Windows) unittest
{
auto d = deleteme ~ r".dir\a\b\c\d\e\f\g";
mkdirRecurse(d);
rmdirRecurse(deleteme ~ ".dir");
enforce(!exists(deleteme ~ ".dir"));
}
version(Posix) unittest
{
collectException(rmdirRecurse(deleteme));
auto d = deleteme~"/a/b/c/d/e/f/g";
enforce(collectException(mkdir(d)));
mkdirRecurse(d);
core.sys.posix.unistd.symlink((deleteme~"/a/b/c\0").ptr,
(deleteme~"/link\0").ptr);
rmdirRecurse(deleteme~"/link");
enforce(exists(d));
rmdirRecurse(deleteme);
enforce(!exists(deleteme));
d = deleteme~"/a/b/c/d/e/f/g";
mkdirRecurse(d);
version(Android) string link_cmd = "ln -s ";
else string link_cmd = "ln -sf ";
std.process.executeShell(link_cmd~deleteme~"/a/b/c "~deleteme~"/link");
rmdirRecurse(deleteme);
enforce(!exists(deleteme));
}
unittest
{
void[] buf;
buf = new void[10];
(cast(byte[])buf)[] = 3;
string unit_file = deleteme ~ "-unittest_write.tmp";
if (exists(unit_file)) remove(unit_file);
write(unit_file, buf);
void[] buf2 = read(unit_file);
assert(buf == buf2);
string unit2_file = deleteme ~ "-unittest_write2.tmp";
copy(unit_file, unit2_file);
buf2 = read(unit2_file);
assert(buf == buf2);
remove(unit_file);
assert(!exists(unit_file));
remove(unit2_file);
assert(!exists(unit2_file));
}
/**
* Dictates directory spanning policy for $(D_PARAM dirEntries) (see below).
*/
enum SpanMode
{
/** Only spans one directory. */
shallow,
/** Spans the directory depth-first, i.e. the content of any
subdirectory is spanned before that subdirectory itself. Useful
e.g. when recursively deleting files. */
depth,
/** Spans the directory breadth-first, i.e. the content of any
subdirectory is spanned right after that subdirectory itself. */
breadth,
}
private struct DirIteratorImpl
{
import std.array : Appender, appender;
SpanMode _mode;
// Whether we should follow symlinked directories while iterating.
// It also indicates whether we should avoid functions which call
// stat (since we should only need lstat in this case and it would
// be more efficient to not call stat in addition to lstat).
bool _followSymlink;
DirEntry _cur;
Appender!(DirHandle[]) _stack;
Appender!(DirEntry[]) _stashed; //used in depth first mode
//stack helpers
void pushExtra(DirEntry de){ _stashed.put(de); }
//ditto
bool hasExtra(){ return !_stashed.data.empty; }
//ditto
DirEntry popExtra()
{
DirEntry de;
de = _stashed.data[$-1];
_stashed.shrinkTo(_stashed.data.length - 1);
return de;
}
version(Windows)
{
struct DirHandle
{
string dirpath;
HANDLE h;
}
bool stepIn(string directory)
{
auto search_pattern = chainPath(directory, "*.*");
WIN32_FIND_DATAW findinfo;
HANDLE h = FindFirstFileW(search_pattern.tempCString!FSChar(), &findinfo);
cenforce(h != INVALID_HANDLE_VALUE, directory);
_stack.put(DirHandle(directory, h));
return toNext(false, &findinfo);
}
bool next()
{
if(_stack.data.empty)
return false;
WIN32_FIND_DATAW findinfo;
return toNext(true, &findinfo);
}
bool toNext(bool fetch, WIN32_FIND_DATAW* findinfo)
{
import core.stdc.wchar_ : wcscmp;
if(fetch)
{
if(FindNextFileW(_stack.data[$-1].h, findinfo) == FALSE)
{
popDirStack();
return false;
}
}
while( wcscmp(findinfo.cFileName.ptr, ".") == 0
|| wcscmp(findinfo.cFileName.ptr, "..") == 0)
if(FindNextFileW(_stack.data[$-1].h, findinfo) == FALSE)
{
popDirStack();
return false;
}
_cur = DirEntry(_stack.data[$-1].dirpath, findinfo);
return true;
}
void popDirStack()
{
assert(!_stack.data.empty);
FindClose(_stack.data[$-1].h);
_stack.shrinkTo(_stack.data.length-1);
}
void releaseDirStack()
{
foreach( d; _stack.data)
FindClose(d.h);
}
bool mayStepIn()
{
return _followSymlink ? _cur.isDir : _cur.isDir && !_cur.isSymlink;
}
}
else version(Posix)
{
struct DirHandle
{
string dirpath;
DIR* h;
}
bool stepIn(string directory)
{
auto h = cenforce(opendir(directory.tempCString()), directory);
_stack.put(DirHandle(directory, h));
return next();
}
bool next()
{
if(_stack.data.empty)
return false;
for(dirent* fdata; (fdata = readdir(_stack.data[$-1].h)) != null; )
{
// Skip "." and ".."
if(core.stdc.string.strcmp(fdata.d_name.ptr, ".") &&
core.stdc.string.strcmp(fdata.d_name.ptr, "..") )
{
_cur = DirEntry(_stack.data[$-1].dirpath, fdata);
return true;
}
}
popDirStack();
return false;
}
void popDirStack()
{
assert(!_stack.data.empty);
closedir(_stack.data[$-1].h);
_stack.shrinkTo(_stack.data.length-1);
}
void releaseDirStack()
{
foreach( d; _stack.data)
closedir(d.h);
}
bool mayStepIn()
{
return _followSymlink ? _cur.isDir : attrIsDir(_cur.linkAttributes);
}
}
this(R)(R pathname, SpanMode mode, bool followSymlink)
if (isInputRange!R && isSomeChar!(ElementEncodingType!R))
{
_mode = mode;
_followSymlink = followSymlink;
_stack = appender(cast(DirHandle[])[]);
if (_mode == SpanMode.depth)
_stashed = appender(cast(DirEntry[])[]);
static if (isNarrowString!R && is(Unqual!(ElementEncodingType!R) == char))
alias pathnameStr = pathname;
else
{
import std.array;
string pathnameStr = pathname.array;
}
if (stepIn(pathnameStr))
{
if(_mode == SpanMode.depth)
while(mayStepIn())
{
auto thisDir = _cur;
if(stepIn(_cur.name))
{
pushExtra(thisDir);
}
else
break;
}
}
}
@property bool empty(){ return _stashed.data.empty && _stack.data.empty; }
@property DirEntry front(){ return _cur; }
void popFront()
{
switch(_mode)
{
case SpanMode.depth:
if(next())
{
while(mayStepIn())
{
auto thisDir = _cur;
if(stepIn(_cur.name))
{
pushExtra(thisDir);
}
else
break;
}
}
else if(hasExtra())
_cur = popExtra();
break;
case SpanMode.breadth:
if(mayStepIn())
{
if(!stepIn(_cur.name))
while(!empty && !next()){}
}
else
while(!empty && !next()){}
break;
default:
next();
}
}
~this()
{
releaseDirStack();
}
}
struct DirIterator
{
private:
RefCounted!(DirIteratorImpl, RefCountedAutoInitialize.no) impl;
this(string pathname, SpanMode mode, bool followSymlink)
{
impl = typeof(impl)(pathname, mode, followSymlink);
}
public:
@property bool empty(){ return impl.empty; }
@property DirEntry front(){ return impl.front; }
void popFront(){ impl.popFront(); }
}
/++
Returns an input range of DirEntry that lazily iterates a given directory,
also provides two ways of foreach iteration. The iteration variable can be of
type $(D_PARAM string) if only the name is needed, or $(D_PARAM DirEntry)
if additional details are needed. The span mode dictates the how the
directory is traversed. The name of the each directory entry iterated
contains the absolute path.
Params:
path = The directory to iterate over.
mode = Whether the directory's sub-directories should be iterated
over depth-first ($(D_PARAM depth)), breadth-first
($(D_PARAM breadth)), or not at all ($(D_PARAM shallow)).
followSymlink = Whether symbolic links which point to directories
should be treated as directories and their contents
iterated over.
Throws:
$(D FileException) if the directory does not exist.
Examples:
--------------------
// Iterate a directory in depth
foreach (string name; dirEntries("destroy/me", SpanMode.depth))
{
remove(name);
}
// Iterate a directory in breadth
foreach (string name; dirEntries(".", SpanMode.breadth))
{
writeln(name);
}
// Iterate a directory and get detailed info about it
foreach (DirEntry e; dirEntries("dmd-testing", SpanMode.breadth))
{
writeln(e.name, "\t", e.size);
}
// Iterate over all *.d files in current directory and all its subdirectories
auto dFiles = filter!`endsWith(a.name,".d")`(dirEntries(".",SpanMode.depth));
foreach(d; dFiles)
writeln(d.name);
// Hook it up with std.parallelism to compile them all in parallel:
foreach(d; parallel(dFiles, 1)) //passes by 1 file to each thread
{
string cmd = "dmd -c " ~ d.name;
writeln(cmd);
std.process.system(cmd);
}
--------------------
+/
auto dirEntries(string path, SpanMode mode, bool followSymlink = true)
{
return DirIterator(path, mode, followSymlink);
}
/// Duplicate functionality of D1's $(D std.file.listdir()):
unittest
{
string[] listdir(string pathname)
{
import std.file;
import std.path;
import std.algorithm;
import std.array;
return std.file.dirEntries(pathname, SpanMode.shallow)
.filter!(a => a.isFile)
.map!(a => std.path.baseName(a.name))
.array;
}
void main(string[] args)
{
import std.stdio;
string[] files = listdir(args[1]);
writefln("%s", files);
}
}
unittest
{
import std.algorithm;
import std.range;
import std.process;
version(Android)
string testdir = deleteme; // This has to be an absolute path when
// called from a shared library on Android,
// ie an apk
else
string testdir = "deleteme.dmd.unittest.std.file" ~ to!string(thisProcessID); // needs to be relative
mkdirRecurse(buildPath(testdir, "somedir"));
scope(exit) rmdirRecurse(testdir);
write(buildPath(testdir, "somefile"), null);
write(buildPath(testdir, "somedir", "somedeepfile"), null);
// testing range interface
size_t equalEntries(string relpath, SpanMode mode)
{
auto len = enforce(walkLength(dirEntries(absolutePath(relpath), mode)));
assert(walkLength(dirEntries(relpath, mode)) == len);
assert(equal(
map!(a => std.path.absolutePath(a.name))(dirEntries(relpath, mode)),
map!(a => a.name)(dirEntries(absolutePath(relpath), mode))));
return len;
}
assert(equalEntries(testdir, SpanMode.shallow) == 2);
assert(equalEntries(testdir, SpanMode.depth) == 3);
assert(equalEntries(testdir, SpanMode.breadth) == 3);
// testing opApply
foreach (string name; dirEntries(testdir, SpanMode.breadth))
{
//writeln(name);
assert(name.startsWith(testdir));
}
foreach (DirEntry e; dirEntries(absolutePath(testdir), SpanMode.breadth))
{
//writeln(name);
assert(e.isFile || e.isDir, e.name);
}
//issue 7264
foreach (string name; dirEntries(testdir, "*.d", SpanMode.breadth))
{
}
foreach (entry; dirEntries(testdir, SpanMode.breadth))
{
static assert(is(typeof(entry) == DirEntry));
}
//issue 7138
auto a = array(dirEntries(testdir, SpanMode.shallow));
// issue 11392
auto dFiles = dirEntries(testdir, SpanMode.shallow);
foreach(d; dFiles){}
}
/++
Convenience wrapper for filtering file names with a glob pattern.
Params:
path = The directory to iterate over.
pattern = String with wildcards, such as $(RED "*.d"). The supported
wildcard strings are described under
$(XREF _path, globMatch).
mode = Whether the directory's sub-directories should be iterated
over depth-first ($(D_PARAM depth)), breadth-first
($(D_PARAM breadth)), or not at all ($(D_PARAM shallow)).
followSymlink = Whether symbolic links which point to directories
should be treated as directories and their contents
iterated over.
Throws:
$(D FileException) if the directory does not exist.
Examples:
--------------------
// Iterate over all D source files in current directory and all its
// subdirectories
auto dFiles = dirEntries(".","*.{d,di}",SpanMode.depth);
foreach(d; dFiles)
writeln(d.name);
--------------------
+/
auto dirEntries(string path, string pattern, SpanMode mode,
bool followSymlink = true)
{
import std.algorithm : filter;
bool f(DirEntry de) { return globMatch(baseName(de.name), pattern); }
return filter!f(DirIterator(path, mode, followSymlink));
}
// Explicitly undocumented. It will be removed in July 2015.
deprecated("Please use DirEntry constructor directly instead.")
DirEntry dirEntry(in char[] name)
{
return DirEntry(name.idup);
}
unittest
{
import std.stdio : writefln;
immutable dpath = deleteme ~ "_dir";
immutable fpath = deleteme ~ "_file";
immutable sdpath = deleteme ~ "_sdir";
immutable sfpath = deleteme ~ "_sfile";
scope(exit)
{
if (dpath.exists) rmdirRecurse(dpath);
if (fpath.exists) remove(fpath);
if (sdpath.exists) remove(sdpath);
if (sfpath.exists) remove(sfpath);
}
mkdir(dpath);
write(fpath, "hello world");
version (Posix)
{
core.sys.posix.unistd.symlink((dpath ~ '\0').ptr, (sdpath ~ '\0').ptr);
core.sys.posix.unistd.symlink((fpath ~ '\0').ptr, (sfpath ~ '\0').ptr);
}
static struct Flags { bool dir, file, link; }
auto tests = [dpath : Flags(true), fpath : Flags(false, true)];
version (Posix)
{
tests[sdpath] = Flags(true, false, true);
tests[sfpath] = Flags(false, true, true);
}
auto past = Clock.currTime() - 2.seconds;
auto future = past + 4.seconds;
foreach (path, flags; tests)
{
auto de = DirEntry(path);
assert(de.name == path);
assert(de.isDir == flags.dir);
assert(de.isFile == flags.file);
assert(de.isSymlink == flags.link);
assert(de.isDir == path.isDir);
assert(de.isFile == path.isFile);
assert(de.isSymlink == path.isSymlink);
assert(de.size == path.getSize());
assert(de.attributes == getAttributes(path));
assert(de.linkAttributes == getLinkAttributes(path));
scope(failure) writefln("[%s] [%s] [%s] [%s]", past, de.timeLastAccessed, de.timeLastModified, future);
assert(de.timeLastAccessed > past);
assert(de.timeLastAccessed < future);
assert(de.timeLastModified > past);
assert(de.timeLastModified < future);
assert(attrIsDir(de.attributes) == flags.dir);
assert(attrIsDir(de.linkAttributes) == (flags.dir && !flags.link));
assert(attrIsFile(de.attributes) == flags.file);
assert(attrIsFile(de.linkAttributes) == (flags.file && !flags.link));
assert(!attrIsSymlink(de.attributes));
assert(attrIsSymlink(de.linkAttributes) == flags.link);
version(Windows)
{
assert(de.timeCreated > past);
assert(de.timeCreated < future);
}
else version(Posix)
{
assert(de.timeStatusChanged > past);
assert(de.timeStatusChanged < future);
assert(de.attributes == de.statBuf.st_mode);
}
}
}
/**
Reads an entire file into an array.
Example:
----
// Load file; each line is an int followed by comma, whitespace and a
// double.
auto a = slurp!(int, double)("filename", "%s, %s");
----
Bugs:
$(D slurp) expects file names to be encoded in $(B CP_ACP) on $(I Windows)
instead of UTF-8 (as it internally uses $(XREF stdio, File),
see $(BUGZILLA 7648)) thus must not be used in $(I Windows)
or cross-platform applications other than with an immediate ASCII string as
a file name to prevent accidental changes to result in incorrect behavior.
*/
Select!(Types.length == 1, Types[0][], Tuple!(Types)[])
slurp(Types...)(string filename, in char[] format)
{
import std.stdio : File;
import std.format : formattedRead;
import std.array : appender;
typeof(return) result;
auto app = appender!(typeof(return))();
ElementType!(typeof(return)) toAdd;
auto f = File(filename);
scope(exit) f.close();
foreach (line; f.byLine())
{
formattedRead(line, format, &toAdd);
enforce(line.empty,
text("Trailing characters at the end of line: `", line,
"'"));
app.put(toAdd);
}
return app.data;
}
unittest
{
// Tuple!(int, double)[] x;
// auto app = appender(&x);
write(deleteme, "12 12.25\n345 1.125");
scope(exit) { assert(exists(deleteme)); remove(deleteme); }
auto a = slurp!(int, double)(deleteme, "%s %s");
assert(a.length == 2);
assert(a[0] == tuple(12, 12.25));
assert(a[1] == tuple(345, 1.125));
}
/**
Returns the path to a directory for temporary files.
On Windows, this function returns the result of calling the Windows API function
$(LINK2 http://msdn.microsoft.com/en-us/library/windows/desktop/aa364992.aspx, $(D GetTempPath)).
On POSIX platforms, it searches through the following list of directories
and returns the first one which is found to exist:
$(OL
$(LI The directory given by the $(D TMPDIR) environment variable.)
$(LI The directory given by the $(D TEMP) environment variable.)
$(LI The directory given by the $(D TMP) environment variable.)
$(LI $(D /tmp))
$(LI $(D /var/tmp))
$(LI $(D /usr/tmp))
)
On all platforms, $(D tempDir) returns $(D ".") on failure, representing
the current working directory.
The return value of the function is cached, so the procedures described
above will only be performed the first time the function is called. All
subsequent runs will return the same string, regardless of whether
environment variables and directory structures have changed in the
meantime.
The POSIX $(D tempDir) algorithm is inspired by Python's
$(LINK2 http://docs.python.org/library/tempfile.html#tempfile.tempdir, $(D tempfile.tempdir)).
*/
string tempDir() @trusted
{
static string cache;
if (cache is null)
{
version(Windows)
{
import std.utf : toUTF8;
// http://msdn.microsoft.com/en-us/library/windows/desktop/aa364992(v=vs.85).aspx
wchar[MAX_PATH + 2] buf;
DWORD len = GetTempPathW(buf.length, buf.ptr);
if (len) cache = toUTF8(buf[0 .. len]);
}
else version(Posix)
{
import std.process : environment;
// This function looks through the list of alternative directories
// and returns the first one which exists and is a directory.
static string findExistingDir(T...)(lazy T alternatives)
{
foreach (dir; alternatives)
if (!dir.empty && exists(dir)) return dir;
return null;
}
cache = findExistingDir(environment.get("TMPDIR"),
environment.get("TEMP"),
environment.get("TMP"),
"/tmp",
"/var/tmp",
"/usr/tmp");
}
else static assert (false, "Unsupported platform");
if (cache is null) cache = getcwd();
}
return cache;
}
| D |
a woman murderer
| D |
/*******************************************************************************
* Copyright (c) 2000, 2008 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
* Port to the D programming language:
* Frank Benoit <benoit@tionex.de>
*******************************************************************************/
module dwt.custom.ScrolledCompositeLayout;
import dwt.dwthelper.utils;
import dwt.DWT;
import dwt.custom.ScrolledComposite;
import dwt.graphics.Point;
import dwt.graphics.Rectangle;
import dwt.widgets.Composite;
import dwt.widgets.Control;
import dwt.widgets.Layout;
import dwt.widgets.ScrollBar;
import Math = tango.math.Math;
/**
* This class provides the layout for ScrolledComposite
*
* @see ScrolledComposite
*/
class ScrolledCompositeLayout : Layout {
bool inLayout = false;
static final int DEFAULT_WIDTH = 64;
static final int DEFAULT_HEIGHT = 64;
protected override Point computeSize(Composite composite, int wHint, int hHint, bool flushCache) {
ScrolledComposite sc = cast(ScrolledComposite)composite;
Point size = new Point(DEFAULT_WIDTH, DEFAULT_HEIGHT);
if (sc.content !is null) {
Point preferredSize = sc.content.computeSize(wHint, hHint, flushCache);
Point currentSize = sc.content.getSize();
size.x = sc.getExpandHorizontal() ? preferredSize.x : currentSize.x;
size.y = sc.getExpandVertical() ? preferredSize.y : currentSize.y;
}
size.x = Math.max(size.x, sc.minWidth);
size.y = Math.max(size.y, sc.minHeight);
if (wHint !is DWT.DEFAULT) size.x = wHint;
if (hHint !is DWT.DEFAULT) size.y = hHint;
return size;
}
protected override bool flushCache(Control control) {
return true;
}
protected override void layout(Composite composite, bool flushCache) {
if (inLayout) return;
ScrolledComposite sc = cast(ScrolledComposite)composite;
if (sc.content is null) return;
ScrollBar hBar = sc.getHorizontalBar();
ScrollBar vBar = sc.getVerticalBar();
if (hBar !is null) {
if (hBar.getSize().y >= sc.getSize().y) {
return;
}
}
if (vBar !is null) {
if (vBar.getSize().x >= sc.getSize().x) {
return;
}
}
inLayout = true;
Rectangle contentRect = sc.content.getBounds();
if (!sc.alwaysShowScroll) {
bool hVisible = sc.needHScroll(contentRect, false);
bool vVisible = sc.needVScroll(contentRect, hVisible);
if (!hVisible && vVisible) hVisible = sc.needHScroll(contentRect, vVisible);
if (hBar !is null) hBar.setVisible(hVisible);
if (vBar !is null) vBar.setVisible(vVisible);
}
Rectangle hostRect = sc.getClientArea();
if (sc.expandHorizontal) {
contentRect.width = Math.max(sc.minWidth, hostRect.width);
}
if (sc.expandVertical) {
contentRect.height = Math.max(sc.minHeight, hostRect.height);
}
if (hBar !is null) {
hBar.setMaximum (contentRect.width);
hBar.setThumb (Math.min (contentRect.width, hostRect.width));
int hPage = contentRect.width - hostRect.width;
int hSelection = hBar.getSelection ();
if (hSelection >= hPage) {
if (hPage <= 0) {
hSelection = 0;
hBar.setSelection(0);
}
contentRect.x = -hSelection;
}
}
if (vBar !is null) {
vBar.setMaximum (contentRect.height);
vBar.setThumb (Math.min (contentRect.height, hostRect.height));
int vPage = contentRect.height - hostRect.height;
int vSelection = vBar.getSelection ();
if (vSelection >= vPage) {
if (vPage <= 0) {
vSelection = 0;
vBar.setSelection(0);
}
contentRect.y = -vSelection;
}
}
sc.content.setBounds (contentRect);
inLayout = false;
}
}
| D |
module voxelman.worldinteraction.plugininfo;
enum id = "voxelman.worldinteraction";
enum semver = "0.5.0";
enum deps = [];
enum clientdeps = [];
enum serverdeps = [];
shared static this()
{
import pluginlib;
import voxelman.worldinteraction.plugin;
pluginRegistry.regClientPlugin(new WorldInteractionPlugin);
}
| D |
module material;
import wall;
import entity;
import shot;
import drop;
import agent;
import validatable;
import ground;
/++
Extendible class which allows for modifiable responses to collisions and events
++/
abstract class Material : Validatable {
Agent agent;
this(){ super(); }
string name(){ return "material"; }
string description(){ return "An undefined material"; }
string standard_article(){ return "a"; }
/++
owner has this material, other is the one owner is overlapping
++/
void collide(Entity other){}
void collide(Shot other){}
void collide(Drop other){}
void collide(Agent other){}
void collide(Wall wall){}
void collide(Ground ground){}
void update(){}
} | D |
/**
* Compiler implementation of the
* $(LINK2 http://www.dlang.org, D programming language).
*
* Copyright: Copyright (c) 1999-2017 by Digital Mars, 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: $(DMDSRC _expression.d)
*/
module ddmd.expressionsem;
import core.stdc.stdio;
import core.stdc.string;
import ddmd.access;
import ddmd.aggregate;
import ddmd.aliasthis;
import ddmd.argtypes;
import ddmd.arrayop;
import ddmd.arraytypes;
import ddmd.attrib;
import ddmd.astcodegen;
import ddmd.dscope;
import ddmd.dsymbol;
import ddmd.declaration;
import ddmd.dclass;
import ddmd.dcast;
import ddmd.delegatize;
import ddmd.denum;
import ddmd.dimport;
import ddmd.dmangle;
import ddmd.dmodule;
import ddmd.dstruct;
import ddmd.dtemplate;
import ddmd.errors;
import ddmd.escape;
import ddmd.expression;
import ddmd.func;
import ddmd.globals;
import ddmd.hdrgen;
import ddmd.id;
import ddmd.identifier;
import ddmd.imphint;
import ddmd.intrange;
import ddmd.mtype;
import ddmd.nspace;
import ddmd.opover;
import ddmd.optimize;
import ddmd.parse;
import ddmd.root.ctfloat;
import ddmd.root.file;
import ddmd.root.filename;
import ddmd.root.outbuffer;
import ddmd.root.rootobject;
import ddmd.sideeffect;
import ddmd.safe;
import ddmd.semantic;
import ddmd.target;
import ddmd.tokens;
import ddmd.traits;
import ddmd.typinf;
import ddmd.utf;
import ddmd.utils;
import ddmd.visitor;
enum LOGSEMANTIC = false;
extern (C++) final class ExpressionSemanticVisitor : Visitor
{
alias visit = super.visit;
Scope* sc;
Expression result;
this(Scope* sc)
{
this.sc = sc;
}
/**************************
* Semantically analyze Expression.
* Determine types, fold constants, etc.
*/
override void visit(Expression e)
{
static if (LOGSEMANTIC)
{
printf("Expression::semantic() %s\n", e.toChars());
}
if (e.type)
e.type = e.type.semantic(e.loc, sc);
else
e.type = Type.tvoid;
result = e;
}
override void visit(IntegerExp e)
{
assert(e.type);
if (e.type.ty == Terror)
{
result = new ErrorExp();
return;
}
assert(e.type.deco);
e.normalize();
result = e;
}
override void visit(RealExp e)
{
if (!e.type)
e.type = Type.tfloat64;
else
e.type = e.type.semantic(e.loc, sc);
result = e;
}
override void visit(ComplexExp e)
{
if (!e.type)
e.type = Type.tcomplex80;
else
e.type = e.type.semantic(e.loc, sc);
result = e;
}
override void visit(IdentifierExp exp)
{
static if (LOGSEMANTIC)
{
printf("IdentifierExp::semantic('%s')\n", exp.ident.toChars());
}
if (exp.type) // This is used as the dummy expression
{
result = exp;
return;
}
Dsymbol scopesym;
Dsymbol s = sc.search(exp.loc, exp.ident, &scopesym);
if (s)
{
if (s.errors)
{
result = new ErrorExp();
return;
}
Expression e;
/* See if the symbol was a member of an enclosing 'with'
*/
WithScopeSymbol withsym = scopesym.isWithScopeSymbol();
if (withsym && withsym.withstate.wthis)
{
/* Disallow shadowing
*/
// First find the scope of the with
Scope* scwith = sc;
while (scwith.scopesym != scopesym)
{
scwith = scwith.enclosing;
assert(scwith);
}
// Look at enclosing scopes for symbols with the same name,
// in the same function
for (Scope* scx = scwith; scx && scx.func == scwith.func; scx = scx.enclosing)
{
Dsymbol s2;
if (scx.scopesym && scx.scopesym.symtab && (s2 = scx.scopesym.symtab.lookup(s.ident)) !is null && s != s2)
{
exp.error("with symbol `%s` is shadowing local symbol `%s`", s.toPrettyChars(), s2.toPrettyChars());
result = new ErrorExp();
return;
}
}
s = s.toAlias();
// Same as wthis.ident
// TODO: DotIdExp.semantic will find 'ident' from 'wthis' again.
// The redudancy should be removed.
e = new VarExp(exp.loc, withsym.withstate.wthis);
e = new DotIdExp(exp.loc, e, exp.ident);
e = e.semantic(sc);
}
else
{
if (withsym)
{
Declaration d = s.isDeclaration();
if (d)
checkAccess(exp.loc, sc, null, d);
}
/* If f is really a function template,
* then replace f with the function template declaration.
*/
FuncDeclaration f = s.isFuncDeclaration();
if (f)
{
TemplateDeclaration td = getFuncTemplateDecl(f);
if (td)
{
if (td.overroot) // if not start of overloaded list of TemplateDeclaration's
td = td.overroot; // then get the start
e = new TemplateExp(exp.loc, td, f);
e = e.semantic(sc);
result = e;
return;
}
}
// Haven't done overload resolution yet, so pass 1
e = resolve(exp.loc, sc, s, true);
}
result = e;
return;
}
if (hasThis(sc))
{
AggregateDeclaration ad = sc.getStructClassScope();
if (ad && ad.aliasthis)
{
Expression e;
e = new IdentifierExp(exp.loc, Id.This);
e = new DotIdExp(exp.loc, e, ad.aliasthis.ident);
e = new DotIdExp(exp.loc, e, exp.ident);
e = e.trySemantic(sc);
if (e)
{
result = e;
return;
}
}
}
if (exp.ident == Id.ctfe)
{
if (sc.flags & SCOPEctfe)
{
exp.error("variable `__ctfe` cannot be read at compile time");
result = new ErrorExp();
return;
}
// Create the magic __ctfe bool variable
auto vd = new VarDeclaration(exp.loc, Type.tbool, Id.ctfe, null);
vd.storage_class |= STCtemp;
vd.semanticRun = PASSsemanticdone;
Expression e = new VarExp(exp.loc, vd);
e = e.semantic(sc);
result = e;
return;
}
// If we've reached this point and are inside a with() scope then we may
// try one last attempt by checking whether the 'wthis' object supports
// dynamic dispatching via opDispatch.
// This is done by rewriting this expression as wthis.ident.
for (Scope* sc2 = sc; sc2; sc2 = sc2.enclosing)
{
if (!sc2.scopesym)
continue;
if (auto ss = sc2.scopesym.isWithScopeSymbol())
{
if (ss.withstate.wthis)
{
Expression e;
e = new VarExp(exp.loc, ss.withstate.wthis);
e = new DotIdExp(exp.loc, e, exp.ident);
e = e.trySemantic(sc);
if (e)
{
result = e;
return;
}
}
break;
}
}
/* Look for what user might have meant
*/
if (const n = importHint(exp.ident.toChars()))
exp.error("`%s` is not defined, perhaps `import %s;` is needed?", exp.ident.toChars(), n);
else if (auto s2 = sc.search_correct(exp.ident))
exp.error("undefined identifier `%s`, did you mean %s `%s`?", exp.ident.toChars(), s2.kind(), s2.toChars());
else if (const p = Scope.search_correct_C(exp.ident))
exp.error("undefined identifier `%s`, did you mean `%s`?", exp.ident.toChars(), p);
else
exp.error("undefined identifier `%s`", exp.ident.toChars());
result = new ErrorExp();
}
override void visit(DsymbolExp e)
{
result = resolve(e.loc, sc, e.s, e.hasOverloads);
}
override void visit(ThisExp e)
{
static if (LOGSEMANTIC)
{
printf("ThisExp::semantic()\n");
}
if (e.type)
{
result = e;
return;
}
FuncDeclaration fd = hasThis(sc); // fd is the uplevel function with the 'this' variable
/* Special case for typeof(this) and typeof(super) since both
* should work even if they are not inside a non-static member function
*/
if (!fd && sc.intypeof == 1)
{
// Find enclosing struct or class
for (Dsymbol s = sc.getStructClassScope(); 1; s = s.parent)
{
if (!s)
{
e.error("%s is not in a class or struct scope", e.toChars());
goto Lerr;
}
ClassDeclaration cd = s.isClassDeclaration();
if (cd)
{
e.type = cd.type;
result = e;
return;
}
StructDeclaration sd = s.isStructDeclaration();
if (sd)
{
e.type = sd.type;
result = e;
return;
}
}
}
if (!fd)
goto Lerr;
assert(fd.vthis);
e.var = fd.vthis;
assert(e.var.parent);
e.type = e.var.type;
if (e.var.checkNestedReference(sc, e.loc))
{
result = new ErrorExp();
return;
}
if (!sc.intypeof)
sc.callSuper |= CSXthis;
result = e;
return;
Lerr:
e.error("'this' is only defined in non-static member functions, not %s", sc.parent.toChars());
result = new ErrorExp();
}
override void visit(SuperExp e)
{
static if (LOGSEMANTIC)
{
printf("SuperExp::semantic('%s')\n", e.toChars());
}
if (e.type)
{
result = e;
return;
}
FuncDeclaration fd = hasThis(sc);
ClassDeclaration cd;
Dsymbol s;
/* Special case for typeof(this) and typeof(super) since both
* should work even if they are not inside a non-static member function
*/
if (!fd && sc.intypeof == 1)
{
// Find enclosing class
for (s = sc.getStructClassScope(); 1; s = s.parent)
{
if (!s)
{
e.error("%s is not in a class scope", e.toChars());
goto Lerr;
}
cd = s.isClassDeclaration();
if (cd)
{
cd = cd.baseClass;
if (!cd)
{
e.error("class %s has no 'super'", s.toChars());
goto Lerr;
}
e.type = cd.type;
result = e;
return;
}
}
}
if (!fd)
goto Lerr;
e.var = fd.vthis;
assert(e.var && e.var.parent);
s = fd.toParent();
while (s && s.isTemplateInstance())
s = s.toParent();
if (s.isTemplateDeclaration()) // allow inside template constraint
s = s.toParent();
assert(s);
cd = s.isClassDeclaration();
//printf("parent is %s %s\n", fd.toParent().kind(), fd.toParent().toChars());
if (!cd)
goto Lerr;
if (!cd.baseClass)
{
e.error("no base class for %s", cd.toChars());
e.type = e.var.type;
}
else
{
e.type = cd.baseClass.type;
e.type = e.type.castMod(e.var.type.mod);
}
if (e.var.checkNestedReference(sc, e.loc))
{
result = new ErrorExp();
return;
}
if (!sc.intypeof)
sc.callSuper |= CSXsuper;
result = e;
return;
Lerr:
e.error("'super' is only allowed in non-static class member functions");
result = new ErrorExp();
}
override void visit(NullExp e)
{
static if (LOGSEMANTIC)
{
printf("NullExp::semantic('%s')\n", e.toChars());
}
// NULL is the same as (void *)0
if (e.type)
{
result = e;
return;
}
e.type = Type.tnull;
result = e;
}
override void visit(StringExp e)
{
static if (LOGSEMANTIC)
{
printf("StringExp::semantic() %s\n", e.toChars());
}
if (e.type)
{
result = e;
return;
}
OutBuffer buffer;
size_t newlen = 0;
const(char)* p;
size_t u;
dchar c;
switch (e.postfix)
{
case 'd':
for (u = 0; u < e.len;)
{
p = utf_decodeChar(e.string, e.len, u, c);
if (p)
{
e.error("%s", p);
result = new ErrorExp();
return;
}
else
{
buffer.write4(c);
newlen++;
}
}
buffer.write4(0);
e.dstring = cast(dchar*)buffer.extractData();
e.len = newlen;
e.sz = 4;
e.type = new TypeDArray(Type.tdchar.immutableOf());
e.committed = 1;
break;
case 'w':
for (u = 0; u < e.len;)
{
p = utf_decodeChar(e.string, e.len, u, c);
if (p)
{
e.error("%s", p);
result = new ErrorExp();
return;
}
else
{
buffer.writeUTF16(c);
newlen++;
if (c >= 0x10000)
newlen++;
}
}
buffer.writeUTF16(0);
e.wstring = cast(wchar*)buffer.extractData();
e.len = newlen;
e.sz = 2;
e.type = new TypeDArray(Type.twchar.immutableOf());
e.committed = 1;
break;
case 'c':
e.committed = 1;
goto default;
default:
e.type = new TypeDArray(Type.tchar.immutableOf());
break;
}
e.type = e.type.semantic(e.loc, sc);
//type = type.immutableOf();
//printf("type = %s\n", type.toChars());
result = e;
}
override void visit(TupleExp exp)
{
static if (LOGSEMANTIC)
{
printf("+TupleExp::semantic(%s)\n", exp.toChars());
}
if (exp.type)
{
result = exp;
return;
}
if (exp.e0)
exp.e0 = exp.e0.semantic(sc);
// Run semantic() on each argument
bool err = false;
for (size_t i = 0; i < exp.exps.dim; i++)
{
Expression e = (*exp.exps)[i];
e = e.semantic(sc);
if (!e.type)
{
exp.error("%s has no value", e.toChars());
err = true;
}
else if (e.op == TOKerror)
err = true;
else
(*exp.exps)[i] = e;
}
if (err)
{
result = new ErrorExp();
return;
}
expandTuples(exp.exps);
exp.type = new TypeTuple(exp.exps);
exp.type = exp.type.semantic(exp.loc, sc);
//printf("-TupleExp::semantic(%s)\n", toChars());
result = exp;
}
override void visit(ArrayLiteralExp e)
{
static if (LOGSEMANTIC)
{
printf("ArrayLiteralExp::semantic('%s')\n", e.toChars());
}
if (e.type)
{
result = e;
return;
}
/* Perhaps an empty array literal [ ] should be rewritten as null?
*/
if (e.basis)
e.basis = e.basis.semantic(sc);
if (arrayExpressionSemantic(e.elements, sc) || (e.basis && e.basis.op == TOKerror))
{
result = new ErrorExp();
return;
}
expandTuples(e.elements);
Type t0;
if (e.basis)
e.elements.push(e.basis);
bool err = arrayExpressionToCommonType(sc, e.elements, &t0);
if (e.basis)
e.basis = e.elements.pop();
if (err)
{
result = new ErrorExp();
return;
}
e.type = t0.arrayOf();
e.type = e.type.semantic(e.loc, sc);
/* Disallow array literals of type void being used.
*/
if (e.elements.dim > 0 && t0.ty == Tvoid)
{
e.error("%s of type %s has no value", e.toChars(), e.type.toChars());
result = new ErrorExp();
return;
}
semanticTypeInfo(sc, e.type);
result = e;
}
override void visit(AssocArrayLiteralExp e)
{
static if (LOGSEMANTIC)
{
printf("AssocArrayLiteralExp::semantic('%s')\n", e.toChars());
}
if (e.type)
{
result = e;
return;
}
// Run semantic() on each element
bool err_keys = arrayExpressionSemantic(e.keys, sc);
bool err_vals = arrayExpressionSemantic(e.values, sc);
if (err_keys || err_vals)
{
result = new ErrorExp();
return;
}
expandTuples(e.keys);
expandTuples(e.values);
if (e.keys.dim != e.values.dim)
{
e.error("number of keys is %u, must match number of values %u", e.keys.dim, e.values.dim);
result = new ErrorExp();
return;
}
Type tkey = null;
Type tvalue = null;
err_keys = arrayExpressionToCommonType(sc, e.keys, &tkey);
err_vals = arrayExpressionToCommonType(sc, e.values, &tvalue);
if (err_keys || err_vals)
{
result = new ErrorExp();
return;
}
if (tkey == Type.terror || tvalue == Type.terror)
{
result = new ErrorExp();
return;
}
e.type = new TypeAArray(tvalue, tkey);
e.type = e.type.semantic(e.loc, sc);
semanticTypeInfo(sc, e.type);
result = e;
}
override void visit(StructLiteralExp e)
{
static if (LOGSEMANTIC)
{
printf("StructLiteralExp::semantic('%s')\n", e.toChars());
}
if (e.type)
{
result = e;
return;
}
e.sd.size(e.loc);
if (e.sd.sizeok != SIZEOKdone)
{
result = new ErrorExp();
return;
}
// run semantic() on each element
if (arrayExpressionSemantic(e.elements, sc))
{
result = new ErrorExp();
return;
}
expandTuples(e.elements);
/* Fit elements[] to the corresponding type of field[].
*/
if (!e.sd.fit(e.loc, sc, e.elements, e.stype))
{
result = new ErrorExp();
return;
}
/* Fill out remainder of elements[] with default initializers for fields[]
*/
if (!e.sd.fill(e.loc, e.elements, false))
{
/* An error in the initializer needs to be recorded as an error
* in the enclosing function or template, since the initializer
* will be part of the stuct declaration.
*/
global.increaseErrorCount();
result = new ErrorExp();
return;
}
if (checkFrameAccess(e.loc, sc, e.sd, e.elements.dim))
{
result = new ErrorExp();
return;
}
e.type = e.stype ? e.stype : e.sd.type;
result = e;
}
override void visit(TypeExp exp)
{
if (exp.type.ty == Terror)
{
result = new ErrorExp();
return;
}
//printf("TypeExp::semantic(%s)\n", type.toChars());
Expression e;
Type t;
Dsymbol s;
exp.type.resolve(exp.loc, sc, &e, &t, &s, true);
if (e)
{
//printf("e = %s %s\n", Token::toChars(e.op), e.toChars());
e = e.semantic(sc);
}
else if (t)
{
//printf("t = %d %s\n", t.ty, t.toChars());
exp.type = t.semantic(exp.loc, sc);
e = exp;
}
else if (s)
{
//printf("s = %s %s\n", s.kind(), s.toChars());
e = resolve(exp.loc, sc, s, true);
}
else
assert(0);
if (global.params.vcomplex)
exp.type.checkComplexTransition(exp.loc);
result = e;
}
override void visit(ScopeExp exp)
{
static if (LOGSEMANTIC)
{
printf("+ScopeExp::semantic(%p '%s')\n", exp, exp.toChars());
}
if (exp.type)
{
result = exp;
return;
}
ScopeDsymbol sds2 = exp.sds;
TemplateInstance ti = sds2.isTemplateInstance();
while (ti)
{
WithScopeSymbol withsym;
if (!ti.findTempDecl(sc, &withsym) || !ti.semanticTiargs(sc))
{
result = new ErrorExp();
return;
}
if (withsym && withsym.withstate.wthis)
{
Expression e = new VarExp(exp.loc, withsym.withstate.wthis);
e = new DotTemplateInstanceExp(exp.loc, e, ti);
result = e.semantic(sc);
return;
}
if (ti.needsTypeInference(sc))
{
if (TemplateDeclaration td = ti.tempdecl.isTemplateDeclaration())
{
Dsymbol p = td.toParent2();
FuncDeclaration fdthis = hasThis(sc);
AggregateDeclaration ad = p ? p.isAggregateDeclaration() : null;
if (fdthis && ad && isAggregate(fdthis.vthis.type) == ad && (td._scope.stc & STCstatic) == 0)
{
Expression e = new DotTemplateInstanceExp(exp.loc, new ThisExp(exp.loc), ti.name, ti.tiargs);
result = e.semantic(sc);
return;
}
}
else if (OverloadSet os = ti.tempdecl.isOverloadSet())
{
FuncDeclaration fdthis = hasThis(sc);
AggregateDeclaration ad = os.parent.isAggregateDeclaration();
if (fdthis && ad && isAggregate(fdthis.vthis.type) == ad)
{
Expression e = new DotTemplateInstanceExp(exp.loc, new ThisExp(exp.loc), ti.name, ti.tiargs);
result = e.semantic(sc);
return;
}
}
// ti is an instance which requires IFTI.
exp.sds = ti;
exp.type = Type.tvoid;
result = exp;
return;
}
ti.semantic(sc);
if (!ti.inst || ti.errors)
{
result = new ErrorExp();
return;
}
Dsymbol s = ti.toAlias();
if (s == ti)
{
exp.sds = ti;
exp.type = Type.tvoid;
result = exp;
return;
}
sds2 = s.isScopeDsymbol();
if (sds2)
{
ti = sds2.isTemplateInstance();
//printf("+ sds2 = %s, '%s'\n", sds2.kind(), sds2.toChars());
continue;
}
if (auto v = s.isVarDeclaration())
{
if (!v.type)
{
exp.error("forward reference of %s %s", v.kind(), v.toChars());
result = new ErrorExp();
return;
}
if ((v.storage_class & STCmanifest) && v._init)
{
/* When an instance that will be converted to a constant exists,
* the instance representation "foo!tiargs" is treated like a
* variable name, and its recursive appearance check (note that
* it's equivalent with a recursive instantiation of foo) is done
* separately from the circular initialization check for the
* eponymous enum variable declaration.
*
* template foo(T) {
* enum bool foo = foo; // recursive definition check (v.inuse)
* }
* template bar(T) {
* enum bool bar = bar!T; // recursive instantiation check (ti.inuse)
* }
*/
if (ti.inuse)
{
exp.error("recursive expansion of %s '%s'", ti.kind(), ti.toPrettyChars());
result = new ErrorExp();
return;
}
auto e = v.expandInitializer(exp.loc);
ti.inuse++;
e = e.semantic(sc);
ti.inuse--;
result = e;
return;
}
}
//printf("s = %s, '%s'\n", s.kind(), s.toChars());
auto e = resolve(exp.loc, sc, s, true);
//printf("-1ScopeExp::semantic()\n");
result = e;
return;
}
//printf("sds2 = %s, '%s'\n", sds2.kind(), sds2.toChars());
//printf("\tparent = '%s'\n", sds2.parent.toChars());
sds2.semantic(sc);
// (Aggregate|Enum)Declaration
if (auto t = sds2.getType())
{
result = (new TypeExp(exp.loc, t)).semantic(sc);
return;
}
if (auto td = sds2.isTemplateDeclaration())
{
result = (new TemplateExp(exp.loc, td)).semantic(sc);
return;
}
exp.sds = sds2;
exp.type = Type.tvoid;
//printf("-2ScopeExp::semantic() %s\n", toChars());
result = exp;
}
override void visit(NewExp exp)
{
static if (LOGSEMANTIC)
{
printf("NewExp::semantic() %s\n", exp.toChars());
if (exp.thisexp)
printf("\tthisexp = %s\n", exp.thisexp.toChars());
printf("\tnewtype: %s\n", exp.newtype.toChars());
}
if (exp.type) // if semantic() already run
{
result = exp;
return;
}
// https://issues.dlang.org/show_bug.cgi?id=11581
// With the syntax `new T[edim]` or `thisexp.new T[edim]`,
// T should be analyzed first and edim should go into arguments iff it's
// not a tuple.
Expression edim = null;
if (!exp.arguments && exp.newtype.ty == Tsarray)
{
edim = (cast(TypeSArray)exp.newtype).dim;
exp.newtype = (cast(TypeNext)exp.newtype).next;
}
ClassDeclaration cdthis = null;
if (exp.thisexp)
{
exp.thisexp = exp.thisexp.semantic(sc);
if (exp.thisexp.op == TOKerror)
{
result = new ErrorExp();
return;
}
cdthis = exp.thisexp.type.isClassHandle();
if (!cdthis)
{
exp.error("'this' for nested class must be a class type, not %s", exp.thisexp.type.toChars());
result = new ErrorExp();
return;
}
sc = sc.push(cdthis);
exp.type = exp.newtype.semantic(exp.loc, sc);
sc = sc.pop();
}
else
{
exp.type = exp.newtype.semantic(exp.loc, sc);
}
if (exp.type.ty == Terror)
{
result = new ErrorExp();
return;
}
if (edim)
{
if (exp.type.toBasetype().ty == Ttuple)
{
// --> new T[edim]
exp.type = new TypeSArray(exp.type, edim);
exp.type = exp.type.semantic(exp.loc, sc);
if (exp.type.ty == Terror)
{
result = new ErrorExp();
return;
}
}
else
{
// --> new T[](edim)
exp.arguments = new Expressions();
exp.arguments.push(edim);
exp.type = exp.type.arrayOf();
}
}
exp.newtype = exp.type; // in case type gets cast to something else
Type tb = exp.type.toBasetype();
//printf("tb: %s, deco = %s\n", tb.toChars(), tb.deco);
if (arrayExpressionSemantic(exp.newargs, sc) ||
preFunctionParameters(exp.loc, sc, exp.newargs))
{
result = new ErrorExp();
return;
}
if (arrayExpressionSemantic(exp.arguments, sc) ||
preFunctionParameters(exp.loc, sc, exp.arguments))
{
result = new ErrorExp();
return;
}
if (exp.thisexp && tb.ty != Tclass)
{
exp.error("e.new is only for allocating nested classes, not %s", tb.toChars());
result = new ErrorExp();
return;
}
size_t nargs = exp.arguments ? exp.arguments.dim : 0;
Expression newprefix = null;
if (tb.ty == Tclass)
{
auto cd = (cast(TypeClass)tb).sym;
cd.size(exp.loc);
if (cd.sizeok != SIZEOKdone)
{
result = new ErrorExp();
return;
}
if (!cd.ctor)
cd.ctor = cd.searchCtor();
if (cd.noDefaultCtor && !nargs && !cd.defaultCtor)
{
exp.error("default construction is disabled for type %s", cd.type.toChars());
result = new ErrorExp();
return;
}
if (cd.isInterfaceDeclaration())
{
exp.error("cannot create instance of interface %s", cd.toChars());
result = new ErrorExp();
return;
}
if (cd.isAbstract())
{
exp.error("cannot create instance of abstract class %s", cd.toChars());
for (size_t i = 0; i < cd.vtbl.dim; i++)
{
FuncDeclaration fd = cd.vtbl[i].isFuncDeclaration();
if (fd && fd.isAbstract())
{
errorSupplemental(exp.loc, "function '%s' is not implemented",
fd.toFullSignature());
}
}
result = new ErrorExp();
return;
}
// checkDeprecated() is already done in newtype.semantic().
if (cd.isNested())
{
/* We need a 'this' pointer for the nested class.
* Ensure we have the right one.
*/
Dsymbol s = cd.toParent2();
//printf("cd isNested, parent = %s '%s'\n", s.kind(), s.toPrettyChars());
if (auto cdn = s.isClassDeclaration())
{
if (!cdthis)
{
// Supply an implicit 'this' and try again
exp.thisexp = new ThisExp(exp.loc);
for (Dsymbol sp = sc.parent; 1; sp = sp.parent)
{
if (!sp)
{
exp.error("outer class %s 'this' needed to 'new' nested class %s",
cdn.toChars(), cd.toChars());
result = new ErrorExp();
return;
}
ClassDeclaration cdp = sp.isClassDeclaration();
if (!cdp)
continue;
if (cdp == cdn || cdn.isBaseOf(cdp, null))
break;
// Add a '.outer' and try again
exp.thisexp = new DotIdExp(exp.loc, exp.thisexp, Id.outer);
}
exp.thisexp = exp.thisexp.semantic(sc);
if (exp.thisexp.op == TOKerror)
{
result = new ErrorExp();
return;
}
cdthis = exp.thisexp.type.isClassHandle();
}
if (cdthis != cdn && !cdn.isBaseOf(cdthis, null))
{
//printf("cdthis = %s\n", cdthis.toChars());
exp.error("'this' for nested class must be of type %s, not %s",
cdn.toChars(), exp.thisexp.type.toChars());
result = new ErrorExp();
return;
}
if (!MODimplicitConv(exp.thisexp.type.mod, exp.newtype.mod))
{
exp.error("nested type %s should have the same or weaker constancy as enclosing type %s",
exp.newtype.toChars(), exp.thisexp.type.toChars());
result = new ErrorExp();
return;
}
}
else if (exp.thisexp)
{
exp.error("e.new is only for allocating nested classes");
result = new ErrorExp();
return;
}
else if (auto fdn = s.isFuncDeclaration())
{
// make sure the parent context fdn of cd is reachable from sc
if (!ensureStaticLinkTo(sc.parent, fdn))
{
exp.error("outer function context of %s is needed to 'new' nested class %s",
fdn.toPrettyChars(), cd.toPrettyChars());
result = new ErrorExp();
return;
}
}
else
assert(0);
}
else if (exp.thisexp)
{
exp.error("e.new is only for allocating nested classes");
result = new ErrorExp();
return;
}
if (cd.aggNew)
{
// Prepend the size argument to newargs[]
Expression e = new IntegerExp(exp.loc, cd.size(exp.loc), Type.tsize_t);
if (!exp.newargs)
exp.newargs = new Expressions();
exp.newargs.shift(e);
FuncDeclaration f = resolveFuncCall(exp.loc, sc, cd.aggNew, null, tb, exp.newargs);
if (!f || f.errors)
{
result = new ErrorExp();
return;
}
exp.checkDeprecated(sc, f);
exp.checkPurity(sc, f);
exp.checkSafety(sc, f);
exp.checkNogc(sc, f);
checkAccess(cd, exp.loc, sc, f);
TypeFunction tf = cast(TypeFunction)f.type;
Type rettype;
if (functionParameters(exp.loc, sc, tf, null, exp.newargs, f, &rettype, &newprefix))
{
result = new ErrorExp();
return;
}
exp.allocator = f.isNewDeclaration();
assert(exp.allocator);
}
else
{
if (exp.newargs && exp.newargs.dim)
{
exp.error("no allocator for %s", cd.toChars());
result = new ErrorExp();
return;
}
}
if (cd.ctor)
{
FuncDeclaration f = resolveFuncCall(exp.loc, sc, cd.ctor, null, tb, exp.arguments, 0);
if (!f || f.errors)
{
result = new ErrorExp();
return;
}
exp.checkDeprecated(sc, f);
exp.checkPurity(sc, f);
exp.checkSafety(sc, f);
exp.checkNogc(sc, f);
checkAccess(cd, exp.loc, sc, f);
TypeFunction tf = cast(TypeFunction)f.type;
if (!exp.arguments)
exp.arguments = new Expressions();
if (functionParameters(exp.loc, sc, tf, exp.type, exp.arguments, f, &exp.type, &exp.argprefix))
{
result = new ErrorExp();
return;
}
exp.member = f.isCtorDeclaration();
assert(exp.member);
}
else
{
if (nargs)
{
exp.error("no constructor for %s", cd.toChars());
result = new ErrorExp();
return;
}
}
}
else if (tb.ty == Tstruct)
{
auto sd = (cast(TypeStruct)tb).sym;
sd.size(exp.loc);
if (sd.sizeok != SIZEOKdone)
{
result = new ErrorExp();
return;
}
if (!sd.ctor)
sd.ctor = sd.searchCtor();
if (sd.noDefaultCtor && !nargs)
{
exp.error("default construction is disabled for type %s", sd.type.toChars());
result = new ErrorExp();
return;
}
// checkDeprecated() is already done in newtype.semantic().
if (sd.aggNew)
{
// Prepend the uint size argument to newargs[]
Expression e = new IntegerExp(exp.loc, sd.size(exp.loc), Type.tsize_t);
if (!exp.newargs)
exp.newargs = new Expressions();
exp.newargs.shift(e);
FuncDeclaration f = resolveFuncCall(exp.loc, sc, sd.aggNew, null, tb, exp.newargs);
if (!f || f.errors)
{
result = new ErrorExp();
return;
}
exp.checkDeprecated(sc, f);
exp.checkPurity(sc, f);
exp.checkSafety(sc, f);
exp.checkNogc(sc, f);
checkAccess(sd, exp.loc, sc, f);
TypeFunction tf = cast(TypeFunction)f.type;
Type rettype;
if (functionParameters(exp.loc, sc, tf, null, exp.newargs, f, &rettype, &newprefix))
{
result = new ErrorExp();
return;
}
exp.allocator = f.isNewDeclaration();
assert(exp.allocator);
}
else
{
if (exp.newargs && exp.newargs.dim)
{
exp.error("no allocator for %s", sd.toChars());
result = new ErrorExp();
return;
}
}
if (sd.ctor && nargs)
{
FuncDeclaration f = resolveFuncCall(exp.loc, sc, sd.ctor, null, tb, exp.arguments, 0);
if (!f || f.errors)
{
result = new ErrorExp();
return;
}
exp.checkDeprecated(sc, f);
exp.checkPurity(sc, f);
exp.checkSafety(sc, f);
exp.checkNogc(sc, f);
checkAccess(sd, exp.loc, sc, f);
TypeFunction tf = cast(TypeFunction)f.type;
if (!exp.arguments)
exp.arguments = new Expressions();
if (functionParameters(exp.loc, sc, tf, exp.type, exp.arguments, f, &exp.type, &exp.argprefix))
{
result = new ErrorExp();
return;
}
exp.member = f.isCtorDeclaration();
assert(exp.member);
if (checkFrameAccess(exp.loc, sc, sd, sd.fields.dim))
{
result = new ErrorExp();
return;
}
}
else
{
if (!exp.arguments)
exp.arguments = new Expressions();
if (!sd.fit(exp.loc, sc, exp.arguments, tb))
{
result = new ErrorExp();
return;
}
if (!sd.fill(exp.loc, exp.arguments, false))
{
result = new ErrorExp();
return;
}
if (checkFrameAccess(exp.loc, sc, sd, exp.arguments ? exp.arguments.dim : 0))
{
result = new ErrorExp();
return;
}
/* Since a `new` allocation may escape, check each of the arguments for escaping
*/
if (global.params.vsafe)
{
foreach (arg; *exp.arguments)
{
if (checkReturnEscape(sc, arg, false))
{
result = new ErrorExp();
return;
}
}
}
}
exp.type = exp.type.pointerTo();
}
else if (tb.ty == Tarray && nargs)
{
Type tn = tb.nextOf().baseElemOf();
Dsymbol s = tn.toDsymbol(sc);
AggregateDeclaration ad = s ? s.isAggregateDeclaration() : null;
if (ad && ad.noDefaultCtor)
{
exp.error("default construction is disabled for type %s", tb.nextOf().toChars());
result = new ErrorExp();
return;
}
for (size_t i = 0; i < nargs; i++)
{
if (tb.ty != Tarray)
{
exp.error("too many arguments for array");
result = new ErrorExp();
return;
}
Expression arg = (*exp.arguments)[i];
arg = resolveProperties(sc, arg);
arg = arg.implicitCastTo(sc, Type.tsize_t);
arg = arg.optimize(WANTvalue);
if (arg.op == TOKint64 && cast(sinteger_t)arg.toInteger() < 0)
{
exp.error("negative array index %s", arg.toChars());
result = new ErrorExp();
return;
}
(*exp.arguments)[i] = arg;
tb = (cast(TypeDArray)tb).next.toBasetype();
}
}
else if (tb.isscalar())
{
if (!nargs)
{
}
else if (nargs == 1)
{
Expression e = (*exp.arguments)[0];
e = e.implicitCastTo(sc, tb);
(*exp.arguments)[0] = e;
}
else
{
exp.error("more than one argument for construction of %s", exp.type.toChars());
result = new ErrorExp();
return;
}
exp.type = exp.type.pointerTo();
}
else
{
exp.error("new can only create structs, dynamic arrays or class objects, not %s's", exp.type.toChars());
result = new ErrorExp();
return;
}
//printf("NewExp: '%s'\n", toChars());
//printf("NewExp:type '%s'\n", type.toChars());
semanticTypeInfo(sc, exp.type);
if (newprefix)
{
result = Expression.combine(newprefix, exp);
return;
}
result = exp;
}
override void visit(NewAnonClassExp e)
{
static if (LOGSEMANTIC)
{
printf("NewAnonClassExp::semantic() %s\n", e.toChars());
//printf("thisexp = %p\n", thisexp);
//printf("type: %s\n", type.toChars());
}
Expression d = new DeclarationExp(e.loc, e.cd);
sc = sc.push(); // just create new scope
sc.flags &= ~SCOPEctfe; // temporary stop CTFE
d = d.semantic(sc);
sc = sc.pop();
if (!e.cd.errors && sc.intypeof && !sc.parent.inNonRoot())
{
ScopeDsymbol sds = sc.tinst ? cast(ScopeDsymbol)sc.tinst : sc._module;
sds.members.push(e.cd);
}
Expression n = new NewExp(e.loc, e.thisexp, e.newargs, e.cd.type, e.arguments);
Expression c = new CommaExp(e.loc, d, n);
result = c.semantic(sc);
}
override void visit(SymOffExp e)
{
static if (LOGSEMANTIC)
{
printf("SymOffExp::semantic('%s')\n", e.toChars());
}
//var.semantic(sc);
if (!e.type)
e.type = e.var.type.pointerTo();
if (auto v = e.var.isVarDeclaration())
{
if (v.checkNestedReference(sc, e.loc))
{
result = new ErrorExp();
return;
}
}
else if (auto f = e.var.isFuncDeclaration())
{
if (f.checkNestedReference(sc, e.loc))
{
result = new ErrorExp();
return;
}
}
result = e;
}
override void visit(VarExp e)
{
static if (LOGSEMANTIC)
{
printf("VarExp::semantic(%s)\n", e.toChars());
}
if (auto fd = e.var.isFuncDeclaration())
{
//printf("L%d fd = %s\n", __LINE__, f.toChars());
if (!fd.functionSemantic())
{
result = new ErrorExp();
return;
}
}
if (!e.type)
e.type = e.var.type;
if (e.type && !e.type.deco)
e.type = e.type.semantic(e.loc, sc);
/* Fix for 1161 doesn't work because it causes protection
* problems when instantiating imported templates passing private
* variables as alias template parameters.
*/
//checkAccess(loc, sc, NULL, var);
if (auto vd = e.var.isVarDeclaration())
{
if (vd.checkNestedReference(sc, e.loc))
{
result = new ErrorExp();
return;
}
// https://issues.dlang.org/show_bug.cgi?id=12025
// If the variable is not actually used in runtime code,
// the purity violation error is redundant.
//checkPurity(sc, vd);
}
else if (auto fd = e.var.isFuncDeclaration())
{
// TODO: If fd isn't yet resolved its overload, the checkNestedReference
// call would cause incorrect validation.
// Maybe here should be moved in CallExp, or AddrExp for functions.
if (fd.checkNestedReference(sc, e.loc))
{
result = new ErrorExp();
return;
}
}
else if (auto od = e.var.isOverDeclaration())
{
e.type = Type.tvoid; // ambiguous type?
}
result = e;
}
override void visit(FuncExp exp)
{
static if (LOGSEMANTIC)
{
printf("FuncExp::semantic(%s)\n", exp.toChars());
if (exp.fd.treq)
printf(" treq = %s\n", exp.fd.treq.toChars());
}
Expression e = exp;
sc = sc.push(); // just create new scope
sc.flags &= ~SCOPEctfe; // temporary stop CTFE
sc.protection = Prot(PROTpublic); // https://issues.dlang.org/show_bug.cgi?id=12506
if (!exp.type || exp.type == Type.tvoid)
{
/* fd.treq might be incomplete type,
* so should not semantic it.
* void foo(T)(T delegate(int) dg){}
* foo(a=>a); // in IFTI, treq == T delegate(int)
*/
//if (fd.treq)
// fd.treq = fd.treq.semantic(loc, sc);
exp.genIdent(sc);
// Set target of return type inference
if (exp.fd.treq && !exp.fd.type.nextOf())
{
TypeFunction tfv = null;
if (exp.fd.treq.ty == Tdelegate || (exp.fd.treq.ty == Tpointer && exp.fd.treq.nextOf().ty == Tfunction))
tfv = cast(TypeFunction)exp.fd.treq.nextOf();
if (tfv)
{
TypeFunction tfl = cast(TypeFunction)exp.fd.type;
tfl.next = tfv.nextOf();
}
}
//printf("td = %p, treq = %p\n", td, fd.treq);
if (exp.td)
{
assert(exp.td.parameters && exp.td.parameters.dim);
exp.td.semantic(sc);
exp.type = Type.tvoid; // temporary type
if (exp.fd.treq) // defer type determination
{
FuncExp fe;
if (exp.matchType(exp.fd.treq, sc, &fe) > MATCHnomatch)
e = fe;
else
e = new ErrorExp();
}
goto Ldone;
}
uint olderrors = global.errors;
exp.fd.semantic(sc);
if (olderrors == global.errors)
{
exp.fd.semantic2(sc);
if (olderrors == global.errors)
exp.fd.semantic3(sc);
}
if (olderrors != global.errors)
{
if (exp.fd.type && exp.fd.type.ty == Tfunction && !exp.fd.type.nextOf())
(cast(TypeFunction)exp.fd.type).next = Type.terror;
e = new ErrorExp();
goto Ldone;
}
// Type is a "delegate to" or "pointer to" the function literal
if ((exp.fd.isNested() && exp.fd.tok == TOKdelegate) || (exp.tok == TOKreserved && exp.fd.treq && exp.fd.treq.ty == Tdelegate))
{
exp.type = new TypeDelegate(exp.fd.type);
exp.type = exp.type.semantic(exp.loc, sc);
exp.fd.tok = TOKdelegate;
}
else
{
exp.type = new TypePointer(exp.fd.type);
exp.type = exp.type.semantic(exp.loc, sc);
//type = fd.type.pointerTo();
/* A lambda expression deduced to function pointer might become
* to a delegate literal implicitly.
*
* auto foo(void function() fp) { return 1; }
* assert(foo({}) == 1);
*
* So, should keep fd.tok == TOKreserve if fd.treq == NULL.
*/
if (exp.fd.treq && exp.fd.treq.ty == Tpointer)
{
// change to non-nested
exp.fd.tok = TOKfunction;
exp.fd.vthis = null;
}
}
exp.fd.tookAddressOf++;
}
Ldone:
sc = sc.pop();
result = e;
}
// used from CallExp::semantic()
Expression callExpSemantic(FuncExp exp, Scope* sc, Expressions* arguments)
{
if ((!exp.type || exp.type == Type.tvoid) && exp.td && arguments && arguments.dim)
{
for (size_t k = 0; k < arguments.dim; k++)
{
Expression checkarg = (*arguments)[k];
if (checkarg.op == TOKerror)
return checkarg;
}
exp.genIdent(sc);
assert(exp.td.parameters && exp.td.parameters.dim);
exp.td.semantic(sc);
TypeFunction tfl = cast(TypeFunction)exp.fd.type;
size_t dim = Parameter.dim(tfl.parameters);
if (arguments.dim < dim)
{
// Default arguments are always typed, so they don't need inference.
Parameter p = Parameter.getNth(tfl.parameters, arguments.dim);
if (p.defaultArg)
dim = arguments.dim;
}
if ((!tfl.varargs && arguments.dim == dim) || (tfl.varargs && arguments.dim >= dim))
{
auto tiargs = new Objects();
tiargs.reserve(exp.td.parameters.dim);
for (size_t i = 0; i < exp.td.parameters.dim; i++)
{
TemplateParameter tp = (*exp.td.parameters)[i];
for (size_t u = 0; u < dim; u++)
{
Parameter p = Parameter.getNth(tfl.parameters, u);
if (p.type.ty == Tident && (cast(TypeIdentifier)p.type).ident == tp.ident)
{
Expression e = (*arguments)[u];
tiargs.push(e.type);
u = dim; // break inner loop
}
}
}
auto ti = new TemplateInstance(exp.loc, exp.td, tiargs);
return (new ScopeExp(exp.loc, ti)).semantic(sc);
}
exp.error("cannot infer function literal type");
return new ErrorExp();
}
return exp.semantic(sc);
}
override void visit(CallExp exp)
{
static if (LOGSEMANTIC)
{
printf("CallExp::semantic() %s\n", exp.toChars());
}
if (exp.type)
{
result = exp;
return; // semantic() already run
}
version (none)
{
if (exp.arguments && exp.arguments.dim)
{
Expression earg = (*exp.arguments)[0];
earg.print();
if (earg.type)
earg.type.print();
}
}
Type t1;
Objects* tiargs = null; // initial list of template arguments
Expression ethis = null;
Type tthis = null;
Expression e1org = exp.e1;
if (exp.e1.op == TOKcomma)
{
/* Rewrite (a,b)(args) as (a,(b(args)))
*/
auto ce = cast(CommaExp)exp.e1;
exp.e1 = ce.e2;
ce.e2 = exp;
result = ce.semantic(sc);
return;
}
if (exp.e1.op == TOKdelegate)
{
DelegateExp de = cast(DelegateExp)exp.e1;
exp.e1 = new DotVarExp(de.loc, de.e1, de.func, de.hasOverloads);
visit(exp);
return;
}
if (exp.e1.op == TOKfunction)
{
if (arrayExpressionSemantic(exp.arguments, sc) || preFunctionParameters(exp.loc, sc, exp.arguments))
{
result = new ErrorExp();
return;
}
// Run e1 semantic even if arguments have any errors
FuncExp fe = cast(FuncExp)exp.e1;
exp.e1 = callExpSemantic(fe, sc, exp.arguments);
if (exp.e1.op == TOKerror)
{
result = exp.e1;
return;
}
}
if (Expression ex = resolveUFCS(sc, exp))
{
result = ex;
return;
}
/* This recognizes:
* foo!(tiargs)(funcargs)
*/
if (exp.e1.op == TOKscope)
{
ScopeExp se = cast(ScopeExp)exp.e1;
TemplateInstance ti = se.sds.isTemplateInstance();
if (ti)
{
/* Attempt to instantiate ti. If that works, go with it.
* If not, go with partial explicit specialization.
*/
WithScopeSymbol withsym;
if (!ti.findTempDecl(sc, &withsym) || !ti.semanticTiargs(sc))
{
result = new ErrorExp();
return;
}
if (withsym && withsym.withstate.wthis)
{
exp.e1 = new VarExp(exp.e1.loc, withsym.withstate.wthis);
exp.e1 = new DotTemplateInstanceExp(exp.e1.loc, exp.e1, ti);
goto Ldotti;
}
if (ti.needsTypeInference(sc, 1))
{
/* Go with partial explicit specialization
*/
tiargs = ti.tiargs;
assert(ti.tempdecl);
if (TemplateDeclaration td = ti.tempdecl.isTemplateDeclaration())
exp.e1 = new TemplateExp(exp.loc, td);
else if (OverDeclaration od = ti.tempdecl.isOverDeclaration())
exp.e1 = new VarExp(exp.loc, od);
else
exp.e1 = new OverExp(exp.loc, ti.tempdecl.isOverloadSet());
}
else
{
Expression e1x = exp.e1.semantic(sc);
if (e1x.op == TOKerror)
{
result = e1x;
return;
}
exp.e1 = e1x;
}
}
}
/* This recognizes:
* expr.foo!(tiargs)(funcargs)
*/
Ldotti:
if (exp.e1.op == TOKdotti && !exp.e1.type)
{
DotTemplateInstanceExp se = cast(DotTemplateInstanceExp)exp.e1;
TemplateInstance ti = se.ti;
{
/* Attempt to instantiate ti. If that works, go with it.
* If not, go with partial explicit specialization.
*/
if (!se.findTempDecl(sc) || !ti.semanticTiargs(sc))
{
result = new ErrorExp();
return;
}
if (ti.needsTypeInference(sc, 1))
{
/* Go with partial explicit specialization
*/
tiargs = ti.tiargs;
assert(ti.tempdecl);
if (TemplateDeclaration td = ti.tempdecl.isTemplateDeclaration())
exp.e1 = new DotTemplateExp(exp.loc, se.e1, td);
else if (OverDeclaration od = ti.tempdecl.isOverDeclaration())
{
exp.e1 = new DotVarExp(exp.loc, se.e1, od, true);
}
else
exp.e1 = new DotExp(exp.loc, se.e1, new OverExp(exp.loc, ti.tempdecl.isOverloadSet()));
}
else
{
Expression e1x = exp.e1.semantic(sc);
if (e1x.op == TOKerror)
{
result = e1x;
return;
}
exp.e1 = e1x;
}
}
}
Lagain:
//printf("Lagain: %s\n", toChars());
exp.f = null;
if (exp.e1.op == TOKthis || exp.e1.op == TOKsuper)
{
// semantic() run later for these
}
else
{
if (exp.e1.op == TOKdotid)
{
DotIdExp die = cast(DotIdExp)exp.e1;
exp.e1 = die.semantic(sc);
/* Look for e1 having been rewritten to expr.opDispatch!(string)
* We handle such earlier, so go back.
* Note that in the rewrite, we carefully did not run semantic() on e1
*/
if (exp.e1.op == TOKdotti && !exp.e1.type)
{
goto Ldotti;
}
}
else
{
static __gshared int nest;
if (++nest > 500)
{
exp.error("recursive evaluation of %s", exp.toChars());
--nest;
result = new ErrorExp();
return;
}
Expression ex = unaSemantic(exp, sc);
--nest;
if (ex)
{
result = ex;
return;
}
}
/* Look for e1 being a lazy parameter
*/
if (exp.e1.op == TOKvar)
{
VarExp ve = cast(VarExp)exp.e1;
if (ve.var.storage_class & STClazy)
{
// lazy parameters can be called without violating purity and safety
Type tw = ve.var.type;
Type tc = ve.var.type.substWildTo(MODconst);
auto tf = new TypeFunction(null, tc, 0, LINKd, STCsafe | STCpure);
(tf = cast(TypeFunction)tf.semantic(exp.loc, sc)).next = tw; // hack for bug7757
auto t = new TypeDelegate(tf);
ve.type = t.semantic(exp.loc, sc);
}
VarDeclaration v = ve.var.isVarDeclaration();
if (v && ve.checkPurity(sc, v))
{
result = new ErrorExp();
return;
}
}
if (exp.e1.op == TOKsymoff && (cast(SymOffExp)exp.e1).hasOverloads)
{
SymOffExp se = cast(SymOffExp)exp.e1;
exp.e1 = new VarExp(se.loc, se.var, true);
exp.e1 = exp.e1.semantic(sc);
}
else if (exp.e1.op == TOKdot)
{
DotExp de = cast(DotExp)exp.e1;
if (de.e2.op == TOKoverloadset)
{
ethis = de.e1;
tthis = de.e1.type;
exp.e1 = de.e2;
}
}
else if (exp.e1.op == TOKstar && exp.e1.type.ty == Tfunction)
{
// Rewrite (*fp)(arguments) to fp(arguments)
exp.e1 = (cast(PtrExp)exp.e1).e1;
}
}
t1 = exp.e1.type ? exp.e1.type.toBasetype() : null;
if (exp.e1.op == TOKerror)
{
result = exp.e1;
return;
}
if (arrayExpressionSemantic(exp.arguments, sc) || preFunctionParameters(exp.loc, sc, exp.arguments))
{
result = new ErrorExp();
return;
}
// Check for call operator overload
if (t1)
{
if (t1.ty == Tstruct)
{
auto sd = (cast(TypeStruct)t1).sym;
sd.size(exp.loc); // Resolve forward references to construct object
if (sd.sizeok != SIZEOKdone)
{
result = new ErrorExp();
return;
}
if (!sd.ctor)
sd.ctor = sd.searchCtor();
// First look for constructor
if (exp.e1.op == TOKtype && sd.ctor)
{
if (!sd.noDefaultCtor && !(exp.arguments && exp.arguments.dim))
goto Lx;
auto sle = new StructLiteralExp(exp.loc, sd, null, exp.e1.type);
if (!sd.fill(exp.loc, sle.elements, true))
{
result = new ErrorExp();
return;
}
if (checkFrameAccess(exp.loc, sc, sd, sle.elements.dim))
{
result = new ErrorExp();
return;
}
// https://issues.dlang.org/show_bug.cgi?id=14556
// Set concrete type to avoid further redundant semantic().
sle.type = exp.e1.type;
/* Constructor takes a mutable object, so don't use
* the immutable initializer symbol.
*/
sle.useStaticInit = false;
Expression e = sle;
if (auto cf = sd.ctor.isCtorDeclaration())
{
e = new DotVarExp(exp.loc, e, cf, true);
}
else if (auto td = sd.ctor.isTemplateDeclaration())
{
e = new DotTemplateExp(exp.loc, e, td);
}
else if (auto os = sd.ctor.isOverloadSet())
{
e = new DotExp(exp.loc, e, new OverExp(exp.loc, os));
}
else
assert(0);
e = new CallExp(exp.loc, e, exp.arguments);
e = e.semantic(sc);
result = e;
return;
}
// No constructor, look for overload of opCall
if (search_function(sd, Id.call))
goto L1;
// overload of opCall, therefore it's a call
if (exp.e1.op != TOKtype)
{
if (sd.aliasthis && exp.e1.type != exp.att1)
{
if (!exp.att1 && exp.e1.type.checkAliasThisRec())
exp.att1 = exp.e1.type;
exp.e1 = resolveAliasThis(sc, exp.e1);
goto Lagain;
}
exp.error("%s %s does not overload ()", sd.kind(), sd.toChars());
result = new ErrorExp();
return;
}
/* It's a struct literal
*/
Lx:
Expression e = new StructLiteralExp(exp.loc, sd, exp.arguments, exp.e1.type);
e = e.semantic(sc);
result = e;
return;
}
else if (t1.ty == Tclass)
{
L1:
// Rewrite as e1.call(arguments)
Expression e = new DotIdExp(exp.loc, exp.e1, Id.call);
e = new CallExp(exp.loc, e, exp.arguments);
e = e.semantic(sc);
result = e;
return;
}
else if (exp.e1.op == TOKtype && t1.isscalar())
{
Expression e;
// Make sure to use the the enum type itself rather than its
// base type
// https://issues.dlang.org/show_bug.cgi?id=16346
if (exp.e1.type.ty == Tenum)
{
t1 = exp.e1.type;
}
if (!exp.arguments || exp.arguments.dim == 0)
{
e = t1.defaultInitLiteral(exp.loc);
}
else if (exp.arguments.dim == 1)
{
e = (*exp.arguments)[0];
e = e.implicitCastTo(sc, t1);
e = new CastExp(exp.loc, e, t1);
}
else
{
exp.error("more than one argument for construction of %s", t1.toChars());
e = new ErrorExp();
}
e = e.semantic(sc);
result = e;
return;
}
}
static FuncDeclaration resolveOverloadSet(Loc loc, Scope* sc,
OverloadSet os, Objects* tiargs, Type tthis, Expressions* arguments)
{
FuncDeclaration f = null;
foreach (s; os.a)
{
if (tiargs && s.isFuncDeclaration())
continue;
if (auto f2 = resolveFuncCall(loc, sc, s, tiargs, tthis, arguments, 1))
{
if (f2.errors)
return null;
if (f)
{
/* Error if match in more than one overload set,
* even if one is a 'better' match than the other.
*/
ScopeDsymbol.multiplyDefined(loc, f, f2);
}
else
f = f2;
}
}
if (!f)
.error(loc, "no overload matches for %s", os.toChars());
else if (f.errors)
f = null;
return f;
}
if (exp.e1.op == TOKdotvar && t1.ty == Tfunction || exp.e1.op == TOKdottd)
{
UnaExp ue = cast(UnaExp)exp.e1;
Expression ue1 = ue.e1;
Expression ue1old = ue1; // need for 'right this' check
VarDeclaration v;
if (ue1.op == TOKvar && (v = (cast(VarExp)ue1).var.isVarDeclaration()) !is null && v.needThis())
{
ue.e1 = new TypeExp(ue1.loc, ue1.type);
ue1 = null;
}
DotVarExp dve;
DotTemplateExp dte;
Dsymbol s;
if (exp.e1.op == TOKdotvar)
{
dve = cast(DotVarExp)exp.e1;
dte = null;
s = dve.var;
tiargs = null;
}
else
{
dve = null;
dte = cast(DotTemplateExp)exp.e1;
s = dte.td;
}
// Do overload resolution
exp.f = resolveFuncCall(exp.loc, sc, s, tiargs, ue1 ? ue1.type : null, exp.arguments);
if (!exp.f || exp.f.errors || exp.f.type.ty == Terror)
{
result = new ErrorExp();
return;
}
if (exp.f.interfaceVirtual)
{
/* Cast 'this' to the type of the interface, and replace f with the interface's equivalent
*/
auto b = exp.f.interfaceVirtual;
auto ad2 = b.sym;
ue.e1 = ue.e1.castTo(sc, ad2.type.addMod(ue.e1.type.mod));
ue.e1 = ue.e1.semantic(sc);
ue1 = ue.e1;
auto vi = exp.f.findVtblIndex(&ad2.vtbl, cast(int)ad2.vtbl.dim);
assert(vi >= 0);
exp.f = ad2.vtbl[vi].isFuncDeclaration();
assert(exp.f);
}
if (exp.f.needThis())
{
AggregateDeclaration ad = exp.f.toParent2().isAggregateDeclaration();
ue.e1 = getRightThis(exp.loc, sc, ad, ue.e1, exp.f);
if (ue.e1.op == TOKerror)
{
result = ue.e1;
return;
}
ethis = ue.e1;
tthis = ue.e1.type;
if (!(exp.f.type.ty == Tfunction && (cast(TypeFunction)exp.f.type).isscope))
{
if (global.params.vsafe && checkParamArgumentEscape(sc, exp.f, Id.This, ethis, false))
{
result = new ErrorExp();
return;
}
}
}
/* Cannot call public functions from inside invariant
* (because then the invariant would have infinite recursion)
*/
if (sc.func && sc.func.isInvariantDeclaration() && ue.e1.op == TOKthis && exp.f.addPostInvariant())
{
exp.error("cannot call public/export function %s from invariant", exp.f.toChars());
result = new ErrorExp();
return;
}
exp.checkDeprecated(sc, exp.f);
exp.checkPurity(sc, exp.f);
exp.checkSafety(sc, exp.f);
exp.checkNogc(sc, exp.f);
checkAccess(exp.loc, sc, ue.e1, exp.f);
if (!exp.f.needThis())
{
exp.e1 = Expression.combine(ue.e1, new VarExp(exp.loc, exp.f, false));
}
else
{
if (ue1old.checkRightThis(sc))
{
result = new ErrorExp();
return;
}
if (exp.e1.op == TOKdotvar)
{
dve.var = exp.f;
exp.e1.type = exp.f.type;
}
else
{
exp.e1 = new DotVarExp(exp.loc, dte.e1, exp.f, false);
exp.e1 = exp.e1.semantic(sc);
if (exp.e1.op == TOKerror)
{
result = new ErrorExp();
return;
}
ue = cast(UnaExp)exp.e1;
}
version (none)
{
printf("ue.e1 = %s\n", ue.e1.toChars());
printf("f = %s\n", exp.f.toChars());
printf("t = %s\n", t.toChars());
printf("e1 = %s\n", exp.e1.toChars());
printf("e1.type = %s\n", exp.e1.type.toChars());
}
// See if we need to adjust the 'this' pointer
AggregateDeclaration ad = exp.f.isThis();
ClassDeclaration cd = ue.e1.type.isClassHandle();
if (ad && cd && ad.isClassDeclaration())
{
if (ue.e1.op == TOKdottype)
{
ue.e1 = (cast(DotTypeExp)ue.e1).e1;
exp.directcall = true;
}
else if (ue.e1.op == TOKsuper)
exp.directcall = true;
else if ((cd.storage_class & STCfinal) != 0) // https://issues.dlang.org/show_bug.cgi?id=14211
exp.directcall = true;
if (ad != cd)
{
ue.e1 = ue.e1.castTo(sc, ad.type.addMod(ue.e1.type.mod));
ue.e1 = ue.e1.semantic(sc);
}
}
}
// If we've got a pointer to a function then deference it
// https://issues.dlang.org/show_bug.cgi?id=16483
if (exp.e1.type.ty == Tpointer && exp.e1.type.nextOf().ty == Tfunction)
{
Expression e = new PtrExp(exp.loc, exp.e1);
e.type = exp.e1.type.nextOf();
exp.e1 = e;
}
t1 = exp.e1.type;
}
else if (exp.e1.op == TOKsuper)
{
// Base class constructor call
auto ad = sc.func ? sc.func.isThis() : null;
auto cd = ad ? ad.isClassDeclaration() : null;
if (!cd || !cd.baseClass || !sc.func.isCtorDeclaration())
{
exp.error("super class constructor call must be in a constructor");
result = new ErrorExp();
return;
}
if (!cd.baseClass.ctor)
{
exp.error("no super class constructor for %s", cd.baseClass.toChars());
result = new ErrorExp();
return;
}
if (!sc.intypeof && !(sc.callSuper & CSXhalt))
{
if (sc.noctor || sc.callSuper & CSXlabel)
exp.error("constructor calls not allowed in loops or after labels");
if (sc.callSuper & (CSXsuper_ctor | CSXthis_ctor))
exp.error("multiple constructor calls");
if ((sc.callSuper & CSXreturn) && !(sc.callSuper & CSXany_ctor))
exp.error("an earlier return statement skips constructor");
sc.callSuper |= CSXany_ctor | CSXsuper_ctor;
}
tthis = cd.type.addMod(sc.func.type.mod);
if (auto os = cd.baseClass.ctor.isOverloadSet())
exp.f = resolveOverloadSet(exp.loc, sc, os, null, tthis, exp.arguments);
else
exp.f = resolveFuncCall(exp.loc, sc, cd.baseClass.ctor, null, tthis, exp.arguments, 0);
if (!exp.f || exp.f.errors)
{
result = new ErrorExp();
return;
}
exp.checkDeprecated(sc, exp.f);
exp.checkPurity(sc, exp.f);
exp.checkSafety(sc, exp.f);
exp.checkNogc(sc, exp.f);
checkAccess(exp.loc, sc, null, exp.f);
exp.e1 = new DotVarExp(exp.e1.loc, exp.e1, exp.f, false);
exp.e1 = exp.e1.semantic(sc);
t1 = exp.e1.type;
}
else if (exp.e1.op == TOKthis)
{
// same class constructor call
auto ad = sc.func ? sc.func.isThis() : null;
if (!ad || !sc.func.isCtorDeclaration())
{
exp.error("constructor call must be in a constructor");
result = new ErrorExp();
return;
}
if (!sc.intypeof && !(sc.callSuper & CSXhalt))
{
if (sc.noctor || sc.callSuper & CSXlabel)
exp.error("constructor calls not allowed in loops or after labels");
if (sc.callSuper & (CSXsuper_ctor | CSXthis_ctor))
exp.error("multiple constructor calls");
if ((sc.callSuper & CSXreturn) && !(sc.callSuper & CSXany_ctor))
exp.error("an earlier return statement skips constructor");
sc.callSuper |= CSXany_ctor | CSXthis_ctor;
}
tthis = ad.type.addMod(sc.func.type.mod);
if (auto os = ad.ctor.isOverloadSet())
exp.f = resolveOverloadSet(exp.loc, sc, os, null, tthis, exp.arguments);
else
exp.f = resolveFuncCall(exp.loc, sc, ad.ctor, null, tthis, exp.arguments, 0);
if (!exp.f || exp.f.errors)
{
result = new ErrorExp();
return;
}
exp.checkDeprecated(sc, exp.f);
exp.checkPurity(sc, exp.f);
exp.checkSafety(sc, exp.f);
exp.checkNogc(sc, exp.f);
//checkAccess(loc, sc, NULL, f); // necessary?
exp.e1 = new DotVarExp(exp.e1.loc, exp.e1, exp.f, false);
exp.e1 = exp.e1.semantic(sc);
t1 = exp.e1.type;
// BUG: this should really be done by checking the static
// call graph
if (exp.f == sc.func)
{
exp.error("cyclic constructor call");
result = new ErrorExp();
return;
}
}
else if (exp.e1.op == TOKoverloadset)
{
auto os = (cast(OverExp)exp.e1).vars;
exp.f = resolveOverloadSet(exp.loc, sc, os, tiargs, tthis, exp.arguments);
if (!exp.f)
{
result = new ErrorExp();
return;
}
if (ethis)
exp.e1 = new DotVarExp(exp.loc, ethis, exp.f, false);
else
exp.e1 = new VarExp(exp.loc, exp.f, false);
goto Lagain;
}
else if (!t1)
{
exp.error("function expected before (), not '%s'", exp.e1.toChars());
result = new ErrorExp();
return;
}
else if (t1.ty == Terror)
{
result = new ErrorExp();
return;
}
else if (t1.ty != Tfunction)
{
TypeFunction tf;
const(char)* p;
Dsymbol s;
exp.f = null;
if (exp.e1.op == TOKfunction)
{
// function literal that direct called is always inferred.
assert((cast(FuncExp)exp.e1).fd);
exp.f = (cast(FuncExp)exp.e1).fd;
tf = cast(TypeFunction)exp.f.type;
p = "function literal";
}
else if (t1.ty == Tdelegate)
{
TypeDelegate td = cast(TypeDelegate)t1;
assert(td.next.ty == Tfunction);
tf = cast(TypeFunction)td.next;
p = "delegate";
}
else if (t1.ty == Tpointer && (cast(TypePointer)t1).next.ty == Tfunction)
{
tf = cast(TypeFunction)(cast(TypePointer)t1).next;
p = "function pointer";
}
else if (exp.e1.op == TOKdotvar && (cast(DotVarExp)exp.e1).var.isOverDeclaration())
{
DotVarExp dve = cast(DotVarExp)exp.e1;
exp.f = resolveFuncCall(exp.loc, sc, dve.var, tiargs, dve.e1.type, exp.arguments, 2);
if (!exp.f)
{
result = new ErrorExp();
return;
}
if (exp.f.needThis())
{
dve.var = exp.f;
dve.type = exp.f.type;
dve.hasOverloads = false;
goto Lagain;
}
exp.e1 = new VarExp(dve.loc, exp.f, false);
Expression e = new CommaExp(exp.loc, dve.e1, exp);
result = e.semantic(sc);
return;
}
else if (exp.e1.op == TOKvar && (cast(VarExp)exp.e1).var.isOverDeclaration())
{
s = (cast(VarExp)exp.e1).var;
goto L2;
}
else if (exp.e1.op == TOKtemplate)
{
s = (cast(TemplateExp)exp.e1).td;
L2:
exp.f = resolveFuncCall(exp.loc, sc, s, tiargs, null, exp.arguments);
if (!exp.f || exp.f.errors)
{
result = new ErrorExp();
return;
}
if (exp.f.needThis())
{
if (hasThis(sc))
{
// Supply an implicit 'this', as in
// this.ident
exp.e1 = new DotVarExp(exp.loc, (new ThisExp(exp.loc)).semantic(sc), exp.f, false);
goto Lagain;
}
else if (isNeedThisScope(sc, exp.f))
{
exp.error("need 'this' for '%s' of type '%s'", exp.f.toChars(), exp.f.type.toChars());
result = new ErrorExp();
return;
}
}
exp.e1 = new VarExp(exp.e1.loc, exp.f, false);
goto Lagain;
}
else
{
exp.error("function expected before (), not %s of type %s", exp.e1.toChars(), exp.e1.type.toChars());
result = new ErrorExp();
return;
}
if (!tf.callMatch(null, exp.arguments))
{
OutBuffer buf;
buf.writeByte('(');
argExpTypesToCBuffer(&buf, exp.arguments);
buf.writeByte(')');
if (tthis)
tthis.modToBuffer(&buf);
//printf("tf = %s, args = %s\n", tf.deco, (*arguments)[0].type.deco);
.error(exp.loc, "%s %s %s is not callable using argument types %s", p, exp.e1.toChars(), parametersTypeToChars(tf.parameters, tf.varargs), buf.peekString());
result = new ErrorExp();
return;
}
// Purity and safety check should run after testing arguments matching
if (exp.f)
{
exp.checkPurity(sc, exp.f);
exp.checkSafety(sc, exp.f);
exp.checkNogc(sc, exp.f);
if (exp.f.checkNestedReference(sc, exp.loc))
{
result = new ErrorExp();
return;
}
}
else if (sc.func && sc.intypeof != 1 && !(sc.flags & SCOPEctfe))
{
bool err = false;
if (!tf.purity && !(sc.flags & SCOPEdebug) && sc.func.setImpure())
{
exp.error("pure %s '%s' cannot call impure %s '%s'",
sc.func.kind(), sc.func.toPrettyChars(), p, exp.e1.toChars());
err = true;
}
if (!tf.isnogc && sc.func.setGC())
{
exp.error("@nogc %s '%s' cannot call non-@nogc %s '%s'",
sc.func.kind(), sc.func.toPrettyChars(), p, exp.e1.toChars());
err = true;
}
if (tf.trust <= TRUSTsystem && sc.func.setUnsafe())
{
exp.error("@safe %s '%s' cannot call @system %s '%s'",
sc.func.kind(), sc.func.toPrettyChars(), p, exp.e1.toChars());
err = true;
}
if (err)
{
result = new ErrorExp();
return;
}
}
if (t1.ty == Tpointer)
{
Expression e = new PtrExp(exp.loc, exp.e1);
e.type = tf;
exp.e1 = e;
}
t1 = tf;
}
else if (exp.e1.op == TOKvar)
{
// Do overload resolution
VarExp ve = cast(VarExp)exp.e1;
exp.f = ve.var.isFuncDeclaration();
assert(exp.f);
tiargs = null;
if (ve.hasOverloads)
exp.f = resolveFuncCall(exp.loc, sc, exp.f, tiargs, null, exp.arguments, 2);
else
{
exp.f = exp.f.toAliasFunc();
TypeFunction tf = cast(TypeFunction)exp.f.type;
if (!tf.callMatch(null, exp.arguments))
{
OutBuffer buf;
buf.writeByte('(');
argExpTypesToCBuffer(&buf, exp.arguments);
buf.writeByte(')');
//printf("tf = %s, args = %s\n", tf.deco, (*arguments)[0].type.deco);
.error(exp.loc, "%s %s is not callable using argument types %s", exp.e1.toChars(), parametersTypeToChars(tf.parameters, tf.varargs), buf.peekString());
exp.f = null;
}
}
if (!exp.f || exp.f.errors)
{
result = new ErrorExp();
return;
}
if (exp.f.needThis())
{
// Change the ancestor lambdas to delegate before hasThis(sc) call.
if (exp.f.checkNestedReference(sc, exp.loc))
{
result = new ErrorExp();
return;
}
if (hasThis(sc))
{
// Supply an implicit 'this', as in
// this.ident
exp.e1 = new DotVarExp(exp.loc, (new ThisExp(exp.loc)).semantic(sc), ve.var);
// Note: we cannot use f directly, because further overload resolution
// through the supplied 'this' may cause different result.
goto Lagain;
}
else if (isNeedThisScope(sc, exp.f))
{
exp.error("need 'this' for '%s' of type '%s'", exp.f.toChars(), exp.f.type.toChars());
result = new ErrorExp();
return;
}
}
exp.checkDeprecated(sc, exp.f);
exp.checkPurity(sc, exp.f);
exp.checkSafety(sc, exp.f);
exp.checkNogc(sc, exp.f);
checkAccess(exp.loc, sc, null, exp.f);
if (exp.f.checkNestedReference(sc, exp.loc))
{
result = new ErrorExp();
return;
}
ethis = null;
tthis = null;
if (ve.hasOverloads)
{
exp.e1 = new VarExp(ve.loc, exp.f, false);
exp.e1.type = exp.f.type;
}
t1 = exp.f.type;
}
assert(t1.ty == Tfunction);
Expression argprefix;
if (!exp.arguments)
exp.arguments = new Expressions();
if (functionParameters(exp.loc, sc, cast(TypeFunction)t1, tthis, exp.arguments, exp.f, &exp.type, &argprefix))
{
result = new ErrorExp();
return;
}
if (!exp.type)
{
exp.e1 = e1org; // https://issues.dlang.org/show_bug.cgi?id=10922
// avoid recursive expression printing
exp.error("forward reference to inferred return type of function call '%s'", exp.toChars());
result = new ErrorExp();
return;
}
if (exp.f && exp.f.tintro)
{
Type t = exp.type;
int offset = 0;
TypeFunction tf = cast(TypeFunction)exp.f.tintro;
if (tf.next.isBaseOf(t, &offset) && offset)
{
exp.type = tf.next;
result = Expression.combine(argprefix, exp.castTo(sc, t));
return;
}
}
// Handle the case of a direct lambda call
if (exp.f && exp.f.isFuncLiteralDeclaration() && sc.func && !sc.intypeof)
{
exp.f.tookAddressOf = 0;
}
result = Expression.combine(argprefix, exp);
}
override void visit(DeclarationExp e)
{
if (e.type)
{
result = e;
return;
}
static if (LOGSEMANTIC)
{
printf("DeclarationExp::semantic() %s\n", e.toChars());
}
uint olderrors = global.errors;
/* This is here to support extern(linkage) declaration,
* where the extern(linkage) winds up being an AttribDeclaration
* wrapper.
*/
Dsymbol s = e.declaration;
while (1)
{
AttribDeclaration ad = s.isAttribDeclaration();
if (ad)
{
if (ad.decl && ad.decl.dim == 1)
{
s = (*ad.decl)[0];
continue;
}
}
break;
}
VarDeclaration v = s.isVarDeclaration();
if (v)
{
// Do semantic() on initializer first, so:
// int a = a;
// will be illegal.
e.declaration.semantic(sc);
s.parent = sc.parent;
}
//printf("inserting '%s' %p into sc = %p\n", s.toChars(), s, sc);
// Insert into both local scope and function scope.
// Must be unique in both.
if (s.ident)
{
if (!sc.insert(s))
{
e.error("declaration %s is already defined", s.toPrettyChars());
result = new ErrorExp();
return;
}
else if (sc.func)
{
// https://issues.dlang.org/show_bug.cgi?id=11720
// include Dataseg variables
if ((s.isFuncDeclaration() ||
s.isAggregateDeclaration() ||
s.isEnumDeclaration() ||
v && v.isDataseg()) && !sc.func.localsymtab.insert(s))
{
e.error("declaration %s is already defined in another scope in %s", s.toPrettyChars(), sc.func.toChars());
result = new ErrorExp();
return;
}
else
{
// Disallow shadowing
for (Scope* scx = sc.enclosing; scx && scx.func == sc.func; scx = scx.enclosing)
{
Dsymbol s2;
if (scx.scopesym && scx.scopesym.symtab && (s2 = scx.scopesym.symtab.lookup(s.ident)) !is null && s != s2)
{
// allow STClocal symbols to be shadowed
// TODO: not really an optimal design
auto decl = s2.isDeclaration();
if (!decl || !(decl.storage_class & STClocal))
{
e.error("%s %s is shadowing %s %s", s.kind(), s.ident.toChars(), s2.kind(), s2.toPrettyChars());
result = new ErrorExp();
return;
}
}
}
}
}
}
if (!s.isVarDeclaration())
{
Scope* sc2 = sc;
if (sc2.stc & (STCpure | STCnothrow | STCnogc))
sc2 = sc.push();
sc2.stc &= ~(STCpure | STCnothrow | STCnogc);
e.declaration.semantic(sc2);
if (sc2 != sc)
sc2.pop();
s.parent = sc.parent;
}
if (global.errors == olderrors)
{
e.declaration.semantic2(sc);
if (global.errors == olderrors)
{
e.declaration.semantic3(sc);
}
}
// todo: error in declaration should be propagated.
e.type = Type.tvoid;
result = e;
}
override void visit(TypeidExp exp)
{
static if (LOGSEMANTIC)
{
printf("TypeidExp::semantic() %s\n", exp.toChars());
}
Type ta = isType(exp.obj);
Expression ea = isExpression(exp.obj);
Dsymbol sa = isDsymbol(exp.obj);
//printf("ta %p ea %p sa %p\n", ta, ea, sa);
if (ta)
{
ta.resolve(exp.loc, sc, &ea, &ta, &sa, true);
}
if (ea)
{
if (auto sym = getDsymbol(ea))
ea = resolve(exp.loc, sc, sym, false);
else
ea = ea.semantic(sc);
ea = resolveProperties(sc, ea);
ta = ea.type;
if (ea.op == TOKtype)
ea = null;
}
if (!ta)
{
//printf("ta %p ea %p sa %p\n", ta, ea, sa);
exp.error("no type for typeid(%s)", ea ? ea.toChars() : (sa ? sa.toChars() : ""));
result = new ErrorExp();
return;
}
if (global.params.vcomplex)
ta.checkComplexTransition(exp.loc);
Expression e;
if (ea && ta.toBasetype().ty == Tclass)
{
/* Get the dynamic type, which is .classinfo
*/
ea = ea.semantic(sc);
e = new TypeidExp(ea.loc, ea);
e.type = Type.typeinfoclass.type;
}
else if (ta.ty == Terror)
{
e = new ErrorExp();
}
else
{
// Handle this in the glue layer
e = new TypeidExp(exp.loc, ta);
e.type = getTypeInfoType(ta, sc);
semanticTypeInfo(sc, ta);
if (ea)
{
e = new CommaExp(exp.loc, ea, e); // execute ea
e = e.semantic(sc);
}
}
result = e;
}
override void visit(TraitsExp e)
{
result = semanticTraits(e, sc);
}
override void visit(HaltExp e)
{
static if (LOGSEMANTIC)
{
printf("HaltExp::semantic()\n");
}
e.type = Type.tvoid;
result = e;
}
override void visit(IsExp e)
{
/* is(targ id tok tspec)
* is(targ id : tok2)
* is(targ id == tok2)
*/
//printf("IsExp::semantic(%s)\n", toChars());
if (e.id && !(sc.flags & SCOPEcondition))
{
e.error("can only declare type aliases within static if conditionals or static asserts");
result = new ErrorExp();
return;
}
Type tded = null;
Scope* sc2 = sc.copy(); // keep sc.flags
sc2.tinst = null;
sc2.minst = null;
sc2.flags |= SCOPEfullinst;
Type t = e.targ.trySemantic(e.loc, sc2);
sc2.pop();
if (!t)
goto Lno;
// errors, so condition is false
e.targ = t;
if (e.tok2 != TOKreserved)
{
switch (e.tok2)
{
case TOKstruct:
if (e.targ.ty != Tstruct)
goto Lno;
if ((cast(TypeStruct)e.targ).sym.isUnionDeclaration())
goto Lno;
tded = e.targ;
break;
case TOKunion:
if (e.targ.ty != Tstruct)
goto Lno;
if (!(cast(TypeStruct)e.targ).sym.isUnionDeclaration())
goto Lno;
tded = e.targ;
break;
case TOKclass:
if (e.targ.ty != Tclass)
goto Lno;
if ((cast(TypeClass)e.targ).sym.isInterfaceDeclaration())
goto Lno;
tded = e.targ;
break;
case TOKinterface:
if (e.targ.ty != Tclass)
goto Lno;
if (!(cast(TypeClass)e.targ).sym.isInterfaceDeclaration())
goto Lno;
tded = e.targ;
break;
case TOKconst:
if (!e.targ.isConst())
goto Lno;
tded = e.targ;
break;
case TOKimmutable:
if (!e.targ.isImmutable())
goto Lno;
tded = e.targ;
break;
case TOKshared:
if (!e.targ.isShared())
goto Lno;
tded = e.targ;
break;
case TOKwild:
if (!e.targ.isWild())
goto Lno;
tded = e.targ;
break;
case TOKsuper:
// If class or interface, get the base class and interfaces
if (e.targ.ty != Tclass)
goto Lno;
else
{
ClassDeclaration cd = (cast(TypeClass)e.targ).sym;
auto args = new Parameters();
args.reserve(cd.baseclasses.dim);
if (cd.semanticRun < PASSsemanticdone)
cd.semantic(null);
for (size_t i = 0; i < cd.baseclasses.dim; i++)
{
BaseClass* b = (*cd.baseclasses)[i];
args.push(new Parameter(STCin, b.type, null, null));
}
tded = new TypeTuple(args);
}
break;
case TOKenum:
if (e.targ.ty != Tenum)
goto Lno;
if (e.id)
tded = (cast(TypeEnum)e.targ).sym.getMemtype(e.loc);
else
tded = e.targ;
if (tded.ty == Terror)
{
result = new ErrorExp();
return;
}
break;
case TOKdelegate:
if (e.targ.ty != Tdelegate)
goto Lno;
tded = (cast(TypeDelegate)e.targ).next; // the underlying function type
break;
case TOKfunction:
case TOKparameters:
{
if (e.targ.ty != Tfunction)
goto Lno;
tded = e.targ;
/* Generate tuple from function parameter types.
*/
assert(tded.ty == Tfunction);
Parameters* params = (cast(TypeFunction)tded).parameters;
size_t dim = Parameter.dim(params);
auto args = new Parameters();
args.reserve(dim);
for (size_t i = 0; i < dim; i++)
{
Parameter arg = Parameter.getNth(params, i);
assert(arg && arg.type);
/* If one of the default arguments was an error,
don't return an invalid tuple
*/
if (e.tok2 == TOKparameters && arg.defaultArg && arg.defaultArg.op == TOKerror)
{
result = new ErrorExp();
return;
}
args.push(new Parameter(arg.storageClass, arg.type, (e.tok2 == TOKparameters) ? arg.ident : null, (e.tok2 == TOKparameters) ? arg.defaultArg : null));
}
tded = new TypeTuple(args);
break;
}
case TOKreturn:
/* Get the 'return type' for the function,
* delegate, or pointer to function.
*/
if (e.targ.ty == Tfunction)
tded = (cast(TypeFunction)e.targ).next;
else if (e.targ.ty == Tdelegate)
{
tded = (cast(TypeDelegate)e.targ).next;
tded = (cast(TypeFunction)tded).next;
}
else if (e.targ.ty == Tpointer && (cast(TypePointer)e.targ).next.ty == Tfunction)
{
tded = (cast(TypePointer)e.targ).next;
tded = (cast(TypeFunction)tded).next;
}
else
goto Lno;
break;
case TOKargTypes:
/* Generate a type tuple of the equivalent types used to determine if a
* function argument of this type can be passed in registers.
* The results of this are highly platform dependent, and intended
* primarly for use in implementing va_arg().
*/
tded = toArgTypes(e.targ);
if (!tded)
goto Lno;
// not valid for a parameter
break;
case TOKvector:
if (e.targ.ty != Tvector)
goto Lno;
tded = (cast(TypeVector)e.targ).basetype;
break;
default:
assert(0);
}
goto Lyes;
}
else if (e.tspec && !e.id && !(e.parameters && e.parameters.dim))
{
/* Evaluate to true if targ matches tspec
* is(targ == tspec)
* is(targ : tspec)
*/
e.tspec = e.tspec.semantic(e.loc, sc);
//printf("targ = %s, %s\n", targ.toChars(), targ.deco);
//printf("tspec = %s, %s\n", tspec.toChars(), tspec.deco);
if (e.tok == TOKcolon)
{
if (e.targ.implicitConvTo(e.tspec))
goto Lyes;
else
goto Lno;
}
else /* == */
{
if (e.targ.equals(e.tspec))
goto Lyes;
else
goto Lno;
}
}
else if (e.tspec)
{
/* Evaluate to true if targ matches tspec.
* If true, declare id as an alias for the specialized type.
* is(targ == tspec, tpl)
* is(targ : tspec, tpl)
* is(targ id == tspec)
* is(targ id : tspec)
* is(targ id == tspec, tpl)
* is(targ id : tspec, tpl)
*/
Identifier tid = e.id ? e.id : Identifier.generateId("__isexp_id");
e.parameters.insert(0, new TemplateTypeParameter(e.loc, tid, null, null));
Objects dedtypes;
dedtypes.setDim(e.parameters.dim);
dedtypes.zero();
MATCH m = deduceType(e.targ, sc, e.tspec, e.parameters, &dedtypes);
//printf("targ: %s\n", targ.toChars());
//printf("tspec: %s\n", tspec.toChars());
if (m <= MATCHnomatch || (m != MATCHexact && e.tok == TOKequal))
{
goto Lno;
}
else
{
tded = cast(Type)dedtypes[0];
if (!tded)
tded = e.targ;
Objects tiargs;
tiargs.setDim(1);
tiargs[0] = e.targ;
/* Declare trailing parameters
*/
for (size_t i = 1; i < e.parameters.dim; i++)
{
TemplateParameter tp = (*e.parameters)[i];
Declaration s = null;
m = tp.matchArg(e.loc, sc, &tiargs, i, e.parameters, &dedtypes, &s);
if (m <= MATCHnomatch)
goto Lno;
s.semantic(sc);
if (sc.sds)
s.addMember(sc, sc.sds);
else if (!sc.insert(s))
e.error("declaration %s is already defined", s.toChars());
unSpeculative(sc, s);
}
goto Lyes;
}
}
else if (e.id)
{
/* Declare id as an alias for type targ. Evaluate to true
* is(targ id)
*/
tded = e.targ;
goto Lyes;
}
Lyes:
if (e.id)
{
Dsymbol s;
Tuple tup = isTuple(tded);
if (tup)
s = new TupleDeclaration(e.loc, e.id, &tup.objects);
else
s = new AliasDeclaration(e.loc, e.id, tded);
s.semantic(sc);
/* The reason for the !tup is unclear. It fails Phobos unittests if it is not there.
* More investigation is needed.
*/
if (!tup && !sc.insert(s))
e.error("declaration %s is already defined", s.toChars());
if (sc.sds)
s.addMember(sc, sc.sds);
unSpeculative(sc, s);
}
//printf("Lyes\n");
result = new IntegerExp(e.loc, 1, Type.tbool);
return;
Lno:
//printf("Lno\n");
result = new IntegerExp(e.loc, 0, Type.tbool);
}
override void visit(BinAssignExp exp)
{
if (exp.type)
{
result = exp;
return;
}
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
if (exp.e1.checkReadModifyWrite(exp.op, exp.e2))
{
result = new ErrorExp();
return;
}
if (exp.e1.op == TOKarraylength)
{
// arr.length op= e2;
e = ArrayLengthExp.rewriteOpAssign(exp);
e = e.semantic(sc);
result = e;
return;
}
if (exp.e1.op == TOKslice || exp.e1.type.ty == Tarray || exp.e1.type.ty == Tsarray)
{
if (checkNonAssignmentArrayOp(exp.e1))
{
result = new ErrorExp();
return;
}
if (exp.e1.op == TOKslice)
(cast(SliceExp)exp.e1).arrayop = true;
// T[] op= ...
if (exp.e2.implicitConvTo(exp.e1.type.nextOf()))
{
// T[] op= T
exp.e2 = exp.e2.castTo(sc, exp.e1.type.nextOf());
}
else if (Expression ex = typeCombine(exp, sc))
{
result = ex;
return;
}
exp.type = exp.e1.type;
result = arrayOp(exp, sc);
return;
}
exp.e1 = exp.e1.semantic(sc);
exp.e1 = exp.e1.optimize(WANTvalue);
exp.e1 = exp.e1.modifiableLvalue(sc, exp.e1);
exp.type = exp.e1.type;
if (exp.checkScalar())
{
result = new ErrorExp();
return;
}
int arith = (exp.op == TOKaddass || exp.op == TOKminass || exp.op == TOKmulass || exp.op == TOKdivass || exp.op == TOKmodass || exp.op == TOKpowass);
int bitwise = (exp.op == TOKandass || exp.op == TOKorass || exp.op == TOKxorass);
int shift = (exp.op == TOKshlass || exp.op == TOKshrass || exp.op == TOKushrass);
if (bitwise && exp.type.toBasetype().ty == Tbool)
exp.e2 = exp.e2.implicitCastTo(sc, exp.type);
else if (exp.checkNoBool())
{
result = new ErrorExp();
return;
}
if ((exp.op == TOKaddass || exp.op == TOKminass) && exp.e1.type.toBasetype().ty == Tpointer && exp.e2.type.toBasetype().isintegral())
{
result = scaleFactor(exp, sc);
return;
}
if (Expression ex = typeCombine(exp, sc))
{
result = ex;
return;
}
if (arith && exp.checkArithmeticBin())
{
result = new ErrorExp();
return;
}
if ((bitwise || shift) && exp.checkIntegralBin())
{
result = new ErrorExp();
return;
}
if (shift)
{
if (exp.e2.type.toBasetype().ty != Tvector)
exp.e2 = exp.e2.castTo(sc, Type.tshiftcnt);
}
if (!Target.isVectorOpSupported(exp.type.toBasetype(), exp.op, exp.e2.type.toBasetype()))
{
result = exp.incompatibleTypes();
return;
}
if (exp.e1.op == TOKerror || exp.e2.op == TOKerror)
{
result = new ErrorExp();
return;
}
e = exp.checkOpAssignTypes(sc);
if (e.op == TOKerror)
{
result = e;
return;
}
assert(e.op == TOKassign || e == exp);
result = (cast(BinExp)e).reorderSettingAAElem(sc);
}
override void visit(CompileExp exp)
{
static if (LOGSEMANTIC)
{
printf("CompileExp::semantic('%s')\n", exp.toChars());
}
auto se = semanticString(sc, exp.e1, "argument to mixin");
if (!se)
{
result = new ErrorExp();
return;
}
se = se.toUTF8(sc);
uint errors = global.errors;
scope p = new Parser!ASTCodegen(exp.loc, sc._module, se.toStringz(), false);
p.nextToken();
//printf("p.loc.linnum = %d\n", p.loc.linnum);
Expression e = p.parseExpression();
if (p.errors)
{
assert(global.errors != errors); // should have caught all these cases
result = new ErrorExp();
return;
}
if (p.token.value != TOKeof)
{
exp.error("incomplete mixin expression (%s)", se.toChars());
result = new ErrorExp();
return;
}
result = e.semantic(sc);
}
override void visit(ImportExp e)
{
static if (LOGSEMANTIC)
{
printf("ImportExp::semantic('%s')\n", e.toChars());
}
auto se = semanticString(sc, e.e1, "file name argument");
if (!se)
{
result = new ErrorExp();
return;
}
se = se.toUTF8(sc);
auto namez = se.toStringz().ptr;
if (!global.params.fileImppath)
{
e.error("need -Jpath switch to import text file %s", namez);
result = new ErrorExp();
return;
}
/* Be wary of CWE-22: Improper Limitation of a Pathname to a Restricted Directory
* ('Path Traversal') attacks.
* http://cwe.mitre.org/data/definitions/22.html
*/
auto name = FileName.safeSearchPath(global.filePath, namez);
if (!name)
{
e.error("file %s cannot be found or not in a path specified with -J", se.toChars());
result = new ErrorExp();
return;
}
if (global.params.verbose)
fprintf(global.stdmsg, "file %.*s\t(%s)\n", cast(int)se.len, se.string, name);
if (global.params.moduleDeps !is null)
{
OutBuffer* ob = global.params.moduleDeps;
Module imod = sc.instantiatingModule();
if (!global.params.moduleDepsFile)
ob.writestring("depsFile ");
ob.writestring(imod.toPrettyChars());
ob.writestring(" (");
escapePath(ob, imod.srcfile.toChars());
ob.writestring(") : ");
if (global.params.moduleDepsFile)
ob.writestring("string : ");
ob.write(se.string, se.len);
ob.writestring(" (");
escapePath(ob, name);
ob.writestring(")");
ob.writenl();
}
{
auto f = File(name);
if (f.read())
{
e.error("cannot read file %s", f.toChars());
result = new ErrorExp();
return;
}
else
{
f._ref = 1;
se = new StringExp(e.loc, f.buffer, f.len);
}
}
result = se.semantic(sc);
}
override void visit(AssertExp exp)
{
static if (LOGSEMANTIC)
{
printf("AssertExp::semantic('%s')\n", exp.toChars());
}
if (Expression ex = unaSemantic(exp, sc))
{
result = ex;
return;
}
exp.e1 = resolveProperties(sc, exp.e1);
// BUG: see if we can do compile time elimination of the Assert
exp.e1 = exp.e1.optimize(WANTvalue);
exp.e1 = exp.e1.toBoolean(sc);
if (exp.msg)
{
exp.msg = exp.msg.semantic(sc);
exp.msg = resolveProperties(sc, exp.msg);
exp.msg = exp.msg.implicitCastTo(sc, Type.tchar.constOf().arrayOf());
exp.msg = exp.msg.optimize(WANTvalue);
}
if (exp.e1.op == TOKerror)
{
result = exp.e1;
return;
}
if (exp.msg && exp.msg.op == TOKerror)
{
result = exp.msg;
return;
}
auto f1 = checkNonAssignmentArrayOp(exp.e1);
auto f2 = exp.msg && checkNonAssignmentArrayOp(exp.msg);
if (f1 || f2)
{
result = new ErrorExp();
return;
}
if (exp.e1.isBool(false))
{
FuncDeclaration fd = sc.parent.isFuncDeclaration();
if (fd)
fd.hasReturnExp |= 4;
sc.callSuper |= CSXhalt;
if (sc.fieldinit)
{
for (size_t i = 0; i < sc.fieldinit_dim; i++)
sc.fieldinit[i] |= CSXhalt;
}
if (!global.params.useAssert)
{
Expression e = new HaltExp(exp.loc);
e = e.semantic(sc);
result = e;
return;
}
}
exp.type = Type.tvoid;
result = exp;
}
override void visit(DotIdExp exp)
{
static if (LOGSEMANTIC)
{
printf("DotIdExp::semantic(this = %p, '%s')\n", exp, exp.toChars());
//printf("e1.op = %d, '%s'\n", e1.op, Token::toChars(e1.op));
}
Expression e = exp.semanticY(sc, 1);
if (e && isDotOpDispatch(e))
{
uint errors = global.startGagging();
e = resolvePropertiesX(sc, e);
if (global.endGagging(errors))
e = null; /* fall down to UFCS */
else
{
result = e;
return;
}
}
if (!e) // if failed to find the property
{
/* If ident is not a valid property, rewrite:
* e1.ident
* as:
* .ident(e1)
*/
e = resolveUFCSProperties(sc, exp);
}
result = e;
}
override void visit(DotTemplateExp e)
{
if (Expression ex = unaSemantic(e, sc))
{
result = ex;
return;
}
result = e;
}
override void visit(DotVarExp exp)
{
static if (LOGSEMANTIC)
{
printf("DotVarExp::semantic('%s')\n", exp.toChars());
}
if (exp.type)
{
result = exp;
return;
}
exp.var = exp.var.toAlias().isDeclaration();
exp.e1 = exp.e1.semantic(sc);
if (auto tup = exp.var.isTupleDeclaration())
{
/* Replace:
* e1.tuple(a, b, c)
* with:
* tuple(e1.a, e1.b, e1.c)
*/
Expression e0;
Expression ev = sc.func ? extractSideEffect(sc, "__tup", e0, exp.e1) : exp.e1;
auto exps = new Expressions();
exps.reserve(tup.objects.dim);
for (size_t i = 0; i < tup.objects.dim; i++)
{
RootObject o = (*tup.objects)[i];
Expression e;
if (o.dyncast() == DYNCAST.expression)
{
e = cast(Expression)o;
if (e.op == TOKdsymbol)
{
Dsymbol s = (cast(DsymbolExp)e).s;
e = new DotVarExp(exp.loc, ev, s.isDeclaration());
}
}
else if (o.dyncast() == DYNCAST.dsymbol)
{
e = new DsymbolExp(exp.loc, cast(Dsymbol)o);
}
else if (o.dyncast() == DYNCAST.type)
{
e = new TypeExp(exp.loc, cast(Type)o);
}
else
{
exp.error("%s is not an expression", o.toChars());
result = new ErrorExp();
return;
}
exps.push(e);
}
Expression e = new TupleExp(exp.loc, e0, exps);
e = e.semantic(sc);
result = e;
return;
}
exp.e1 = exp.e1.addDtorHook(sc);
Type t1 = exp.e1.type;
if (FuncDeclaration fd = exp.var.isFuncDeclaration())
{
// for functions, do checks after overload resolution
if (!fd.functionSemantic())
{
result = new ErrorExp();
return;
}
/* https://issues.dlang.org/show_bug.cgi?id=13843
* If fd obviously has no overloads, we should
* normalize AST, and it will give a chance to wrap fd with FuncExp.
*/
if (fd.isNested() || fd.isFuncLiteralDeclaration())
{
// (e1, fd)
auto e = resolve(exp.loc, sc, fd, false);
result = Expression.combine(exp.e1, e);
return;
}
exp.type = fd.type;
assert(exp.type);
}
else if (OverDeclaration od = exp.var.isOverDeclaration())
{
exp.type = Type.tvoid; // ambiguous type?
}
else
{
exp.type = exp.var.type;
if (!exp.type && global.errors)
{
// var is goofed up, just return 0
result = new ErrorExp();
return;
}
assert(exp.type);
if (t1.ty == Tpointer)
t1 = t1.nextOf();
exp.type = exp.type.addMod(t1.mod);
Dsymbol vparent = exp.var.toParent();
AggregateDeclaration ad = vparent ? vparent.isAggregateDeclaration() : null;
if (Expression e1x = getRightThis(exp.loc, sc, ad, exp.e1, exp.var, 1))
exp.e1 = e1x;
else
{
/* Later checkRightThis will report correct error for invalid field variable access.
*/
Expression e = new VarExp(exp.loc, exp.var);
e = e.semantic(sc);
result = e;
return;
}
checkAccess(exp.loc, sc, exp.e1, exp.var);
VarDeclaration v = exp.var.isVarDeclaration();
if (v && (v.isDataseg() || (v.storage_class & STCmanifest)))
{
Expression e = expandVar(WANTvalue, v);
if (e)
{
result = e;
return;
}
}
if (v && v.isDataseg()) // fix https://issues.dlang.org/show_bug.cgi?id=8238
{
// (e1, v)
checkAccess(exp.loc, sc, exp.e1, v);
Expression e = new VarExp(exp.loc, v);
e = new CommaExp(exp.loc, exp.e1, e);
e = e.semantic(sc);
result = e;
return;
}
}
//printf("-DotVarExp::semantic('%s')\n", toChars());
result = exp;
}
override void visit(DotTemplateInstanceExp exp)
{
static if (LOGSEMANTIC)
{
printf("DotTemplateInstanceExp::semantic('%s')\n", exp.toChars());
}
// Indicate we need to resolve by UFCS.
Expression e = exp.semanticY(sc, 1);
if (!e)
e = resolveUFCSProperties(sc, exp);
result = e;
}
override void visit(DelegateExp e)
{
static if (LOGSEMANTIC)
{
printf("DelegateExp::semantic('%s')\n", e.toChars());
}
if (e.type)
{
result = e;
return;
}
e.e1 = e.e1.semantic(sc);
e.type = new TypeDelegate(e.func.type);
e.type = e.type.semantic(e.loc, sc);
FuncDeclaration f = e.func.toAliasFunc();
AggregateDeclaration ad = f.toParent().isAggregateDeclaration();
if (f.needThis())
e.e1 = getRightThis(e.loc, sc, ad, e.e1, f);
if (f.type.ty == Tfunction)
{
TypeFunction tf = cast(TypeFunction)f.type;
if (!MODmethodConv(e.e1.type.mod, f.type.mod))
{
OutBuffer thisBuf, funcBuf;
MODMatchToBuffer(&thisBuf, e.e1.type.mod, tf.mod);
MODMatchToBuffer(&funcBuf, tf.mod, e.e1.type.mod);
e.error("%smethod %s is not callable using a %s%s",
funcBuf.peekString(), f.toPrettyChars(), thisBuf.peekString(), e.e1.toChars());
result = new ErrorExp();
return;
}
}
if (ad && ad.isClassDeclaration() && ad.type != e.e1.type)
{
// A downcast is required for interfaces
// https://issues.dlang.org/show_bug.cgi?id=3706
e.e1 = new CastExp(e.loc, e.e1, ad.type);
e.e1 = e.e1.semantic(sc);
}
result = e;
}
override void visit(DotTypeExp exp)
{
static if (LOGSEMANTIC)
{
printf("DotTypeExp::semantic('%s')\n", exp.toChars());
}
if (exp.type)
{
result = exp;
return;
}
if (auto e = unaSemantic(exp, sc))
{
result = e;
return;
}
exp.type = exp.sym.getType().addMod(exp.e1.type.mod);
result = exp;
}
override void visit(AddrExp exp)
{
static if (LOGSEMANTIC)
{
printf("AddrExp::semantic('%s')\n", exp.toChars());
}
if (exp.type)
{
result = exp;
return;
}
if (Expression ex = unaSemantic(exp, sc))
{
result = ex;
return;
}
int wasCond = exp.e1.op == TOKquestion;
if (exp.e1.op == TOKdotti)
{
DotTemplateInstanceExp dti = cast(DotTemplateInstanceExp)exp.e1;
TemplateInstance ti = dti.ti;
{
//assert(ti.needsTypeInference(sc));
ti.semantic(sc);
if (!ti.inst || ti.errors) // if template failed to expand
{
result = new ErrorExp();
return;
}
Dsymbol s = ti.toAlias();
FuncDeclaration f = s.isFuncDeclaration();
if (f)
{
exp.e1 = new DotVarExp(exp.e1.loc, dti.e1, f);
exp.e1 = exp.e1.semantic(sc);
}
}
}
else if (exp.e1.op == TOKscope)
{
TemplateInstance ti = (cast(ScopeExp)exp.e1).sds.isTemplateInstance();
if (ti)
{
//assert(ti.needsTypeInference(sc));
ti.semantic(sc);
if (!ti.inst || ti.errors) // if template failed to expand
{
result = new ErrorExp();
return;
}
Dsymbol s = ti.toAlias();
FuncDeclaration f = s.isFuncDeclaration();
if (f)
{
exp.e1 = new VarExp(exp.e1.loc, f);
exp.e1 = exp.e1.semantic(sc);
}
}
}
exp.e1 = exp.e1.toLvalue(sc, null);
if (exp.e1.op == TOKerror)
{
result = exp.e1;
return;
}
if (checkNonAssignmentArrayOp(exp.e1))
{
result = new ErrorExp();
return;
}
if (!exp.e1.type)
{
exp.error("cannot take address of %s", exp.e1.toChars());
result = new ErrorExp();
return;
}
bool hasOverloads;
if (auto f = isFuncAddress(exp, &hasOverloads))
{
if (!hasOverloads && f.checkForwardRef(exp.loc))
{
result = new ErrorExp();
return;
}
}
else if (!exp.e1.type.deco)
{
if (exp.e1.op == TOKvar)
{
VarExp ve = cast(VarExp)exp.e1;
Declaration d = ve.var;
exp.error("forward reference to %s %s", d.kind(), d.toChars());
}
else
exp.error("forward reference to %s", exp.e1.toChars());
result = new ErrorExp();
return;
}
exp.type = exp.e1.type.pointerTo();
// See if this should really be a delegate
if (exp.e1.op == TOKdotvar)
{
DotVarExp dve = cast(DotVarExp)exp.e1;
FuncDeclaration f = dve.var.isFuncDeclaration();
if (f)
{
f = f.toAliasFunc(); // FIXME, should see overloads
// https://issues.dlang.org/show_bug.cgi?id=1983
if (!dve.hasOverloads)
f.tookAddressOf++;
Expression e;
if (f.needThis())
e = new DelegateExp(exp.loc, dve.e1, f, dve.hasOverloads);
else // It is a function pointer. Convert &v.f() --> (v, &V.f())
e = new CommaExp(exp.loc, dve.e1, new AddrExp(exp.loc, new VarExp(exp.loc, f, dve.hasOverloads)));
e = e.semantic(sc);
result = e;
return;
}
// Look for misaligned pointer in @safe mode
if (checkUnsafeAccess(sc, dve, !exp.type.isMutable(), true))
{
result = new ErrorExp();
return;
}
if (dve.e1.op == TOKvar && global.params.vsafe)
{
VarExp ve = cast(VarExp)dve.e1;
VarDeclaration v = ve.var.isVarDeclaration();
if (v)
{
if (!checkAddressVar(sc, exp, v))
{
result = new ErrorExp();
return;
}
}
}
else if ((dve.e1.op == TOKthis || dve.e1.op == TOKsuper) && global.params.vsafe)
{
ThisExp ve = cast(ThisExp)dve.e1;
VarDeclaration v = ve.var.isVarDeclaration();
if (v && v.storage_class & STCref)
{
if (!checkAddressVar(sc, exp, v))
{
result = new ErrorExp();
return;
}
}
}
}
else if (exp.e1.op == TOKvar)
{
VarExp ve = cast(VarExp)exp.e1;
VarDeclaration v = ve.var.isVarDeclaration();
if (v)
{
if (!checkAddressVar(sc, exp, v))
{
result = new ErrorExp();
return;
}
ve.checkPurity(sc, v);
}
FuncDeclaration f = ve.var.isFuncDeclaration();
if (f)
{
/* Because nested functions cannot be overloaded,
* mark here that we took its address because castTo()
* may not be called with an exact match.
*/
if (!ve.hasOverloads || f.isNested())
f.tookAddressOf++;
if (f.isNested())
{
if (f.isFuncLiteralDeclaration())
{
if (!f.FuncDeclaration.isNested())
{
/* Supply a 'null' for a this pointer if no this is available
*/
Expression e = new DelegateExp(exp.loc, new NullExp(exp.loc, Type.tnull), f, ve.hasOverloads);
e = e.semantic(sc);
result = e;
return;
}
}
Expression e = new DelegateExp(exp.loc, exp.e1, f, ve.hasOverloads);
e = e.semantic(sc);
result = e;
return;
}
if (f.needThis())
{
if (hasThis(sc))
{
/* Should probably supply 'this' after overload resolution,
* not before.
*/
Expression ethis = new ThisExp(exp.loc);
Expression e = new DelegateExp(exp.loc, ethis, f, ve.hasOverloads);
e = e.semantic(sc);
result = e;
return;
}
if (sc.func && !sc.intypeof)
{
if (sc.func.setUnsafe())
{
exp.error("'this' reference necessary to take address of member %s in @safe function %s", f.toChars(), sc.func.toChars());
}
}
}
}
}
else if ((exp.e1.op == TOKthis || exp.e1.op == TOKsuper) && global.params.vsafe)
{
ThisExp ve = cast(ThisExp)exp.e1;
VarDeclaration v = ve.var.isVarDeclaration();
if (v)
{
if (!checkAddressVar(sc, exp, v))
{
result = new ErrorExp();
return;
}
}
}
else if (exp.e1.op == TOKcall)
{
CallExp ce = cast(CallExp)exp.e1;
if (ce.e1.type.ty == Tfunction)
{
TypeFunction tf = cast(TypeFunction)ce.e1.type;
if (tf.isref && sc.func && !sc.intypeof && sc.func.setUnsafe())
{
exp.error("cannot take address of ref return of %s() in @safe function %s",
ce.e1.toChars(), sc.func.toChars());
}
}
}
else if (exp.e1.op == TOKindex)
{
/* For:
* int[3] a;
* &a[i]
* check 'a' the same as for a regular variable
*/
IndexExp ei = cast(IndexExp)exp.e1;
Type tyi = ei.e1.type.toBasetype();
if (tyi.ty == Tsarray && ei.e1.op == TOKvar)
{
VarExp ve = cast(VarExp)ei.e1;
VarDeclaration v = ve.var.isVarDeclaration();
if (v)
{
if (!checkAddressVar(sc, exp, v))
{
result = new ErrorExp();
return;
}
ve.checkPurity(sc, v);
}
}
}
else if (wasCond)
{
/* a ? b : c was transformed to *(a ? &b : &c), but we still
* need to do safety checks
*/
assert(exp.e1.op == TOKstar);
PtrExp pe = cast(PtrExp)exp.e1;
assert(pe.e1.op == TOKquestion);
CondExp ce = cast(CondExp)pe.e1;
assert(ce.e1.op == TOKaddress);
assert(ce.e2.op == TOKaddress);
// Re-run semantic on the address expressions only
ce.e1.type = null;
ce.e1 = ce.e1.semantic(sc);
ce.e2.type = null;
ce.e2 = ce.e2.semantic(sc);
}
result = exp.optimize(WANTvalue);
}
override void visit(PtrExp exp)
{
static if (LOGSEMANTIC)
{
printf("PtrExp::semantic('%s')\n", exp.toChars());
}
if (exp.type)
{
result = exp;
return;
}
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
Type tb = exp.e1.type.toBasetype();
switch (tb.ty)
{
case Tpointer:
exp.type = (cast(TypePointer)tb).next;
break;
case Tsarray:
case Tarray:
if (isNonAssignmentArrayOp(exp.e1))
goto default;
exp.error("using * on an array is no longer supported; use *(%s).ptr instead", exp.e1.toChars());
exp.type = (cast(TypeArray)tb).next;
exp.e1 = exp.e1.castTo(sc, exp.type.pointerTo());
break;
default:
exp.error("can only * a pointer, not a '%s'", exp.e1.type.toChars());
goto case Terror;
case Terror:
{
result = new ErrorExp();
return;
}
}
if (exp.checkValue())
{
result = new ErrorExp();
return;
}
result = exp;
}
override void visit(NegExp exp)
{
static if (LOGSEMANTIC)
{
printf("NegExp::semantic('%s')\n", exp.toChars());
}
if (exp.type)
{
result = exp;
return;
}
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
exp.type = exp.e1.type;
Type tb = exp.type.toBasetype();
if (tb.ty == Tarray || tb.ty == Tsarray)
{
if (!isArrayOpValid(exp.e1))
{
result = arrayOpInvalidError(exp);
return;
}
result = exp;
return;
}
if (!Target.isVectorOpSupported(tb, exp.op))
{
result = exp.incompatibleTypes();
return;
}
if (exp.e1.checkNoBool())
{
result = new ErrorExp();
return;
}
if (exp.e1.checkArithmetic())
{
result = new ErrorExp();
return;
}
result = exp;
}
override void visit(UAddExp exp)
{
static if (LOGSEMANTIC)
{
printf("UAddExp::semantic('%s')\n", exp.toChars());
}
assert(!exp.type);
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
if (!Target.isVectorOpSupported(exp.e1.type.toBasetype(), exp.op))
{
result = exp.incompatibleTypes();
return;
}
if (exp.e1.checkNoBool())
{
result = new ErrorExp();
return;
}
if (exp.e1.checkArithmetic())
{
result = new ErrorExp();
return;
}
result = exp.e1;
}
override void visit(ComExp exp)
{
if (exp.type)
{
result = exp;
return;
}
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
exp.type = exp.e1.type;
Type tb = exp.type.toBasetype();
if (tb.ty == Tarray || tb.ty == Tsarray)
{
if (!isArrayOpValid(exp.e1))
{
result = arrayOpInvalidError(exp);
return;
}
result = exp;
return;
}
if (!Target.isVectorOpSupported(tb, exp.op))
{
result = exp.incompatibleTypes();
return;
}
if (exp.e1.checkNoBool())
{
result = new ErrorExp();
return;
}
if (exp.e1.checkIntegral())
{
result = new ErrorExp();
return;
}
result = exp;
}
override void visit(NotExp e)
{
if (e.type)
{
result = e;
return;
}
e.setNoderefOperand();
// Note there is no operator overload
if (Expression ex = unaSemantic(e, sc))
{
result = ex;
return;
}
// for static alias this: https://issues.dlang.org/show_bug.cgi?id=17684
if (e.e1.op == TOKtype)
e.e1 = resolveAliasThis(sc, e.e1);
e.e1 = resolveProperties(sc, e.e1);
e.e1 = e.e1.toBoolean(sc);
if (e.e1.type == Type.terror)
{
result = e.e1;
return;
}
if (!Target.isVectorOpSupported(e.e1.type.toBasetype(), e.op))
{
result = e.incompatibleTypes();
}
// https://issues.dlang.org/show_bug.cgi?id=13910
// Today NotExp can take an array as its operand.
if (checkNonAssignmentArrayOp(e.e1))
{
result = new ErrorExp();
return;
}
e.type = Type.tbool;
result = e;
}
override void visit(DeleteExp exp)
{
if (Expression ex = unaSemantic(exp, sc))
{
result = ex;
return;
}
exp.e1 = resolveProperties(sc, exp.e1);
exp.e1 = exp.e1.modifiableLvalue(sc, null);
if (exp.e1.op == TOKerror)
{
result = exp.e1;
return;
}
exp.type = Type.tvoid;
AggregateDeclaration ad = null;
Type tb = exp.e1.type.toBasetype();
switch (tb.ty)
{
case Tclass:
{
auto cd = (cast(TypeClass)tb).sym;
if (cd.isCOMinterface())
{
/* Because COM classes are deleted by IUnknown.Release()
*/
exp.error("cannot delete instance of COM interface %s", cd.toChars());
result = new ErrorExp();
return;
}
ad = cd;
break;
}
case Tpointer:
tb = (cast(TypePointer)tb).next.toBasetype();
if (tb.ty == Tstruct)
{
ad = (cast(TypeStruct)tb).sym;
auto f = ad.aggDelete;
auto fd = ad.dtor;
if (!f)
{
semanticTypeInfo(sc, tb);
break;
}
/* Construct:
* ea = copy e1 to a tmp to do side effects only once
* eb = call destructor
* ec = call deallocator
*/
Expression ea = null;
Expression eb = null;
Expression ec = null;
VarDeclaration v = null;
if (fd && f)
{
v = copyToTemp(0, "__tmpea", exp.e1);
v.semantic(sc);
ea = new DeclarationExp(exp.loc, v);
ea.type = v.type;
}
if (fd)
{
Expression e = ea ? new VarExp(exp.loc, v) : exp.e1;
e = new DotVarExp(Loc(), e, fd, false);
eb = new CallExp(exp.loc, e);
eb = eb.semantic(sc);
}
if (f)
{
Type tpv = Type.tvoid.pointerTo();
Expression e = ea ? new VarExp(exp.loc, v) : exp.e1.castTo(sc, tpv);
e = new CallExp(exp.loc, new VarExp(exp.loc, f, false), e);
ec = e.semantic(sc);
}
ea = Expression.combine(ea, eb);
ea = Expression.combine(ea, ec);
assert(ea);
result = ea;
return;
}
break;
case Tarray:
{
Type tv = tb.nextOf().baseElemOf();
if (tv.ty == Tstruct)
{
ad = (cast(TypeStruct)tv).sym;
if (ad.dtor)
semanticTypeInfo(sc, ad.type);
}
break;
}
default:
exp.error("cannot delete type %s", exp.e1.type.toChars());
result = new ErrorExp();
return;
}
bool err = false;
if (ad)
{
if (ad.dtor)
{
err |= exp.checkPurity(sc, ad.dtor);
err |= exp.checkSafety(sc, ad.dtor);
err |= exp.checkNogc(sc, ad.dtor);
}
if (ad.aggDelete && tb.ty != Tarray)
{
err |= exp.checkPurity(sc, ad.aggDelete);
err |= exp.checkSafety(sc, ad.aggDelete);
err |= exp.checkNogc(sc, ad.aggDelete);
}
if (err)
{
result = new ErrorExp();
return;
}
}
if (!sc.intypeof && sc.func &&
!exp.isRAII &&
sc.func.setUnsafe())
{
exp.error("%s is not @safe but is used in @safe function %s", exp.toChars(), sc.func.toChars());
err = true;
}
if (err)
{
result = new ErrorExp();
return;
}
result = exp;
}
override void visit(CastExp exp)
{
static if (LOGSEMANTIC)
{
printf("CastExp::semantic('%s')\n", exp.toChars());
}
//static int x; assert(++x < 10);
if (exp.type)
{
result = exp;
return;
}
if (exp.to)
{
exp.to = exp.to.semantic(exp.loc, sc);
if (exp.to == Type.terror)
{
result = new ErrorExp();
return;
}
if (!exp.to.hasPointers())
exp.setNoderefOperand();
// When e1 is a template lambda, this cast may instantiate it with
// the type 'to'.
exp.e1 = inferType(exp.e1, exp.to);
}
if (auto e = unaSemantic(exp, sc))
{
result = e;
return;
}
auto e1x = resolveProperties(sc, exp.e1);
if (e1x.op == TOKerror)
{
result = e1x;
return;
}
if (e1x.checkType())
{
result = new ErrorExp();
return;
}
exp.e1 = e1x;
if (!exp.e1.type)
{
exp.error("cannot cast %s", exp.e1.toChars());
result = new ErrorExp();
return;
}
if (!exp.to) // Handle cast(const) and cast(immutable), etc.
{
exp.to = exp.e1.type.castMod(exp.mod);
exp.to = exp.to.semantic(exp.loc, sc);
if (exp.to == Type.terror)
{
result = new ErrorExp();
return;
}
}
if (exp.to.ty == Ttuple)
{
exp.error("cannot cast %s to tuple type %s", exp.e1.toChars(), exp.to.toChars());
result = new ErrorExp();
return;
}
// cast(void) is used to mark e1 as unused, so it is safe
if (exp.to.ty == Tvoid)
{
exp.type = exp.to;
result = exp;
return;
}
if (!exp.to.equals(exp.e1.type) && exp.mod == cast(ubyte)~0)
{
if (Expression e = exp.op_overload(sc))
{
result = e.implicitCastTo(sc, exp.to);
return;
}
}
Type t1b = exp.e1.type.toBasetype();
Type tob = exp.to.toBasetype();
if (tob.ty == Tstruct && !tob.equals(t1b))
{
/* Look to replace:
* cast(S)t
* with:
* S(t)
*/
// Rewrite as to.call(e1)
Expression e = new TypeExp(exp.loc, exp.to);
e = new CallExp(exp.loc, e, exp.e1);
e = e.trySemantic(sc);
if (e)
{
result = e;
return;
}
}
if (!t1b.equals(tob) && (t1b.ty == Tarray || t1b.ty == Tsarray))
{
if (checkNonAssignmentArrayOp(exp.e1))
{
result = new ErrorExp();
return;
}
}
// Look for casting to a vector type
if (tob.ty == Tvector && t1b.ty != Tvector)
{
result = new VectorExp(exp.loc, exp.e1, exp.to);
return;
}
Expression ex = exp.e1.castTo(sc, exp.to);
if (ex.op == TOKerror)
{
result = ex;
return;
}
// Check for unsafe casts
if (sc.func && !sc.intypeof &&
!isSafeCast(ex, t1b, tob) &&
sc.func.setUnsafe())
{
exp.error("cast from %s to %s not allowed in safe code", exp.e1.type.toChars(), exp.to.toChars());
result = new ErrorExp();
return;
}
result = ex;
}
override void visit(VectorExp exp)
{
static if (LOGSEMANTIC)
{
printf("VectorExp::semantic('%s')\n", exp.toChars());
}
if (exp.type)
{
result = exp;
return;
}
exp.e1 = exp.e1.semantic(sc);
exp.type = exp.to.semantic(exp.loc, sc);
if (exp.e1.op == TOKerror || exp.type.ty == Terror)
{
result = exp.e1;
return;
}
Type tb = exp.type.toBasetype();
assert(tb.ty == Tvector);
TypeVector tv = cast(TypeVector)tb;
Type te = tv.elementType();
exp.dim = cast(int)(tv.size(exp.loc) / te.size(exp.loc));
bool checkElem(Expression elem)
{
if (elem.isConst() == 1)
return false;
exp.error("constant expression expected, not %s", elem.toChars());
return true;
}
exp.e1 = exp.e1.optimize(WANTvalue);
bool res;
if (exp.e1.op == TOKarrayliteral)
{
foreach (i; 0 .. exp.dim)
{
// Do not stop on first error - check all AST nodes even if error found
res |= checkElem((cast(ArrayLiteralExp)exp.e1).getElement(i));
}
}
else if (exp.e1.type.ty == Tvoid)
checkElem(exp.e1);
result = res ? new ErrorExp() : exp;
}
override void visit(SliceExp exp)
{
static if (LOGSEMANTIC)
{
printf("SliceExp::semantic('%s')\n", exp.toChars());
}
if (exp.type)
{
result = exp;
return;
}
// operator overloading should be handled in ArrayExp already.
if (Expression ex = unaSemantic(exp, sc))
{
result = ex;
return;
}
exp.e1 = resolveProperties(sc, exp.e1);
if (exp.e1.op == TOKtype && exp.e1.type.ty != Ttuple)
{
if (exp.lwr || exp.upr)
{
exp.error("cannot slice type '%s'", exp.e1.toChars());
result = new ErrorExp();
return;
}
Expression e = new TypeExp(exp.loc, exp.e1.type.arrayOf());
result = e.semantic(sc);
return;
}
if (!exp.lwr && !exp.upr)
{
if (exp.e1.op == TOKarrayliteral)
{
// Convert [a,b,c][] to [a,b,c]
Type t1b = exp.e1.type.toBasetype();
Expression e = exp.e1;
if (t1b.ty == Tsarray)
{
e = e.copy();
e.type = t1b.nextOf().arrayOf();
}
result = e;
return;
}
if (exp.e1.op == TOKslice)
{
// Convert e[][] to e[]
SliceExp se = cast(SliceExp)exp.e1;
if (!se.lwr && !se.upr)
{
result = se;
return;
}
}
if (isArrayOpOperand(exp.e1))
{
// Convert (a[]+b[])[] to a[]+b[]
result = exp.e1;
return;
}
}
if (exp.e1.op == TOKerror)
{
result = exp.e1;
return;
}
if (exp.e1.type.ty == Terror)
{
result = new ErrorExp();
return;
}
Type t1b = exp.e1.type.toBasetype();
if (t1b.ty == Tpointer)
{
if ((cast(TypePointer)t1b).next.ty == Tfunction)
{
exp.error("cannot slice function pointer %s", exp.e1.toChars());
result = new ErrorExp();
}
if (!exp.lwr || !exp.upr)
{
exp.error("need upper and lower bound to slice pointer");
result = new ErrorExp();
return;
}
if (sc.func && !sc.intypeof && sc.func.setUnsafe())
{
exp.error("pointer slicing not allowed in safe functions");
result = new ErrorExp();
return;
}
}
else if (t1b.ty == Tarray)
{
}
else if (t1b.ty == Tsarray)
{
if (!exp.arrayop && global.params.vsafe)
{
/* Slicing a static array is like taking the address of it.
* Perform checks as if e[] was &e
*/
VarDeclaration v;
if (exp.e1.op == TOKdotvar)
{
DotVarExp dve = cast(DotVarExp)exp.e1;
if (dve.e1.op == TOKvar)
{
VarExp ve = cast(VarExp)dve.e1;
v = ve.var.isVarDeclaration();
}
else if (dve.e1.op == TOKthis || dve.e1.op == TOKsuper)
{
ThisExp ve = cast(ThisExp)dve.e1;
v = ve.var.isVarDeclaration();
if (v && !(v.storage_class & STCref))
v = null;
}
}
else if (exp.e1.op == TOKvar)
{
VarExp ve = cast(VarExp)exp.e1;
v = ve.var.isVarDeclaration();
}
else if (exp.e1.op == TOKthis || exp.e1.op == TOKsuper)
{
ThisExp ve = cast(ThisExp)exp.e1;
v = ve.var.isVarDeclaration();
}
if (v)
{
if (!checkAddressVar(sc, exp, v))
{
result = new ErrorExp();
return;
}
}
}
}
else if (t1b.ty == Ttuple)
{
if (!exp.lwr && !exp.upr)
{
result = exp.e1;
return;
}
if (!exp.lwr || !exp.upr)
{
exp.error("need upper and lower bound to slice tuple");
result = new ErrorExp();
return;
}
}
else if (t1b.ty == Tvector)
{
// Convert e1 to corresponding static array
TypeVector tv1 = cast(TypeVector)t1b;
t1b = tv1.basetype;
t1b = t1b.castMod(tv1.mod);
exp.e1.type = t1b;
}
else
{
exp.error("%s cannot be sliced with []", t1b.ty == Tvoid ? exp.e1.toChars() : t1b.toChars());
result = new ErrorExp();
return;
}
/* Run semantic on lwr and upr.
*/
Scope* scx = sc;
if (t1b.ty == Tsarray || t1b.ty == Tarray || t1b.ty == Ttuple)
{
// Create scope for 'length' variable
ScopeDsymbol sym = new ArrayScopeSymbol(sc, exp);
sym.loc = exp.loc;
sym.parent = sc.scopesym;
sc = sc.push(sym);
}
if (exp.lwr)
{
if (t1b.ty == Ttuple)
sc = sc.startCTFE();
exp.lwr = exp.lwr.semantic(sc);
exp.lwr = resolveProperties(sc, exp.lwr);
if (t1b.ty == Ttuple)
sc = sc.endCTFE();
exp.lwr = exp.lwr.implicitCastTo(sc, Type.tsize_t);
}
if (exp.upr)
{
if (t1b.ty == Ttuple)
sc = sc.startCTFE();
exp.upr = exp.upr.semantic(sc);
exp.upr = resolveProperties(sc, exp.upr);
if (t1b.ty == Ttuple)
sc = sc.endCTFE();
exp.upr = exp.upr.implicitCastTo(sc, Type.tsize_t);
}
if (sc != scx)
sc = sc.pop();
if (exp.lwr && exp.lwr.type == Type.terror || exp.upr && exp.upr.type == Type.terror)
{
result = new ErrorExp();
return;
}
if (t1b.ty == Ttuple)
{
exp.lwr = exp.lwr.ctfeInterpret();
exp.upr = exp.upr.ctfeInterpret();
uinteger_t i1 = exp.lwr.toUInteger();
uinteger_t i2 = exp.upr.toUInteger();
TupleExp te;
TypeTuple tup;
size_t length;
if (exp.e1.op == TOKtuple) // slicing an expression tuple
{
te = cast(TupleExp)exp.e1;
tup = null;
length = te.exps.dim;
}
else if (exp.e1.op == TOKtype) // slicing a type tuple
{
te = null;
tup = cast(TypeTuple)t1b;
length = Parameter.dim(tup.arguments);
}
else
assert(0);
if (i2 < i1 || length < i2)
{
exp.error("string slice `[%llu .. %llu]` is out of bounds", i1, i2);
result = new ErrorExp();
return;
}
size_t j1 = cast(size_t)i1;
size_t j2 = cast(size_t)i2;
Expression e;
if (exp.e1.op == TOKtuple)
{
auto exps = new Expressions();
exps.setDim(j2 - j1);
for (size_t i = 0; i < j2 - j1; i++)
{
(*exps)[i] = (*te.exps)[j1 + i];
}
e = new TupleExp(exp.loc, te.e0, exps);
}
else
{
auto args = new Parameters();
args.reserve(j2 - j1);
for (size_t i = j1; i < j2; i++)
{
Parameter arg = Parameter.getNth(tup.arguments, i);
args.push(arg);
}
e = new TypeExp(exp.e1.loc, new TypeTuple(args));
}
e = e.semantic(sc);
result = e;
return;
}
exp.type = t1b.nextOf().arrayOf();
// Allow typedef[] -> typedef[]
if (exp.type.equals(t1b))
exp.type = exp.e1.type;
if (exp.lwr && exp.upr)
{
exp.lwr = exp.lwr.optimize(WANTvalue);
exp.upr = exp.upr.optimize(WANTvalue);
IntRange lwrRange = getIntRange(exp.lwr);
IntRange uprRange = getIntRange(exp.upr);
if (t1b.ty == Tsarray || t1b.ty == Tarray)
{
Expression el = new ArrayLengthExp(exp.loc, exp.e1);
el = el.semantic(sc);
el = el.optimize(WANTvalue);
if (el.op == TOKint64)
{
dinteger_t length = el.toInteger();
auto bounds = IntRange(SignExtendedNumber(0), SignExtendedNumber(length));
exp.upperIsInBounds = bounds.contains(uprRange);
}
}
else if (t1b.ty == Tpointer)
{
exp.upperIsInBounds = true;
}
else
assert(0);
exp.lowerIsLessThanUpper = (lwrRange.imax <= uprRange.imin);
//printf("upperIsInBounds = %d lowerIsLessThanUpper = %d\n", upperIsInBounds, lowerIsLessThanUpper);
}
result = exp;
}
override void visit(ArrayLengthExp e)
{
static if (LOGSEMANTIC)
{
printf("ArrayLengthExp::semantic('%s')\n", e.toChars());
}
if (e.type)
{
result = e;
return;
}
if (Expression ex = unaSemantic(e, sc))
{
result = ex;
return;
}
e.e1 = resolveProperties(sc, e.e1);
e.type = Type.tsize_t;
result = e;
}
override void visit(ArrayExp exp)
{
static if (LOGSEMANTIC)
{
printf("ArrayExp::semantic('%s')\n", exp.toChars());
}
assert(!exp.type);
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
if (isAggregate(exp.e1.type))
exp.error("no [] operator overload for type %s", exp.e1.type.toChars());
else
exp.error("only one index allowed to index %s", exp.e1.type.toChars());
result = new ErrorExp();
}
override void visit(DotExp exp)
{
static if (LOGSEMANTIC)
{
printf("DotExp::semantic('%s')\n", exp.toChars());
if (exp.type)
printf("\ttype = %s\n", exp.type.toChars());
}
exp.e1 = exp.e1.semantic(sc);
exp.e2 = exp.e2.semantic(sc);
if (exp.e1.op == TOKtype)
{
result = exp.e2;
return;
}
if (exp.e2.op == TOKtype)
{
result = exp.e2;
return;
}
if (exp.e2.op == TOKtemplate)
{
auto td = (cast(TemplateExp)exp.e2).td;
Expression e = new DotTemplateExp(exp.loc, exp.e1, td);
result = e.semantic(sc);
return;
}
if (!exp.type)
exp.type = exp.e2.type;
result = exp;
}
override void visit(CommaExp e)
{
if (e.type)
{
result = e;
return;
}
// Allow `((a,b),(x,y))`
if (e.allowCommaExp)
{
CommaExp.allow(e.e1);
CommaExp.allow(e.e2);
}
if (Expression ex = binSemanticProp(e, sc))
{
result = ex;
return;
}
e.e1 = e.e1.addDtorHook(sc);
if (checkNonAssignmentArrayOp(e.e1))
{
result = new ErrorExp();
return;
}
e.type = e.e2.type;
if (e.type !is Type.tvoid && !e.allowCommaExp && !e.isGenerated)
e.deprecation("Using the result of a comma expression is deprecated");
result = e;
}
override void visit(IntervalExp e)
{
static if (LOGSEMANTIC)
{
printf("IntervalExp::semantic('%s')\n", e.toChars());
}
if (e.type)
{
result = e;
return;
}
Expression le = e.lwr;
le = le.semantic(sc);
le = resolveProperties(sc, le);
Expression ue = e.upr;
ue = ue.semantic(sc);
ue = resolveProperties(sc, ue);
if (le.op == TOKerror)
{
result = le;
return;
}
if (ue.op == TOKerror)
{
result = ue;
return;
}
e.lwr = le;
e.upr = ue;
e.type = Type.tvoid;
result = e;
}
override void visit(DelegatePtrExp e)
{
static if (LOGSEMANTIC)
{
printf("DelegatePtrExp::semantic('%s')\n", e.toChars());
}
if (!e.type)
{
unaSemantic(e, sc);
e.e1 = resolveProperties(sc, e.e1);
if (e.e1.op == TOKerror)
{
result = e.e1;
return;
}
e.type = Type.tvoidptr;
}
result = e;
}
override void visit(DelegateFuncptrExp e)
{
static if (LOGSEMANTIC)
{
printf("DelegateFuncptrExp::semantic('%s')\n", e.toChars());
}
if (!e.type)
{
unaSemantic(e, sc);
e.e1 = resolveProperties(sc, e.e1);
if (e.e1.op == TOKerror)
{
result = e.e1;
return;
}
e.type = e.e1.type.nextOf().pointerTo();
}
result = e;
}
override void visit(IndexExp exp)
{
static if (LOGSEMANTIC)
{
printf("IndexExp::semantic('%s')\n", exp.toChars());
}
if (exp.type)
{
result = exp;
return;
}
// operator overloading should be handled in ArrayExp already.
if (!exp.e1.type)
exp.e1 = exp.e1.semantic(sc);
assert(exp.e1.type); // semantic() should already be run on it
if (exp.e1.op == TOKtype && exp.e1.type.ty != Ttuple)
{
exp.e2 = exp.e2.semantic(sc);
exp.e2 = resolveProperties(sc, exp.e2);
Type nt;
if (exp.e2.op == TOKtype)
nt = new TypeAArray(exp.e1.type, exp.e2.type);
else
nt = new TypeSArray(exp.e1.type, exp.e2);
Expression e = new TypeExp(exp.loc, nt);
result = e.semantic(sc);
return;
}
if (exp.e1.op == TOKerror)
{
result = exp.e1;
return;
}
if (exp.e1.type.ty == Terror)
{
result = new ErrorExp();
return;
}
// Note that unlike C we do not implement the int[ptr]
Type t1b = exp.e1.type.toBasetype();
if (t1b.ty == Tvector)
{
// Convert e1 to corresponding static array
TypeVector tv1 = cast(TypeVector)t1b;
t1b = tv1.basetype;
t1b = t1b.castMod(tv1.mod);
exp.e1.type = t1b;
}
/* Run semantic on e2
*/
Scope* scx = sc;
if (t1b.ty == Tsarray || t1b.ty == Tarray || t1b.ty == Ttuple)
{
// Create scope for 'length' variable
ScopeDsymbol sym = new ArrayScopeSymbol(sc, exp);
sym.loc = exp.loc;
sym.parent = sc.scopesym;
sc = sc.push(sym);
}
if (t1b.ty == Ttuple)
sc = sc.startCTFE();
exp.e2 = exp.e2.semantic(sc);
exp.e2 = resolveProperties(sc, exp.e2);
if (t1b.ty == Ttuple)
sc = sc.endCTFE();
if (exp.e2.op == TOKtuple)
{
TupleExp te = cast(TupleExp)exp.e2;
if (te.exps && te.exps.dim == 1)
exp.e2 = Expression.combine(te.e0, (*te.exps)[0]); // bug 4444 fix
}
if (sc != scx)
sc = sc.pop();
if (exp.e2.type == Type.terror)
{
result = new ErrorExp();
return;
}
if (checkNonAssignmentArrayOp(exp.e1))
{
result = new ErrorExp();
return;
}
switch (t1b.ty)
{
case Tpointer:
if ((cast(TypePointer)t1b).next.ty == Tfunction)
{
exp.error("cannot index function pointer %s", exp.e1.toChars());
result = new ErrorExp();
return;
}
exp.e2 = exp.e2.implicitCastTo(sc, Type.tsize_t);
if (exp.e2.type == Type.terror)
{
result = new ErrorExp();
return;
}
exp.e2 = exp.e2.optimize(WANTvalue);
if (exp.e2.op == TOKint64 && exp.e2.toInteger() == 0)
{
}
else if (sc.func && sc.func.setUnsafe())
{
exp.error("safe function '%s' cannot index pointer '%s'", sc.func.toPrettyChars(), exp.e1.toChars());
result = new ErrorExp();
return;
}
exp.type = (cast(TypeNext)t1b).next;
break;
case Tarray:
exp.e2 = exp.e2.implicitCastTo(sc, Type.tsize_t);
if (exp.e2.type == Type.terror)
{
result = new ErrorExp();
return;
}
exp.type = (cast(TypeNext)t1b).next;
break;
case Tsarray:
{
exp.e2 = exp.e2.implicitCastTo(sc, Type.tsize_t);
if (exp.e2.type == Type.terror)
{
result = new ErrorExp();
return;
}
exp.type = t1b.nextOf();
break;
}
case Taarray:
{
TypeAArray taa = cast(TypeAArray)t1b;
/* We can skip the implicit conversion if they differ only by
* constness
* https://issues.dlang.org/show_bug.cgi?id=2684
* see also bug https://issues.dlang.org/show_bug.cgi?id=2954 b
*/
if (!arrayTypeCompatibleWithoutCasting(exp.e2.loc, exp.e2.type, taa.index))
{
exp.e2 = exp.e2.implicitCastTo(sc, taa.index); // type checking
if (exp.e2.type == Type.terror)
{
result = new ErrorExp();
return;
}
}
semanticTypeInfo(sc, taa);
exp.type = taa.next;
break;
}
case Ttuple:
{
exp.e2 = exp.e2.implicitCastTo(sc, Type.tsize_t);
if (exp.e2.type == Type.terror)
{
result = new ErrorExp();
return;
}
exp.e2 = exp.e2.ctfeInterpret();
uinteger_t index = exp.e2.toUInteger();
TupleExp te;
TypeTuple tup;
size_t length;
if (exp.e1.op == TOKtuple)
{
te = cast(TupleExp)exp.e1;
tup = null;
length = te.exps.dim;
}
else if (exp.e1.op == TOKtype)
{
te = null;
tup = cast(TypeTuple)t1b;
length = Parameter.dim(tup.arguments);
}
else
assert(0);
if (length <= index)
{
exp.error("array index [%llu] is outside array bounds [0 .. %llu]", index, cast(ulong)length);
result = new ErrorExp();
return;
}
Expression e;
if (exp.e1.op == TOKtuple)
{
e = (*te.exps)[cast(size_t)index];
e = Expression.combine(te.e0, e);
}
else
e = new TypeExp(exp.e1.loc, Parameter.getNth(tup.arguments, cast(size_t)index).type);
result = e;
return;
}
default:
exp.error("%s must be an array or pointer type, not %s", exp.e1.toChars(), exp.e1.type.toChars());
result = new ErrorExp();
return;
}
if (t1b.ty == Tsarray || t1b.ty == Tarray)
{
Expression el = new ArrayLengthExp(exp.loc, exp.e1);
el = el.semantic(sc);
el = el.optimize(WANTvalue);
if (el.op == TOKint64)
{
exp.e2 = exp.e2.optimize(WANTvalue);
dinteger_t length = el.toInteger();
if (length)
{
auto bounds = IntRange(SignExtendedNumber(0), SignExtendedNumber(length - 1));
exp.indexIsInBounds = bounds.contains(getIntRange(exp.e2));
}
}
}
result = exp;
}
override void visit(PostExp exp)
{
static if (LOGSEMANTIC)
{
printf("PostExp::semantic('%s')\n", exp.toChars());
}
if (exp.type)
{
result = exp;
return;
}
if (Expression ex = binSemantic(exp, sc))
{
result = ex;
return;
}
Expression e1x = resolveProperties(sc, exp.e1);
if (e1x.op == TOKerror)
{
result = e1x;
return;
}
exp.e1 = e1x;
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
if (exp.e1.checkReadModifyWrite(exp.op))
{
result = new ErrorExp();
return;
}
if (exp.e1.op == TOKslice)
{
const(char)* s = exp.op == TOKplusplus ? "increment" : "decrement";
exp.error("cannot post-%s array slice '%s', use pre-%s instead", s, exp.e1.toChars(), s);
result = new ErrorExp();
return;
}
exp.e1 = exp.e1.optimize(WANTvalue);
Type t1 = exp.e1.type.toBasetype();
if (t1.ty == Tclass || t1.ty == Tstruct || exp.e1.op == TOKarraylength)
{
/* Check for operator overloading,
* but rewrite in terms of ++e instead of e++
*/
/* If e1 is not trivial, take a reference to it
*/
Expression de = null;
if (exp.e1.op != TOKvar && exp.e1.op != TOKarraylength)
{
// ref v = e1;
auto v = copyToTemp(STCref, "__postref", exp.e1);
de = new DeclarationExp(exp.loc, v);
exp.e1 = new VarExp(exp.e1.loc, v);
}
/* Rewrite as:
* auto tmp = e1; ++e1; tmp
*/
auto tmp = copyToTemp(0, "__pitmp", exp.e1);
Expression ea = new DeclarationExp(exp.loc, tmp);
Expression eb = exp.e1.syntaxCopy();
eb = new PreExp(exp.op == TOKplusplus ? TOKpreplusplus : TOKpreminusminus, exp.loc, eb);
Expression ec = new VarExp(exp.loc, tmp);
// Combine de,ea,eb,ec
if (de)
ea = new CommaExp(exp.loc, de, ea);
e = new CommaExp(exp.loc, ea, eb);
e = new CommaExp(exp.loc, e, ec);
e = e.semantic(sc);
result = e;
return;
}
exp.e1 = exp.e1.modifiableLvalue(sc, exp.e1);
e = exp;
if (exp.e1.checkScalar())
{
result = new ErrorExp();
return;
}
if (exp.e1.checkNoBool())
{
result = new ErrorExp();
return;
}
if (exp.e1.type.ty == Tpointer)
e = scaleFactor(exp, sc);
else
exp.e2 = exp.e2.castTo(sc, exp.e1.type);
e.type = exp.e1.type;
result = e;
}
override void visit(PreExp exp)
{
Expression e = exp.op_overload(sc);
// printf("PreExp::semantic('%s')\n", toChars());
if (e)
{
result = e;
return;
}
// Rewrite as e1+=1 or e1-=1
if (exp.op == TOKpreplusplus)
e = new AddAssignExp(exp.loc, exp.e1, new IntegerExp(exp.loc, 1, Type.tint32));
else
e = new MinAssignExp(exp.loc, exp.e1, new IntegerExp(exp.loc, 1, Type.tint32));
result = e.semantic(sc);
}
override void visit(AssignExp exp)
{
static if (LOGSEMANTIC)
{
printf("AssignExp::semantic('%s')\n", exp.toChars());
}
//printf("exp.e1.op = %d, '%s'\n", exp.e1.op, Token.toChars(exp.e1.op));
//printf("exp.e2.op = %d, '%s'\n", exp.e2.op, Token.toChars(exp.e2.op));
if (exp.type)
{
result = exp;
return;
}
Expression e1old = exp.e1;
if (exp.e2.op == TOKcomma)
{
/* Rewrite to get rid of the comma from rvalue
*/
if (!(cast(CommaExp)exp.e2).isGenerated)
exp.deprecation("Using the result of a comma expression is deprecated");
Expression e0;
exp.e2 = Expression.extractLast(exp.e2, &e0);
Expression e = Expression.combine(e0, exp);
result = e.semantic(sc);
return;
}
/* Look for operator overloading of a[arguments] = e2.
* Do it before e1.semantic() otherwise the ArrayExp will have been
* converted to unary operator overloading already.
*/
if (exp.e1.op == TOKarray)
{
Expression res;
ArrayExp ae = cast(ArrayExp)exp.e1;
ae.e1 = ae.e1.semantic(sc);
ae.e1 = resolveProperties(sc, ae.e1);
Expression ae1old = ae.e1;
const(bool) maybeSlice =
(ae.arguments.dim == 0 ||
ae.arguments.dim == 1 && (*ae.arguments)[0].op == TOKinterval);
IntervalExp ie = null;
if (maybeSlice && ae.arguments.dim)
{
assert((*ae.arguments)[0].op == TOKinterval);
ie = cast(IntervalExp)(*ae.arguments)[0];
}
while (true)
{
if (ae.e1.op == TOKerror)
{
result = ae.e1;
return;
}
Expression e0 = null;
Expression ae1save = ae.e1;
ae.lengthVar = null;
Type t1b = ae.e1.type.toBasetype();
AggregateDeclaration ad = isAggregate(t1b);
if (!ad)
break;
if (search_function(ad, Id.indexass))
{
// Deal with $
res = resolveOpDollar(sc, ae, &e0);
if (!res) // a[i..j] = e2 might be: a.opSliceAssign(e2, i, j)
goto Lfallback;
if (res.op == TOKerror)
{
result = res;
return;
}
res = exp.e2.semantic(sc);
if (res.op == TOKerror)
{
result = res;
return;
}
exp.e2 = res;
/* Rewrite (a[arguments] = e2) as:
* a.opIndexAssign(e2, arguments)
*/
Expressions* a = ae.arguments.copy();
a.insert(0, exp.e2);
res = new DotIdExp(exp.loc, ae.e1, Id.indexass);
res = new CallExp(exp.loc, res, a);
if (maybeSlice) // a[] = e2 might be: a.opSliceAssign(e2)
res = res.trySemantic(sc);
else
res = res.semantic(sc);
if (res)
{
res = Expression.combine(e0, res);
result = res;
return;
}
}
Lfallback:
if (maybeSlice && search_function(ad, Id.sliceass))
{
// Deal with $
res = resolveOpDollar(sc, ae, ie, &e0);
if (res.op == TOKerror)
{
result = res;
return;
}
res = exp.e2.semantic(sc);
if (res.op == TOKerror)
{
result = res;
return;
}
exp.e2 = res;
/* Rewrite (a[i..j] = e2) as:
* a.opSliceAssign(e2, i, j)
*/
auto a = new Expressions();
a.push(exp.e2);
if (ie)
{
a.push(ie.lwr);
a.push(ie.upr);
}
res = new DotIdExp(exp.loc, ae.e1, Id.sliceass);
res = new CallExp(exp.loc, res, a);
res = res.semantic(sc);
res = Expression.combine(e0, res);
result = res;
return;
}
// No operator overloading member function found yet, but
// there might be an alias this to try.
if (ad.aliasthis && t1b != ae.att1)
{
if (!ae.att1 && t1b.checkAliasThisRec())
ae.att1 = t1b;
/* Rewrite (a[arguments] op e2) as:
* a.aliasthis[arguments] op e2
*/
ae.e1 = resolveAliasThis(sc, ae1save, true);
if (ae.e1)
continue;
}
break;
}
ae.e1 = ae1old; // recovery
ae.lengthVar = null;
}
/* Run this.e1 semantic.
*/
{
Expression e1x = exp.e1;
/* With UFCS, e.f = value
* Could mean:
* .f(e, value)
* or:
* .f(e) = value
*/
if (e1x.op == TOKdotti)
{
DotTemplateInstanceExp dti = cast(DotTemplateInstanceExp)e1x;
Expression e = dti.semanticY(sc, 1);
if (!e)
{
result = resolveUFCSProperties(sc, e1x, exp.e2);
return;
}
e1x = e;
}
else if (e1x.op == TOKdotid)
{
DotIdExp die = cast(DotIdExp)e1x;
Expression e = die.semanticY(sc, 1);
if (e && isDotOpDispatch(e))
{
uint errors = global.startGagging();
e = resolvePropertiesX(sc, e, exp.e2);
if (global.endGagging(errors))
e = null; /* fall down to UFCS */
else
{
result = e;
return;
}
}
if (!e)
{
result = resolveUFCSProperties(sc, e1x, exp.e2);
return;
}
e1x = e;
}
else
{
if (e1x.op == TOKslice)
(cast(SliceExp)e1x).arrayop = true;
e1x = e1x.semantic(sc);
}
/* We have f = value.
* Could mean:
* f(value)
* or:
* f() = value
*/
if (Expression e = resolvePropertiesX(sc, e1x, exp.e2))
{
result = e;
return;
}
if (e1x.checkRightThis(sc))
{
result = new ErrorExp();
return;
}
exp.e1 = e1x;
assert(exp.e1.type);
}
Type t1 = exp.e1.type.toBasetype();
/* Run this.e2 semantic.
* Different from other binary expressions, the analysis of e2
* depends on the result of e1 in assignments.
*/
{
Expression e2x = inferType(exp.e2, t1.baseElemOf());
e2x = e2x.semantic(sc);
e2x = resolveProperties(sc, e2x);
if (e2x.op == TOKtype)
e2x = resolveAliasThis(sc, e2x); //https://issues.dlang.org/show_bug.cgi?id=17684
if (e2x.op == TOKerror)
{
result = e2x;
return;
}
if (e2x.checkValue())
{
result = new ErrorExp();
return;
}
exp.e2 = e2x;
}
/* Rewrite tuple assignment as a tuple of assignments.
*/
{
Expression e2x = exp.e2;
Ltupleassign:
if (exp.e1.op == TOKtuple && e2x.op == TOKtuple)
{
TupleExp tup1 = cast(TupleExp)exp.e1;
TupleExp tup2 = cast(TupleExp)e2x;
size_t dim = tup1.exps.dim;
Expression e = null;
if (dim != tup2.exps.dim)
{
exp.error("mismatched tuple lengths, %d and %d", cast(int)dim, cast(int)tup2.exps.dim);
result = new ErrorExp();
return;
}
if (dim == 0)
{
e = new IntegerExp(exp.loc, 0, Type.tint32);
e = new CastExp(exp.loc, e, Type.tvoid); // avoid "has no effect" error
e = Expression.combine(Expression.combine(tup1.e0, tup2.e0), e);
}
else
{
auto exps = new Expressions();
exps.setDim(dim);
for (size_t i = 0; i < dim; i++)
{
Expression ex1 = (*tup1.exps)[i];
Expression ex2 = (*tup2.exps)[i];
(*exps)[i] = new AssignExp(exp.loc, ex1, ex2);
}
e = new TupleExp(exp.loc, Expression.combine(tup1.e0, tup2.e0), exps);
}
result = e.semantic(sc);
return;
}
/* Look for form: e1 = e2.aliasthis.
*/
if (exp.e1.op == TOKtuple)
{
TupleDeclaration td = isAliasThisTuple(e2x);
if (!td)
goto Lnomatch;
assert(exp.e1.type.ty == Ttuple);
TypeTuple tt = cast(TypeTuple)exp.e1.type;
Expression e0;
Expression ev = extractSideEffect(sc, "__tup", e0, e2x);
auto iexps = new Expressions();
iexps.push(ev);
for (size_t u = 0; u < iexps.dim; u++)
{
Lexpand:
Expression e = (*iexps)[u];
Parameter arg = Parameter.getNth(tt.arguments, u);
//printf("[%d] iexps.dim = %d, ", u, iexps.dim);
//printf("e = (%s %s, %s), ", Token::tochars[e.op], e.toChars(), e.type.toChars());
//printf("arg = (%s, %s)\n", arg.toChars(), arg.type.toChars());
if (!arg || !e.type.implicitConvTo(arg.type))
{
// expand initializer to tuple
if (expandAliasThisTuples(iexps, u) != -1)
{
if (iexps.dim <= u)
break;
goto Lexpand;
}
goto Lnomatch;
}
}
e2x = new TupleExp(e2x.loc, e0, iexps);
e2x = e2x.semantic(sc);
if (e2x.op == TOKerror)
{
result = e2x;
return;
}
// Do not need to overwrite this.e2
goto Ltupleassign;
}
Lnomatch:
}
/* Inside constructor, if this is the first assignment of object field,
* rewrite this to initializing the field.
*/
if (exp.op == TOKassign && exp.e1.checkModifiable(sc) == 2)
{
//printf("[%s] change to init - %s\n", loc.toChars(), toChars());
exp.op = TOKconstruct;
// https://issues.dlang.org/show_bug.cgi?id=13515
// set Index::modifiable flag for complex AA element initialization
if (exp.e1.op == TOKindex)
{
Expression e1x = (cast(IndexExp)exp.e1).markSettingAAElem();
if (e1x.op == TOKerror)
{
result = e1x;
return;
}
}
}
else if (exp.op == TOKconstruct && exp.e1.op == TOKvar &&
(cast(VarExp)exp.e1).var.storage_class & (STCout | STCref))
{
exp.memset |= MemorySet.referenceInit;
}
/* If it is an assignment from a 'foreign' type,
* check for operator overloading.
*/
if (exp.memset & MemorySet.referenceInit)
{
// If this is an initialization of a reference,
// do nothing
}
else if (t1.ty == Tstruct)
{
auto e1x = exp.e1;
auto e2x = exp.e2;
auto sd = (cast(TypeStruct)t1).sym;
if (exp.op == TOKconstruct)
{
Type t2 = e2x.type.toBasetype();
if (t2.ty == Tstruct && sd == (cast(TypeStruct)t2).sym)
{
sd.size(exp.loc);
if (sd.sizeok != SIZEOKdone)
{
result = new ErrorExp();
return;
}
if (!sd.ctor)
sd.ctor = sd.searchCtor();
// https://issues.dlang.org/show_bug.cgi?id=15661
// Look for the form from last of comma chain.
auto e2y = e2x;
while (e2y.op == TOKcomma)
e2y = (cast(CommaExp)e2y).e2;
CallExp ce = (e2y.op == TOKcall) ? cast(CallExp)e2y : null;
DotVarExp dve = (ce && ce.e1.op == TOKdotvar)
? cast(DotVarExp)ce.e1 : null;
if (sd.ctor && ce && dve && dve.var.isCtorDeclaration() &&
e2y.type.implicitConvTo(t1))
{
/* Look for form of constructor call which is:
* __ctmp.ctor(arguments...)
*/
/* Before calling the constructor, initialize
* variable with a bit copy of the default
* initializer
*/
Expression einit;
if (sd.zeroInit == 1 && !sd.isNested())
{
// https://issues.dlang.org/show_bug.cgi?id=14606
// Always use BlitExp for the special expression: (struct = 0)
einit = new IntegerExp(exp.loc, 0, Type.tint32);
}
else if (sd.isNested())
{
auto sle = new StructLiteralExp(exp.loc, sd, null, t1);
if (!sd.fill(exp.loc, sle.elements, true))
{
result = new ErrorExp();
return;
}
if (checkFrameAccess(exp.loc, sc, sd, sle.elements.dim))
{
result = new ErrorExp();
return;
}
sle.type = t1;
einit = sle;
}
else
{
einit = t1.defaultInit(exp.loc);
}
auto ae = new BlitExp(exp.loc, exp.e1, einit);
ae.type = e1x.type;
/* Replace __ctmp being constructed with e1.
* We need to copy constructor call expression,
* because it may be used in other place.
*/
auto dvx = cast(DotVarExp)dve.copy();
dvx.e1 = e1x;
auto cx = cast(CallExp)ce.copy();
cx.e1 = dvx;
Expression e0;
Expression.extractLast(e2x, &e0);
auto e = Expression.combine(ae, cx);
e = Expression.combine(e0, e);
e = e.semantic(sc);
result = e;
return;
}
if (sd.postblit)
{
/* We have a copy constructor for this
*/
if (e2x.op == TOKquestion)
{
/* Rewrite as:
* a ? e1 = b : e1 = c;
*/
CondExp econd = cast(CondExp)e2x;
Expression ea1 = new ConstructExp(econd.e1.loc, e1x, econd.e1);
Expression ea2 = new ConstructExp(econd.e1.loc, e1x, econd.e2);
Expression e = new CondExp(exp.loc, econd.econd, ea1, ea2);
result = e.semantic(sc);
return;
}
if (e2x.isLvalue())
{
if (!e2x.type.implicitConvTo(e1x.type))
{
exp.error("conversion error from %s to %s",
e2x.type.toChars(), e1x.type.toChars());
result = new ErrorExp();
return;
}
/* Rewrite as:
* (e1 = e2).postblit();
*
* Blit assignment e1 = e2 returns a reference to the original e1,
* then call the postblit on it.
*/
Expression e = e1x.copy();
e.type = e.type.mutableOf();
e = new BlitExp(exp.loc, e, e2x);
e = new DotVarExp(exp.loc, e, sd.postblit, false);
e = new CallExp(exp.loc, e);
result = e.semantic(sc);
return;
}
else
{
/* The struct value returned from the function is transferred
* so should not call the destructor on it.
*/
e2x = valueNoDtor(e2x);
}
}
}
else if (!e2x.implicitConvTo(t1))
{
sd.size(exp.loc);
if (sd.sizeok != SIZEOKdone)
{
result = new ErrorExp();
return;
}
if (!sd.ctor)
sd.ctor = sd.searchCtor();
if (sd.ctor)
{
/* Look for implicit constructor call
* Rewrite as:
* e1 = init, e1.ctor(e2)
*/
Expression einit;
einit = new BlitExp(exp.loc, e1x, e1x.type.defaultInit(exp.loc));
einit.type = e1x.type;
Expression e;
e = new DotIdExp(exp.loc, e1x, Id.ctor);
e = new CallExp(exp.loc, e, e2x);
e = new CommaExp(exp.loc, einit, e);
e = e.semantic(sc);
result = e;
return;
}
if (search_function(sd, Id.call))
{
/* Look for static opCall
* https://issues.dlang.org/show_bug.cgi?id=2702
* Rewrite as:
* e1 = typeof(e1).opCall(arguments)
*/
e2x = typeDotIdExp(e2x.loc, e1x.type, Id.call);
e2x = new CallExp(exp.loc, e2x, exp.e2);
e2x = e2x.semantic(sc);
e2x = resolveProperties(sc, e2x);
if (e2x.op == TOKerror)
{
result = e2x;
return;
}
if (e2x.checkValue())
{
result = new ErrorExp();
return;
}
}
}
else // https://issues.dlang.org/show_bug.cgi?id=11355
{
AggregateDeclaration ad2 = isAggregate(e2x.type);
if (ad2 && ad2.aliasthis && !(exp.att2 && e2x.type == exp.att2))
{
if (!exp.att2 && exp.e2.type.checkAliasThisRec())
exp.att2 = exp.e2.type;
/* Rewrite (e1 op e2) as:
* (e1 op e2.aliasthis)
*/
exp.e2 = new DotIdExp(exp.e2.loc, exp.e2, ad2.aliasthis.ident);
result = exp.semantic(sc);
return;
}
}
}
else if (exp.op == TOKassign)
{
if (e1x.op == TOKindex && (cast(IndexExp)e1x).e1.type.toBasetype().ty == Taarray)
{
/*
* Rewrite:
* aa[key] = e2;
* as:
* ref __aatmp = aa;
* ref __aakey = key;
* ref __aaval = e2;
* (__aakey in __aatmp
* ? __aatmp[__aakey].opAssign(__aaval)
* : ConstructExp(__aatmp[__aakey], __aaval));
*/
IndexExp ie = cast(IndexExp)e1x;
Type t2 = e2x.type.toBasetype();
Expression e0 = null;
Expression ea = extractSideEffect(sc, "__aatmp", e0, ie.e1);
Expression ek = extractSideEffect(sc, "__aakey", e0, ie.e2);
Expression ev = extractSideEffect(sc, "__aaval", e0, e2x);
AssignExp ae = cast(AssignExp)exp.copy();
ae.e1 = new IndexExp(exp.loc, ea, ek);
ae.e1 = ae.e1.semantic(sc);
ae.e1 = ae.e1.optimize(WANTvalue);
ae.e2 = ev;
Expression e = ae.op_overload(sc);
if (e)
{
Expression ey = null;
if (t2.ty == Tstruct && sd == t2.toDsymbol(sc))
{
ey = ev;
}
else if (!ev.implicitConvTo(ie.type) && sd.ctor)
{
// Look for implicit constructor call
// Rewrite as S().ctor(e2)
ey = new StructLiteralExp(exp.loc, sd, null);
ey = new DotIdExp(exp.loc, ey, Id.ctor);
ey = new CallExp(exp.loc, ey, ev);
ey = ey.trySemantic(sc);
}
if (ey)
{
Expression ex;
ex = new IndexExp(exp.loc, ea, ek);
ex = ex.semantic(sc);
ex = ex.optimize(WANTvalue);
ex = ex.modifiableLvalue(sc, ex); // allocate new slot
ey = new ConstructExp(exp.loc, ex, ey);
ey = ey.semantic(sc);
if (ey.op == TOKerror)
{
result = ey;
return;
}
ex = e;
// https://issues.dlang.org/show_bug.cgi?id=14144
// The whole expression should have the common type
// of opAssign() return and assigned AA entry.
// Even if there's no common type, expression should be typed as void.
Type t = null;
if (!typeMerge(sc, TOKquestion, &t, &ex, &ey))
{
ex = new CastExp(ex.loc, ex, Type.tvoid);
ey = new CastExp(ey.loc, ey, Type.tvoid);
}
e = new CondExp(exp.loc, new InExp(exp.loc, ek, ea), ex, ey);
}
e = Expression.combine(e0, e);
e = e.semantic(sc);
result = e;
return;
}
}
else
{
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
}
}
else
assert(exp.op == TOKblit);
exp.e1 = e1x;
exp.e2 = e2x;
}
else if (t1.ty == Tclass)
{
// Disallow assignment operator overloads for same type
if (exp.op == TOKassign && !exp.e2.implicitConvTo(exp.e1.type))
{
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
}
}
else if (t1.ty == Tsarray)
{
// SliceExp cannot have static array type without context inference.
assert(exp.e1.op != TOKslice);
Expression e1x = exp.e1;
Expression e2x = exp.e2;
if (e2x.implicitConvTo(e1x.type))
{
if (exp.op != TOKblit && (e2x.op == TOKslice && (cast(UnaExp)e2x).e1.isLvalue() || e2x.op == TOKcast && (cast(UnaExp)e2x).e1.isLvalue() || e2x.op != TOKslice && e2x.isLvalue()))
{
if (e1x.checkPostblit(sc, t1))
{
result = new ErrorExp();
return;
}
}
// e2 matches to t1 because of the implicit length match, so
if (isUnaArrayOp(e2x.op) || isBinArrayOp(e2x.op))
{
// convert e1 to e1[]
// e.g. e1[] = a[] + b[];
auto sle = new SliceExp(e1x.loc, e1x, null, null);
sle.arrayop = true;
e1x = sle.semantic(sc);
}
else
{
// convert e2 to t1 later
// e.g. e1 = [1, 2, 3];
}
}
else
{
if (e2x.implicitConvTo(t1.nextOf().arrayOf()) > MATCHnomatch)
{
uinteger_t dim1 = (cast(TypeSArray)t1).dim.toInteger();
uinteger_t dim2 = dim1;
if (e2x.op == TOKarrayliteral)
{
ArrayLiteralExp ale = cast(ArrayLiteralExp)e2x;
dim2 = ale.elements ? ale.elements.dim : 0;
}
else if (e2x.op == TOKslice)
{
Type tx = toStaticArrayType(cast(SliceExp)e2x);
if (tx)
dim2 = (cast(TypeSArray)tx).dim.toInteger();
}
if (dim1 != dim2)
{
exp.error("mismatched array lengths, %d and %d", cast(int)dim1, cast(int)dim2);
result = new ErrorExp();
return;
}
}
// May be block or element-wise assignment, so
// convert e1 to e1[]
if (exp.op != TOKassign)
{
// If multidimensional static array, treat as one large array
dinteger_t dim = (cast(TypeSArray)t1).dim.toInteger();
Type t = t1;
while (1)
{
t = t.nextOf().toBasetype();
if (t.ty != Tsarray)
break;
dim *= (cast(TypeSArray)t).dim.toInteger();
e1x.type = t.nextOf().sarrayOf(dim);
}
}
auto sle = new SliceExp(e1x.loc, e1x, null, null);
sle.arrayop = true;
e1x = sle.semantic(sc);
}
if (e1x.op == TOKerror)
{
result = e1x;
return;
}
if (e2x.op == TOKerror)
{
result = e2x;
return;
}
exp.e1 = e1x;
exp.e2 = e2x;
t1 = e1x.type.toBasetype();
}
/* Check the mutability of e1.
*/
if (exp.e1.op == TOKarraylength)
{
// e1 is not an lvalue, but we let code generator handle it
ArrayLengthExp ale = cast(ArrayLengthExp)exp.e1;
Expression ale1x = ale.e1;
ale1x = ale1x.modifiableLvalue(sc, exp.e1);
if (ale1x.op == TOKerror)
{
result = ale1x;
return;
}
ale.e1 = ale1x;
Type tn = ale.e1.type.toBasetype().nextOf();
checkDefCtor(ale.loc, tn);
semanticTypeInfo(sc, tn);
}
else if (exp.e1.op == TOKslice)
{
Type tn = exp.e1.type.nextOf();
if (exp.op == TOKassign && !tn.isMutable())
{
exp.error("slice %s is not mutable", exp.e1.toChars());
result = new ErrorExp();
return;
}
// For conditional operator, both branches need conversion.
SliceExp se = cast(SliceExp)exp.e1;
while (se.e1.op == TOKslice)
se = cast(SliceExp)se.e1;
if (se.e1.op == TOKquestion && se.e1.type.toBasetype().ty == Tsarray)
{
se.e1 = se.e1.modifiableLvalue(sc, exp.e1);
if (se.e1.op == TOKerror)
{
result = se.e1;
return;
}
}
}
else
{
Expression e1x = exp.e1;
// Try to do a decent error message with the expression
// before it got constant folded
if (e1x.op != TOKvar)
e1x = e1x.optimize(WANTvalue);
if (exp.op == TOKassign)
e1x = e1x.modifiableLvalue(sc, e1old);
if (e1x.op == TOKerror)
{
result = e1x;
return;
}
exp.e1 = e1x;
}
/* Tweak e2 based on the type of e1.
*/
Expression e2x = exp.e2;
Type t2 = e2x.type.toBasetype();
// If it is a array, get the element type. Note that it may be
// multi-dimensional.
Type telem = t1;
while (telem.ty == Tarray)
telem = telem.nextOf();
if (exp.e1.op == TOKslice && t1.nextOf() &&
(telem.ty != Tvoid || e2x.op == TOKnull) &&
e2x.implicitConvTo(t1.nextOf()))
{
// Check for block assignment. If it is of type void[], void[][], etc,
// '= null' is the only allowable block assignment (Bug 7493)
exp.memset |= MemorySet.blockAssign; // make it easy for back end to tell what this is
e2x = e2x.implicitCastTo(sc, t1.nextOf());
if (exp.op != TOKblit && e2x.isLvalue() && exp.e1.checkPostblit(sc, t1.nextOf()))
{
result = new ErrorExp();
return;
}
}
else if (exp.e1.op == TOKslice &&
(t2.ty == Tarray || t2.ty == Tsarray) &&
t2.nextOf().implicitConvTo(t1.nextOf()))
{
// Check element-wise assignment.
/* If assigned elements number is known at compile time,
* check the mismatch.
*/
SliceExp se1 = cast(SliceExp)exp.e1;
TypeSArray tsa1 = cast(TypeSArray)toStaticArrayType(se1);
TypeSArray tsa2 = null;
if (e2x.op == TOKarrayliteral)
tsa2 = cast(TypeSArray)t2.nextOf().sarrayOf((cast(ArrayLiteralExp)e2x).elements.dim);
else if (e2x.op == TOKslice)
tsa2 = cast(TypeSArray)toStaticArrayType(cast(SliceExp)e2x);
else if (t2.ty == Tsarray)
tsa2 = cast(TypeSArray)t2;
if (tsa1 && tsa2)
{
uinteger_t dim1 = tsa1.dim.toInteger();
uinteger_t dim2 = tsa2.dim.toInteger();
if (dim1 != dim2)
{
exp.error("mismatched array lengths, %d and %d", cast(int)dim1, cast(int)dim2);
result = new ErrorExp();
return;
}
}
if (exp.op != TOKblit &&
(e2x.op == TOKslice && (cast(UnaExp)e2x).e1.isLvalue() ||
e2x.op == TOKcast && (cast(UnaExp)e2x).e1.isLvalue() ||
e2x.op != TOKslice && e2x.isLvalue()))
{
if (exp.e1.checkPostblit(sc, t1.nextOf()))
{
result = new ErrorExp();
return;
}
}
if (0 && global.params.warnings && !global.gag && exp.op == TOKassign &&
e2x.op != TOKslice && e2x.op != TOKassign &&
e2x.op != TOKarrayliteral && e2x.op != TOKstring &&
!(e2x.op == TOKadd || e2x.op == TOKmin ||
e2x.op == TOKmul || e2x.op == TOKdiv ||
e2x.op == TOKmod || e2x.op == TOKxor ||
e2x.op == TOKand || e2x.op == TOKor ||
e2x.op == TOKpow ||
e2x.op == TOKtilde || e2x.op == TOKneg))
{
const(char)* e1str = exp.e1.toChars();
const(char)* e2str = e2x.toChars();
exp.warning("explicit element-wise assignment %s = (%s)[] is better than %s = %s", e1str, e2str, e1str, e2str);
}
Type t2n = t2.nextOf();
Type t1n = t1.nextOf();
int offset;
if (t2n.equivalent(t1n) ||
t1n.isBaseOf(t2n, &offset) && offset == 0)
{
/* Allow copy of distinct qualifier elements.
* eg.
* char[] dst; const(char)[] src;
* dst[] = src;
*
* class C {} class D : C {}
* C[2] ca; D[] da;
* ca[] = da;
*/
if (isArrayOpValid(e2x))
{
// Don't add CastExp to keep AST for array operations
e2x = e2x.copy();
e2x.type = exp.e1.type.constOf();
}
else
e2x = e2x.castTo(sc, exp.e1.type.constOf());
}
else
{
/* https://issues.dlang.org/show_bug.cgi?id=15778
* A string literal has an array type of immutable
* elements by default, and normally it cannot be convertible to
* array type of mutable elements. But for element-wise assignment,
* elements need to be const at best. So we should give a chance
* to change code unit size for polysemous string literal.
*/
if (e2x.op == TOKstring)
e2x = e2x.implicitCastTo(sc, exp.e1.type.constOf());
else
e2x = e2x.implicitCastTo(sc, exp.e1.type);
}
if (t1n.toBasetype.ty == Tvoid && t2n.toBasetype.ty == Tvoid)
{
if (!sc.intypeof && sc.func && sc.func.setUnsafe())
{
exp.error("cannot copy void[] to void[] in @safe code");
result = new ErrorExp();
return;
}
}
}
else
{
if (0 && global.params.warnings && !global.gag && exp.op == TOKassign &&
t1.ty == Tarray && t2.ty == Tsarray &&
e2x.op != TOKslice &&
t2.implicitConvTo(t1))
{
// Disallow ar[] = sa (Converted to ar[] = sa[])
// Disallow da = sa (Converted to da = sa[])
const(char)* e1str = exp.e1.toChars();
const(char)* e2str = e2x.toChars();
const(char)* atypestr = exp.e1.op == TOKslice ? "element-wise" : "slice";
exp.warning("explicit %s assignment %s = (%s)[] is better than %s = %s", atypestr, e1str, e2str, e1str, e2str);
}
if (exp.op == TOKblit)
e2x = e2x.castTo(sc, exp.e1.type);
else
e2x = e2x.implicitCastTo(sc, exp.e1.type);
}
if (e2x.op == TOKerror)
{
result = e2x;
return;
}
exp.e2 = e2x;
t2 = exp.e2.type.toBasetype();
/* Look for array operations
*/
if ((t2.ty == Tarray || t2.ty == Tsarray) && isArrayOpValid(exp.e2))
{
// Look for valid array operations
if (!(exp.memset & MemorySet.blockAssign) &&
exp.e1.op == TOKslice &&
(isUnaArrayOp(exp.e2.op) || isBinArrayOp(exp.e2.op)))
{
exp.type = exp.e1.type;
if (exp.op == TOKconstruct) // https://issues.dlang.org/show_bug.cgi?id=10282
// tweak mutability of e1 element
exp.e1.type = exp.e1.type.nextOf().mutableOf().arrayOf();
result = arrayOp(exp, sc);
return;
}
// Drop invalid array operations in e2
// d = a[] + b[], d = (a[] + b[])[0..2], etc
if (checkNonAssignmentArrayOp(exp.e2, !(exp.memset & MemorySet.blockAssign) && exp.op == TOKassign))
{
result = new ErrorExp();
return;
}
// Remains valid array assignments
// d = d[], d = [1,2,3], etc
}
/* Don't allow assignment to classes that were allocated on the stack with:
* scope Class c = new Class();
*/
if (exp.e1.op == TOKvar && exp.op == TOKassign)
{
VarExp ve = cast(VarExp)exp.e1;
VarDeclaration vd = ve.var.isVarDeclaration();
if (vd && (vd.onstack || vd.mynew))
{
assert(t1.ty == Tclass);
exp.error("cannot rebind scope variables");
}
}
if (exp.e1.op == TOKvar && (cast(VarExp)exp.e1).var.ident == Id.ctfe)
{
exp.error("cannot modify compiler-generated variable __ctfe");
}
exp.type = exp.e1.type;
assert(exp.type);
auto res = exp.op == TOKassign ? exp.reorderSettingAAElem(sc) : exp;
checkAssignEscape(sc, res, false);
result = res;
}
override void visit(PowAssignExp exp)
{
if (exp.type)
{
result = exp;
return;
}
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
if (exp.e1.checkReadModifyWrite(exp.op, exp.e2))
{
result = new ErrorExp();
return;
}
assert(exp.e1.type && exp.e2.type);
if (exp.e1.op == TOKslice || exp.e1.type.ty == Tarray || exp.e1.type.ty == Tsarray)
{
if (checkNonAssignmentArrayOp(exp.e1))
{
result = new ErrorExp();
return;
}
// T[] ^^= ...
if (exp.e2.implicitConvTo(exp.e1.type.nextOf()))
{
// T[] ^^= T
exp.e2 = exp.e2.castTo(sc, exp.e1.type.nextOf());
}
else if (Expression ex = typeCombine(exp, sc))
{
result = ex;
return;
}
// Check element types are arithmetic
Type tb1 = exp.e1.type.nextOf().toBasetype();
Type tb2 = exp.e2.type.toBasetype();
if (tb2.ty == Tarray || tb2.ty == Tsarray)
tb2 = tb2.nextOf().toBasetype();
if ((tb1.isintegral() || tb1.isfloating()) && (tb2.isintegral() || tb2.isfloating()))
{
exp.type = exp.e1.type;
result = arrayOp(exp, sc);
return;
}
}
else
{
exp.e1 = exp.e1.modifiableLvalue(sc, exp.e1);
}
if ((exp.e1.type.isintegral() || exp.e1.type.isfloating()) && (exp.e2.type.isintegral() || exp.e2.type.isfloating()))
{
Expression e0 = null;
e = exp.reorderSettingAAElem(sc);
e = Expression.extractLast(e, &e0);
assert(e == exp);
if (exp.e1.op == TOKvar)
{
// Rewrite: e1 = e1 ^^ e2
e = new PowExp(exp.loc, exp.e1.syntaxCopy(), exp.e2);
e = new AssignExp(exp.loc, exp.e1, e);
}
else
{
// Rewrite: ref tmp = e1; tmp = tmp ^^ e2
auto v = copyToTemp(STCref, "__powtmp", exp.e1);
auto de = new DeclarationExp(exp.e1.loc, v);
auto ve = new VarExp(exp.e1.loc, v);
e = new PowExp(exp.loc, ve, exp.e2);
e = new AssignExp(exp.loc, new VarExp(exp.e1.loc, v), e);
e = new CommaExp(exp.loc, de, e);
}
e = Expression.combine(e0, e);
e = e.semantic(sc);
result = e;
return;
}
result = exp.incompatibleTypes();
}
override void visit(CatAssignExp exp)
{
if (exp.type)
{
result = exp;
return;
}
//printf("CatAssignExp::semantic() %s\n", exp.toChars());
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
if (exp.e1.op == TOKslice)
{
SliceExp se = cast(SliceExp)exp.e1;
if (se.e1.type.toBasetype().ty == Tsarray)
{
exp.error("cannot append to static array %s", se.e1.type.toChars());
result = new ErrorExp();
return;
}
}
exp.e1 = exp.e1.modifiableLvalue(sc, exp.e1);
if (exp.e1.op == TOKerror)
{
result = exp.e1;
return;
}
if (exp.e2.op == TOKerror)
{
result = exp.e2;
return;
}
if (checkNonAssignmentArrayOp(exp.e2))
{
result = new ErrorExp();
return;
}
Type tb1 = exp.e1.type.toBasetype();
Type tb1next = tb1.nextOf();
Type tb2 = exp.e2.type.toBasetype();
/* Two possibilities:
* 1. appending T[] to T[]
* 2. appending T to T[]
*/
bool appendArray = false; // assume case 2
if ((tb1.ty == Tarray) &&
(tb2.ty == Tarray || tb2.ty == Tsarray) &&
(exp.e2.implicitConvTo(exp.e1.type) ||
(tb2.nextOf().implicitConvTo(tb1next) &&
(tb2.nextOf().size(Loc()) == tb1next.size(Loc())))))
{
// case 1: append array
appendArray = true;
if (exp.e1.checkPostblit(sc, tb1next))
{
result = new ErrorExp();
return;
}
exp.e2 = exp.e2.castTo(sc, exp.e1.type);
}
else if ((tb1.ty == Tarray) && exp.e2.implicitConvTo(tb1next))
{
// Append element
if (exp.e2.checkPostblit(sc, tb2))
{
result = new ErrorExp();
return;
}
exp.e2 = exp.e2.castTo(sc, tb1next);
exp.e2 = doCopyOrMove(sc, exp.e2);
}
else if (tb1.ty == Tarray &&
(tb1next.ty == Tchar || tb1next.ty == Twchar) &&
exp.e2.type.ty != tb1next.ty &&
exp.e2.implicitConvTo(Type.tdchar))
{
// Append dchar to char[] or wchar[]
exp.e2 = exp.e2.castTo(sc, Type.tdchar);
/* Do not allow appending wchar to char[] because if wchar happens
* to be a surrogate pair, nothing good can result.
*/
}
else
{
exp.error("cannot append type %s to type %s", tb2.toChars(), tb1.toChars());
result = new ErrorExp();
return;
}
if (exp.e2.checkValue())
{
result = new ErrorExp();
return;
}
exp.type = exp.e1.type;
auto res = exp.reorderSettingAAElem(sc);
if (!appendArray && global.params.vsafe)
checkAssignEscape(sc, res, false);
result = res;
}
override void visit(AddExp exp)
{
static if (LOGSEMANTIC)
{
printf("AddExp::semantic('%s')\n", exp.toChars());
}
if (exp.type)
{
result = exp;
return;
}
if (Expression ex = binSemanticProp(exp, sc))
{
result = ex;
return;
}
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
Type tb1 = exp.e1.type.toBasetype();
Type tb2 = exp.e2.type.toBasetype();
bool err = false;
if (tb1.ty == Tdelegate || tb1.ty == Tpointer && tb1.nextOf().ty == Tfunction)
{
err |= exp.e1.checkArithmetic();
}
if (tb2.ty == Tdelegate || tb2.ty == Tpointer && tb2.nextOf().ty == Tfunction)
{
err |= exp.e2.checkArithmetic();
}
if (err)
{
result = new ErrorExp();
return;
}
if (tb1.ty == Tpointer && exp.e2.type.isintegral() || tb2.ty == Tpointer && exp.e1.type.isintegral())
{
result = scaleFactor(exp, sc);
return;
}
if (tb1.ty == Tpointer && tb2.ty == Tpointer)
{
result = exp.incompatibleTypes();
return;
}
if (Expression ex = typeCombine(exp, sc))
{
result = ex;
return;
}
Type tb = exp.type.toBasetype();
if (tb.ty == Tarray || tb.ty == Tsarray)
{
if (!isArrayOpValid(exp))
{
result = arrayOpInvalidError(exp);
return;
}
result = exp;
return;
}
tb1 = exp.e1.type.toBasetype();
if (!Target.isVectorOpSupported(tb1, exp.op, tb2))
{
result = exp.incompatibleTypes();
return;
}
if ((tb1.isreal() && exp.e2.type.isimaginary()) || (tb1.isimaginary() && exp.e2.type.isreal()))
{
switch (exp.type.toBasetype().ty)
{
case Tfloat32:
case Timaginary32:
exp.type = Type.tcomplex32;
break;
case Tfloat64:
case Timaginary64:
exp.type = Type.tcomplex64;
break;
case Tfloat80:
case Timaginary80:
exp.type = Type.tcomplex80;
break;
default:
assert(0);
}
}
result = exp;
}
override void visit(MinExp exp)
{
static if (LOGSEMANTIC)
{
printf("MinExp::semantic('%s')\n", exp.toChars());
}
if (exp.type)
{
result = exp;
return;
}
if (Expression ex = binSemanticProp(exp, sc))
{
result = ex;
return;
}
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
Type t1 = exp.e1.type.toBasetype();
Type t2 = exp.e2.type.toBasetype();
bool err = false;
if (t1.ty == Tdelegate || t1.ty == Tpointer && t1.nextOf().ty == Tfunction)
{
err |= exp.e1.checkArithmetic();
}
if (t2.ty == Tdelegate || t2.ty == Tpointer && t2.nextOf().ty == Tfunction)
{
err |= exp.e2.checkArithmetic();
}
if (err)
{
result = new ErrorExp();
return;
}
if (t1.ty == Tpointer)
{
if (t2.ty == Tpointer)
{
// Need to divide the result by the stride
// Replace (ptr - ptr) with (ptr - ptr) / stride
d_int64 stride;
// make sure pointer types are compatible
if (Expression ex = typeCombine(exp, sc))
{
result = ex;
return;
}
exp.type = Type.tptrdiff_t;
stride = t2.nextOf().size();
if (stride == 0)
{
e = new IntegerExp(exp.loc, 0, Type.tptrdiff_t);
}
else
{
e = new DivExp(exp.loc, exp, new IntegerExp(Loc(), stride, Type.tptrdiff_t));
e.type = Type.tptrdiff_t;
}
}
else if (t2.isintegral())
e = scaleFactor(exp, sc);
else
{
exp.error("can't subtract %s from pointer", t2.toChars());
e = new ErrorExp();
}
result = e;
return;
}
if (t2.ty == Tpointer)
{
exp.type = exp.e2.type;
exp.error("can't subtract pointer from %s", exp.e1.type.toChars());
result = new ErrorExp();
return;
}
if (Expression ex = typeCombine(exp, sc))
{
result = ex;
return;
}
Type tb = exp.type.toBasetype();
if (tb.ty == Tarray || tb.ty == Tsarray)
{
if (!isArrayOpValid(exp))
{
result = arrayOpInvalidError(exp);
return;
}
result = exp;
return;
}
t1 = exp.e1.type.toBasetype();
t2 = exp.e2.type.toBasetype();
if (!Target.isVectorOpSupported(t1, exp.op, t2))
{
result = exp.incompatibleTypes();
return;
}
if ((t1.isreal() && t2.isimaginary()) || (t1.isimaginary() && t2.isreal()))
{
switch (exp.type.ty)
{
case Tfloat32:
case Timaginary32:
exp.type = Type.tcomplex32;
break;
case Tfloat64:
case Timaginary64:
exp.type = Type.tcomplex64;
break;
case Tfloat80:
case Timaginary80:
exp.type = Type.tcomplex80;
break;
default:
assert(0);
}
}
result = exp;
return;
}
override void visit(CatExp exp)
{
//printf("CatExp::semantic() %s\n", toChars());
if (exp.type)
{
result = exp;
return;
}
if (Expression ex = binSemanticProp(exp, sc))
{
result = ex;
return;
}
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
Type tb1 = exp.e1.type.toBasetype();
Type tb2 = exp.e2.type.toBasetype();
auto f1 = checkNonAssignmentArrayOp(exp.e1);
auto f2 = checkNonAssignmentArrayOp(exp.e2);
if (f1 || f2)
{
result = new ErrorExp();
return;
}
/* BUG: Should handle things like:
* char c;
* c ~ ' '
* ' ' ~ c;
*/
version (none)
{
exp.e1.type.print();
exp.e2.type.print();
}
Type tb1next = tb1.nextOf();
Type tb2next = tb2.nextOf();
// Check for: array ~ array
if (tb1next && tb2next && (tb1next.implicitConvTo(tb2next) >= MATCHconst || tb2next.implicitConvTo(tb1next) >= MATCHconst || exp.e1.op == TOKarrayliteral && exp.e1.implicitConvTo(tb2) || exp.e2.op == TOKarrayliteral && exp.e2.implicitConvTo(tb1)))
{
/* https://issues.dlang.org/show_bug.cgi?id=9248
* Here to avoid the case of:
* void*[] a = [cast(void*)1];
* void*[] b = [cast(void*)2];
* a ~ b;
* becoming:
* a ~ [cast(void*)b];
*/
/* https://issues.dlang.org/show_bug.cgi?id=14682
* Also to avoid the case of:
* int[][] a;
* a ~ [];
* becoming:
* a ~ cast(int[])[];
*/
goto Lpeer;
}
// Check for: array ~ element
if ((tb1.ty == Tsarray || tb1.ty == Tarray) && tb2.ty != Tvoid)
{
if (exp.e1.op == TOKarrayliteral)
{
exp.e2 = doCopyOrMove(sc, exp.e2);
// https://issues.dlang.org/show_bug.cgi?id=14686
// Postblit call appears in AST, and this is
// finally translated to an ArrayLiteralExp in below optimize().
}
else if (exp.e1.op == TOKstring)
{
// No postblit call exists on character (integer) value.
}
else
{
if (exp.e2.checkPostblit(sc, tb2))
{
result = new ErrorExp();
return;
}
// Postblit call will be done in runtime helper function
}
if (exp.e1.op == TOKarrayliteral && exp.e1.implicitConvTo(tb2.arrayOf()))
{
exp.e1 = exp.e1.implicitCastTo(sc, tb2.arrayOf());
exp.type = tb2.arrayOf();
goto L2elem;
}
if (exp.e2.implicitConvTo(tb1next) >= MATCHconvert)
{
exp.e2 = exp.e2.implicitCastTo(sc, tb1next);
exp.type = tb1next.arrayOf();
L2elem:
if (tb2.ty == Tarray || tb2.ty == Tsarray)
{
// Make e2 into [e2]
exp.e2 = new ArrayLiteralExp(exp.e2.loc, exp.e2);
exp.e2.type = exp.type;
}
result = exp.optimize(WANTvalue);
return;
}
}
// Check for: element ~ array
if ((tb2.ty == Tsarray || tb2.ty == Tarray) && tb1.ty != Tvoid)
{
if (exp.e2.op == TOKarrayliteral)
{
exp.e1 = doCopyOrMove(sc, exp.e1);
}
else if (exp.e2.op == TOKstring)
{
}
else
{
if (exp.e1.checkPostblit(sc, tb1))
{
result = new ErrorExp();
return;
}
}
if (exp.e2.op == TOKarrayliteral && exp.e2.implicitConvTo(tb1.arrayOf()))
{
exp.e2 = exp.e2.implicitCastTo(sc, tb1.arrayOf());
exp.type = tb1.arrayOf();
goto L1elem;
}
if (exp.e1.implicitConvTo(tb2next) >= MATCHconvert)
{
exp.e1 = exp.e1.implicitCastTo(sc, tb2next);
exp.type = tb2next.arrayOf();
L1elem:
if (tb1.ty == Tarray || tb1.ty == Tsarray)
{
// Make e1 into [e1]
exp.e1 = new ArrayLiteralExp(exp.e1.loc, exp.e1);
exp.e1.type = exp.type;
}
result = exp.optimize(WANTvalue);
return;
}
}
Lpeer:
if ((tb1.ty == Tsarray || tb1.ty == Tarray) && (tb2.ty == Tsarray || tb2.ty == Tarray) && (tb1next.mod || tb2next.mod) && (tb1next.mod != tb2next.mod))
{
Type t1 = tb1next.mutableOf().constOf().arrayOf();
Type t2 = tb2next.mutableOf().constOf().arrayOf();
if (exp.e1.op == TOKstring && !(cast(StringExp)exp.e1).committed)
exp.e1.type = t1;
else
exp.e1 = exp.e1.castTo(sc, t1);
if (exp.e2.op == TOKstring && !(cast(StringExp)exp.e2).committed)
exp.e2.type = t2;
else
exp.e2 = exp.e2.castTo(sc, t2);
}
if (Expression ex = typeCombine(exp, sc))
{
result = ex;
return;
}
exp.type = exp.type.toHeadMutable();
Type tb = exp.type.toBasetype();
if (tb.ty == Tsarray)
exp.type = tb.nextOf().arrayOf();
if (exp.type.ty == Tarray && tb1next && tb2next && tb1next.mod != tb2next.mod)
{
exp.type = exp.type.nextOf().toHeadMutable().arrayOf();
}
if (Type tbn = tb.nextOf())
{
if (exp.checkPostblit(sc, tbn))
{
result = new ErrorExp();
return;
}
}
version (none)
{
exp.e1.type.print();
exp.e2.type.print();
exp.type.print();
exp.print();
}
Type t1 = exp.e1.type.toBasetype();
Type t2 = exp.e2.type.toBasetype();
if ((t1.ty == Tarray || t1.ty == Tsarray) &&
(t2.ty == Tarray || t2.ty == Tsarray))
{
// Normalize to ArrayLiteralExp or StringExp as far as possible
e = exp.optimize(WANTvalue);
}
else
{
//printf("(%s) ~ (%s)\n", e1.toChars(), e2.toChars());
result = exp.incompatibleTypes();
return;
}
result = e;
}
override void visit(MulExp exp)
{
version (none)
{
printf("MulExp::semantic() %s\n", exp.toChars());
}
if (exp.type)
{
result = exp;
return;
}
if (Expression ex = binSemanticProp(exp, sc))
{
result = ex;
return;
}
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
if (Expression ex = typeCombine(exp, sc))
{
result = ex;
return;
}
Type tb = exp.type.toBasetype();
if (tb.ty == Tarray || tb.ty == Tsarray)
{
if (!isArrayOpValid(exp))
{
result = arrayOpInvalidError(exp);
return;
}
result = exp;
return;
}
if (exp.checkArithmeticBin())
{
result = new ErrorExp();
return;
}
if (exp.type.isfloating())
{
Type t1 = exp.e1.type;
Type t2 = exp.e2.type;
if (t1.isreal())
{
exp.type = t2;
}
else if (t2.isreal())
{
exp.type = t1;
}
else if (t1.isimaginary())
{
if (t2.isimaginary())
{
switch (t1.toBasetype().ty)
{
case Timaginary32:
exp.type = Type.tfloat32;
break;
case Timaginary64:
exp.type = Type.tfloat64;
break;
case Timaginary80:
exp.type = Type.tfloat80;
break;
default:
assert(0);
}
// iy * iv = -yv
exp.e1.type = exp.type;
exp.e2.type = exp.type;
e = new NegExp(exp.loc, exp);
e = e.semantic(sc);
result = e;
return;
}
else
exp.type = t2; // t2 is complex
}
else if (t2.isimaginary())
{
exp.type = t1; // t1 is complex
}
}
else if (!Target.isVectorOpSupported(tb, exp.op, exp.e2.type.toBasetype()))
{
result = exp.incompatibleTypes();
return;
}
result = exp;
}
override void visit(DivExp exp)
{
if (exp.type)
{
result = exp;
return;
}
if (Expression ex = binSemanticProp(exp, sc))
{
result = ex;
return;
}
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
if (Expression ex = typeCombine(exp, sc))
{
result = ex;
return;
}
Type tb = exp.type.toBasetype();
if (tb.ty == Tarray || tb.ty == Tsarray)
{
if (!isArrayOpValid(exp))
{
result = arrayOpInvalidError(exp);
return;
}
result = exp;
return;
}
if (exp.checkArithmeticBin())
{
result = new ErrorExp();
return;
}
if (exp.type.isfloating())
{
Type t1 = exp.e1.type;
Type t2 = exp.e2.type;
if (t1.isreal())
{
exp.type = t2;
if (t2.isimaginary())
{
// x/iv = i(-x/v)
exp.e2.type = t1;
e = new NegExp(exp.loc, exp);
e = e.semantic(sc);
result = e;
return;
}
}
else if (t2.isreal())
{
exp.type = t1;
}
else if (t1.isimaginary())
{
if (t2.isimaginary())
{
switch (t1.toBasetype().ty)
{
case Timaginary32:
exp.type = Type.tfloat32;
break;
case Timaginary64:
exp.type = Type.tfloat64;
break;
case Timaginary80:
exp.type = Type.tfloat80;
break;
default:
assert(0);
}
}
else
exp.type = t2; // t2 is complex
}
else if (t2.isimaginary())
{
exp.type = t1; // t1 is complex
}
}
else if (!Target.isVectorOpSupported(tb, exp.op, exp.e2.type.toBasetype()))
{
result = exp.incompatibleTypes();
return;
}
result = exp;
}
override void visit(ModExp exp)
{
if (exp.type)
{
result = exp;
return;
}
if (Expression ex = binSemanticProp(exp, sc))
{
result = ex;
return;
}
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
if (Expression ex = typeCombine(exp, sc))
{
result = ex;
return;
}
Type tb = exp.type.toBasetype();
if (tb.ty == Tarray || tb.ty == Tsarray)
{
if (!isArrayOpValid(exp))
{
result = arrayOpInvalidError(exp);
return;
}
result = exp;
return;
}
if (!Target.isVectorOpSupported(tb, exp.op, exp.e2.type.toBasetype()))
{
result = exp.incompatibleTypes();
return;
}
if (exp.checkArithmeticBin())
{
result = new ErrorExp();
return;
}
if (exp.type.isfloating())
{
exp.type = exp.e1.type;
if (exp.e2.type.iscomplex())
{
exp.error("cannot perform modulo complex arithmetic");
result = new ErrorExp();
return;
}
}
result = exp;
}
override void visit(PowExp exp)
{
if (exp.type)
{
result = exp;
return;
}
//printf("PowExp::semantic() %s\n", toChars());
if (Expression ex = binSemanticProp(exp, sc))
{
result = ex;
return;
}
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
if (Expression ex = typeCombine(exp, sc))
{
result = ex;
return;
}
Type tb = exp.type.toBasetype();
if (tb.ty == Tarray || tb.ty == Tsarray)
{
if (!isArrayOpValid(exp))
{
result = arrayOpInvalidError(exp);
return;
}
result = exp;
return;
}
if (exp.checkArithmeticBin())
{
result = new ErrorExp();
return;
}
if (!Target.isVectorOpSupported(tb, exp.op, exp.e2.type.toBasetype()))
{
result = exp.incompatibleTypes();
return;
}
// For built-in numeric types, there are several cases.
// TODO: backend support, especially for e1 ^^ 2.
// First, attempt to fold the expression.
e = exp.optimize(WANTvalue);
if (e.op != TOKpow)
{
e = e.semantic(sc);
result = e;
return;
}
// Determine if we're raising to an integer power.
sinteger_t intpow = 0;
if (exp.e2.op == TOKint64 && (cast(sinteger_t)exp.e2.toInteger() == 2 || cast(sinteger_t)exp.e2.toInteger() == 3))
intpow = exp.e2.toInteger();
else if (exp.e2.op == TOKfloat64 && (exp.e2.toReal() == real_t(cast(sinteger_t)exp.e2.toReal())))
intpow = cast(sinteger_t)exp.e2.toReal();
// Deal with x^^2, x^^3 immediately, since they are of practical importance.
if (intpow == 2 || intpow == 3)
{
// Replace x^^2 with (tmp = x, tmp*tmp)
// Replace x^^3 with (tmp = x, tmp*tmp*tmp)
auto tmp = copyToTemp(0, "__powtmp", exp.e1);
Expression de = new DeclarationExp(exp.loc, tmp);
Expression ve = new VarExp(exp.loc, tmp);
/* Note that we're reusing ve. This should be ok.
*/
Expression me = new MulExp(exp.loc, ve, ve);
if (intpow == 3)
me = new MulExp(exp.loc, me, ve);
e = new CommaExp(exp.loc, de, me);
e = e.semantic(sc);
result = e;
return;
}
Module mmath = loadStdMath();
if (!mmath)
{
//error("requires std.math for ^^ operators");
//fatal();
// Leave handling of PowExp to the backend, or throw
// an error gracefully if no backend support exists.
if (Expression ex = typeCombine(exp, sc))
{
result = ex;
return;
}
result = exp;
return;
}
e = new ScopeExp(exp.loc, mmath);
if (exp.e2.op == TOKfloat64 && exp.e2.toReal() == CTFloat.half)
{
// Replace e1 ^^ 0.5 with .std.math.sqrt(x)
e = new CallExp(exp.loc, new DotIdExp(exp.loc, e, Id._sqrt), exp.e1);
}
else
{
// Replace e1 ^^ e2 with .std.math.pow(e1, e2)
e = new CallExp(exp.loc, new DotIdExp(exp.loc, e, Id._pow), exp.e1, exp.e2);
}
e = e.semantic(sc);
result = e;
return;
}
override void visit(ShlExp exp)
{
//printf("ShlExp::semantic(), type = %p\n", type);
if (exp.type)
{
result = exp;
return;
}
if (Expression ex = binSemanticProp(exp, sc))
{
result = ex;
return;
}
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
if (exp.checkIntegralBin())
{
result = new ErrorExp();
return;
}
if (!Target.isVectorOpSupported(exp.e1.type.toBasetype(), exp.op, exp.e2.type.toBasetype()))
{
result = exp.incompatibleTypes();
return;
}
exp.e1 = integralPromotions(exp.e1, sc);
if (exp.e2.type.toBasetype().ty != Tvector)
exp.e2 = exp.e2.castTo(sc, Type.tshiftcnt);
exp.type = exp.e1.type;
result = exp;
}
override void visit(ShrExp exp)
{
if (exp.type)
{
result = exp;
return;
}
if (Expression ex = binSemanticProp(exp, sc))
{
result = ex;
return;
}
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
if (exp.checkIntegralBin())
{
result = new ErrorExp();
return;
}
if (!Target.isVectorOpSupported(exp.e1.type.toBasetype(), exp.op, exp.e2.type.toBasetype()))
{
result = exp.incompatibleTypes();
return;
}
exp.e1 = integralPromotions(exp.e1, sc);
if (exp.e2.type.toBasetype().ty != Tvector)
exp.e2 = exp.e2.castTo(sc, Type.tshiftcnt);
exp.type = exp.e1.type;
result = exp;
}
override void visit(UshrExp exp)
{
if (exp.type)
{
result = exp;
return;
}
if (Expression ex = binSemanticProp(exp, sc))
{
result = ex;
return;
}
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
if (exp.checkIntegralBin())
{
result = new ErrorExp();
return;
}
if (!Target.isVectorOpSupported(exp.e1.type.toBasetype(), exp.op, exp.e2.type.toBasetype()))
{
result = exp.incompatibleTypes();
return;
}
exp.e1 = integralPromotions(exp.e1, sc);
if (exp.e2.type.toBasetype().ty != Tvector)
exp.e2 = exp.e2.castTo(sc, Type.tshiftcnt);
exp.type = exp.e1.type;
result = exp;
}
override void visit(AndExp exp)
{
if (exp.type)
{
result = exp;
return;
}
if (Expression ex = binSemanticProp(exp, sc))
{
result = ex;
return;
}
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
if (exp.e1.type.toBasetype().ty == Tbool && exp.e2.type.toBasetype().ty == Tbool)
{
exp.type = exp.e1.type;
result = exp;
return;
}
if (Expression ex = typeCombine(exp, sc))
{
result = ex;
return;
}
Type tb = exp.type.toBasetype();
if (tb.ty == Tarray || tb.ty == Tsarray)
{
if (!isArrayOpValid(exp))
{
result = arrayOpInvalidError(exp);
return;
}
result = exp;
return;
}
if (!Target.isVectorOpSupported(tb, exp.op, exp.e2.type.toBasetype()))
{
result = exp.incompatibleTypes();
return;
}
if (exp.checkIntegralBin())
{
result = new ErrorExp();
return;
}
result = exp;
}
override void visit(OrExp exp)
{
if (exp.type)
{
result = exp;
return;
}
if (Expression ex = binSemanticProp(exp, sc))
{
result = ex;
return;
}
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
if (exp.e1.type.toBasetype().ty == Tbool && exp.e2.type.toBasetype().ty == Tbool)
{
exp.type = exp.e1.type;
result = exp;
return;
}
if (Expression ex = typeCombine(exp, sc))
{
result = ex;
return;
}
Type tb = exp.type.toBasetype();
if (tb.ty == Tarray || tb.ty == Tsarray)
{
if (!isArrayOpValid(exp))
{
result = arrayOpInvalidError(exp);
return;
}
result = exp;
return;
}
if (!Target.isVectorOpSupported(tb, exp.op, exp.e2.type.toBasetype()))
{
result = exp.incompatibleTypes();
return;
}
if (exp.checkIntegralBin())
{
result = new ErrorExp();
return;
}
result = exp;
}
override void visit(XorExp exp)
{
if (exp.type)
{
result = exp;
return;
}
if (Expression ex = binSemanticProp(exp, sc))
{
result = ex;
return;
}
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
if (exp.e1.type.toBasetype().ty == Tbool && exp.e2.type.toBasetype().ty == Tbool)
{
exp.type = exp.e1.type;
result = exp;
return;
}
if (Expression ex = typeCombine(exp, sc))
{
result = ex;
return;
}
Type tb = exp.type.toBasetype();
if (tb.ty == Tarray || tb.ty == Tsarray)
{
if (!isArrayOpValid(exp))
{
result = arrayOpInvalidError(exp);
return;
}
result = exp;
return;
}
if (!Target.isVectorOpSupported(tb, exp.op, exp.e2.type.toBasetype()))
{
result = exp.incompatibleTypes();
return;
}
if (exp.checkIntegralBin())
{
result = new ErrorExp();
return;
}
result = exp;
}
override void visit(LogicalExp exp)
{
if (exp.type)
{
result = exp;
return;
}
exp.setNoderefOperands();
Expression e1x = exp.e1.semantic(sc);
// for static alias this: https://issues.dlang.org/show_bug.cgi?id=17684
if (e1x.op == TOKtype)
e1x = resolveAliasThis(sc, e1x);
e1x = resolveProperties(sc, e1x);
e1x = e1x.toBoolean(sc);
uint cs1 = sc.callSuper;
if (sc.flags & SCOPEcondition)
{
/* If in static if, don't evaluate e2 if we don't have to.
*/
e1x = e1x.optimize(WANTvalue);
if (e1x.isBool(exp.op == TOKoror))
{
result = new IntegerExp(exp.loc, exp.op == TOKoror, Type.tbool);
return;
}
}
Expression e2x = exp.e2.semantic(sc);
sc.mergeCallSuper(exp.loc, cs1);
// for static alias this: https://issues.dlang.org/show_bug.cgi?id=17684
if (e2x.op == TOKtype)
e2x = resolveAliasThis(sc, e2x);
e2x = resolveProperties(sc, e2x);
auto f1 = checkNonAssignmentArrayOp(e1x);
auto f2 = checkNonAssignmentArrayOp(e2x);
if (f1 || f2)
{
result = new ErrorExp();
return;
}
// Unless the right operand is 'void', the expression is converted to 'bool'.
if (e2x.type.ty != Tvoid)
e2x = e2x.toBoolean(sc);
if (e2x.op == TOKtype || e2x.op == TOKscope)
{
exp.error("%s is not an expression", exp.e2.toChars());
result = new ErrorExp();
return;
}
if (e1x.op == TOKerror)
{
result = e1x;
return;
}
if (e2x.op == TOKerror)
{
result = e2x;
return;
}
// The result type is 'bool', unless the right operand has type 'void'.
if (e2x.type.ty == Tvoid)
exp.type = Type.tvoid;
else
exp.type = Type.tbool;
exp.e1 = e1x;
exp.e2 = e2x;
result = exp;
}
override void visit(CmpExp exp)
{
static if (LOGSEMANTIC)
{
printf("CmpExp::semantic('%s')\n", exp.toChars());
}
if (exp.type)
{
result = exp;
return;
}
exp.setNoderefOperands();
if (Expression ex = binSemanticProp(exp, sc))
{
result = ex;
return;
}
Type t1 = exp.e1.type.toBasetype();
Type t2 = exp.e2.type.toBasetype();
if (t1.ty == Tclass && exp.e2.op == TOKnull || t2.ty == Tclass && exp.e1.op == TOKnull)
{
exp.error("do not use null when comparing class types");
result = new ErrorExp();
return;
}
Expression e = exp.op_overload(sc);
if (e)
{
if (!e.type.isscalar() && e.type.equals(exp.e1.type))
{
exp.error("recursive opCmp expansion");
result = new ErrorExp();
return;
}
if (e.op == TOKcall)
{
e = new CmpExp(exp.op, exp.loc, e, new IntegerExp(exp.loc, 0, Type.tint32));
e = e.semantic(sc);
}
result = e;
return;
}
if (Expression ex = typeCombine(exp, sc))
{
result = ex;
return;
}
auto f1 = checkNonAssignmentArrayOp(exp.e1);
auto f2 = checkNonAssignmentArrayOp(exp.e2);
if (f1 || f2)
{
result = new ErrorExp();
return;
}
exp.type = Type.tbool;
// Special handling for array comparisons
Expression arrayLowering = null;
t1 = exp.e1.type.toBasetype();
t2 = exp.e2.type.toBasetype();
if ((t1.ty == Tarray || t1.ty == Tsarray || t1.ty == Tpointer) && (t2.ty == Tarray || t2.ty == Tsarray || t2.ty == Tpointer))
{
Type t1next = t1.nextOf();
Type t2next = t2.nextOf();
if (t1next.implicitConvTo(t2next) < MATCHconst && t2next.implicitConvTo(t1next) < MATCHconst && (t1next.ty != Tvoid && t2next.ty != Tvoid))
{
exp.error("array comparison type mismatch, %s vs %s", t1next.toChars(), t2next.toChars());
result = new ErrorExp();
return;
}
if ((t1.ty == Tarray || t1.ty == Tsarray) && (t2.ty == Tarray || t2.ty == Tsarray))
{
// Lower to object.__cmp(e1, e2)
Expression al = new IdentifierExp(exp.loc, Id.empty);
al = new DotIdExp(exp.loc, al, Id.object);
al = new DotIdExp(exp.loc, al, Id.__cmp);
al = al.semantic(sc);
auto arguments = new Expressions();
arguments.push(exp.e1);
arguments.push(exp.e2);
al = new CallExp(exp.loc, al, arguments);
al = new CmpExp(exp.op, exp.loc, al, new IntegerExp(0));
arrayLowering = al;
}
}
else if (t1.ty == Tstruct || t2.ty == Tstruct || (t1.ty == Tclass && t2.ty == Tclass))
{
if (t2.ty == Tstruct)
exp.error("need member function opCmp() for %s %s to compare", t2.toDsymbol(sc).kind(), t2.toChars());
else
exp.error("need member function opCmp() for %s %s to compare", t1.toDsymbol(sc).kind(), t1.toChars());
result = new ErrorExp();
return;
}
else if (t1.iscomplex() || t2.iscomplex())
{
exp.error("compare not defined for complex operands");
result = new ErrorExp();
return;
}
else if (t1.ty == Taarray || t2.ty == Taarray)
{
exp.error("%s is not defined for associative arrays", Token.toChars(exp.op));
result = new ErrorExp();
return;
}
else if (!Target.isVectorOpSupported(t1, exp.op, t2))
{
result = exp.incompatibleTypes();
return;
}
else
{
bool r1 = exp.e1.checkValue();
bool r2 = exp.e2.checkValue();
if (r1 || r2)
{
result = new ErrorExp();
return;
}
}
TOK altop;
switch (exp.op)
{
// Refer rel_integral[] table
case TOKunord:
altop = TOKerror;
break;
case TOKlg:
altop = TOKnotequal;
break;
case TOKleg:
altop = TOKerror;
break;
case TOKule:
altop = TOKle;
break;
case TOKul:
altop = TOKlt;
break;
case TOKuge:
altop = TOKge;
break;
case TOKug:
altop = TOKgt;
break;
case TOKue:
altop = TOKequal;
break;
default:
altop = TOKreserved;
break;
}
if (altop == TOKerror && (t1.ty == Tarray || t1.ty == Tsarray || t2.ty == Tarray || t2.ty == Tsarray))
{
exp.error("'%s' is not defined for array comparisons", Token.toChars(exp.op));
result = new ErrorExp();
return;
}
if (altop != TOKreserved)
{
if (!t1.isfloating())
{
if (altop == TOKerror)
{
const(char)* s = exp.op == TOKunord ? "false" : "true";
exp.error("floating point operator '%s' always returns %s for non-floating comparisons", Token.toChars(exp.op), s);
}
else
{
exp.error("use '%s' for non-floating comparisons rather than floating point operator '%s'", Token.toChars(altop), Token.toChars(exp.op));
}
}
else
{
exp.error("use std.math.isNaN to deal with NaN operands rather than floating point operator '%s'", Token.toChars(exp.op));
}
result = new ErrorExp();
return;
}
//printf("CmpExp: %s, type = %s\n", e.toChars(), e.type.toChars());
if (arrayLowering)
{
arrayLowering = arrayLowering.semantic(sc);
result = arrayLowering;
return;
}
result = exp;
return;
}
override void visit(InExp exp)
{
if (exp.type)
{
result = exp;
return;
}
if (Expression ex = binSemanticProp(exp, sc))
{
result = ex;
return;
}
Expression e = exp.op_overload(sc);
if (e)
{
result = e;
return;
}
Type t2b = exp.e2.type.toBasetype();
switch (t2b.ty)
{
case Taarray:
{
TypeAArray ta = cast(TypeAArray)t2b;
// Special handling for array keys
if (!arrayTypeCompatible(exp.e1.loc, exp.e1.type, ta.index))
{
// Convert key to type of key
exp.e1 = exp.e1.implicitCastTo(sc, ta.index);
}
semanticTypeInfo(sc, ta.index);
// Return type is pointer to value
exp.type = ta.nextOf().pointerTo();
break;
}
default:
result = exp.incompatibleTypes();
return;
case Terror:
result = new ErrorExp();
return;
}
result = exp;
}
override void visit(RemoveExp e)
{
if (Expression ex = binSemantic(e, sc))
{
result = ex;
return;
}
result = e;
}
override void visit(EqualExp exp)
{
//printf("EqualExp::semantic('%s')\n", toChars());
if (exp.type)
{
result = exp;
return;
}
exp.setNoderefOperands();
if (auto e = binSemanticProp(exp, sc))
{
result = e;
return;
}
if (exp.e1.op == TOKtype || exp.e2.op == TOKtype)
{
result = exp.incompatibleTypes();
return;
}
{
auto t1 = exp.e1.type;
auto t2 = exp.e2.type;
if (t1.ty == Tenum && t2.ty == Tenum && !t1.equivalent(t2))
exp.deprecation("Comparison between different enumeration types `%s` and `%s`; If this behavior is intended consider using `std.conv.asOriginalType`",
t1.toChars(), t2.toChars());
}
/* Before checking for operator overloading, check to see if we're
* comparing the addresses of two statics. If so, we can just see
* if they are the same symbol.
*/
if (exp.e1.op == TOKaddress && exp.e2.op == TOKaddress)
{
AddrExp ae1 = cast(AddrExp)exp.e1;
AddrExp ae2 = cast(AddrExp)exp.e2;
if (ae1.e1.op == TOKvar && ae2.e1.op == TOKvar)
{
VarExp ve1 = cast(VarExp)ae1.e1;
VarExp ve2 = cast(VarExp)ae2.e1;
if (ve1.var == ve2.var)
{
// They are the same, result is 'true' for ==, 'false' for !=
result = new IntegerExp(exp.loc, (exp.op == TOKequal), Type.tbool);
return;
}
}
}
if (auto e = exp.op_overload(sc))
{
result = e;
return;
}
if (auto e = typeCombine(exp, sc))
{
result = e;
return;
}
auto f1 = checkNonAssignmentArrayOp(exp.e1);
auto f2 = checkNonAssignmentArrayOp(exp.e2);
if (f1 || f2)
{
result = new ErrorExp();
return;
}
exp.type = Type.tbool;
// Special handling for array comparisons
if (!arrayTypeCompatible(exp.loc, exp.e1.type, exp.e2.type))
{
if (exp.e1.type != exp.e2.type && exp.e1.type.isfloating() && exp.e2.type.isfloating())
{
// Cast both to complex
exp.e1 = exp.e1.castTo(sc, Type.tcomplex80);
exp.e2 = exp.e2.castTo(sc, Type.tcomplex80);
}
}
if (exp.e1.type.toBasetype().ty == Taarray)
semanticTypeInfo(sc, exp.e1.type.toBasetype());
Type t1 = exp.e1.type.toBasetype();
Type t2 = exp.e2.type.toBasetype();
if (!Target.isVectorOpSupported(t1, exp.op, t2))
{
result = exp.incompatibleTypes();
return;
}
result = exp;
}
override void visit(IdentityExp exp)
{
if (exp.type)
{
result = exp;
return;
}
exp.setNoderefOperands();
if (auto e = binSemanticProp(exp, sc))
{
result = e;
return;
}
if (auto e = typeCombine(exp, sc))
{
result = e;
return;
}
auto f1 = checkNonAssignmentArrayOp(exp.e1);
auto f2 = checkNonAssignmentArrayOp(exp.e2);
if (f1 || f2)
{
result = new ErrorExp();
return;
}
exp.type = Type.tbool;
if (exp.e1.type != exp.e2.type && exp.e1.type.isfloating() && exp.e2.type.isfloating())
{
// Cast both to complex
exp.e1 = exp.e1.castTo(sc, Type.tcomplex80);
exp.e2 = exp.e2.castTo(sc, Type.tcomplex80);
}
auto tb1 = exp.e1.type.toBasetype();
auto tb2 = exp.e2.type.toBasetype();
if (!Target.isVectorOpSupported(tb1, exp.op, tb2))
{
result = exp.incompatibleTypes();
return;
}
if (exp.e1.type.toBasetype().ty == Tsarray ||
exp.e2.type.toBasetype().ty == Tsarray)
exp.deprecation("identity comparison of static arrays "
~ "implicitly coerces them to slices, "
~ "which are compared by reference");
result = exp;
}
override void visit(CondExp exp)
{
static if (LOGSEMANTIC)
{
printf("CondExp::semantic('%s')\n", exp.toChars());
}
if (exp.type)
{
result = exp;
return;
}
if (exp.econd.op == TOKdotid)
(cast(DotIdExp)exp.econd).noderef = true;
Expression ec = exp.econd.semantic(sc);
ec = resolveProperties(sc, ec);
ec = ec.toBoolean(sc);
uint cs0 = sc.callSuper;
uint* fi0 = sc.saveFieldInit();
Expression e1x = exp.e1.semantic(sc);
e1x = resolveProperties(sc, e1x);
uint cs1 = sc.callSuper;
uint* fi1 = sc.fieldinit;
sc.callSuper = cs0;
sc.fieldinit = fi0;
Expression e2x = exp.e2.semantic(sc);
e2x = resolveProperties(sc, e2x);
sc.mergeCallSuper(exp.loc, cs1);
sc.mergeFieldInit(exp.loc, fi1);
if (ec.op == TOKerror)
{
result = ec;
return;
}
if (ec.type == Type.terror)
{
result = new ErrorExp();
return;
}
exp.econd = ec;
if (e1x.op == TOKerror)
{
result = e1x;
return;
}
if (e1x.type == Type.terror)
{
result = new ErrorExp();
return;
}
exp.e1 = e1x;
if (e2x.op == TOKerror)
{
result = e2x;
return;
}
if (e2x.type == Type.terror)
{
result = new ErrorExp();
return;
}
exp.e2 = e2x;
auto f0 = checkNonAssignmentArrayOp(exp.econd);
auto f1 = checkNonAssignmentArrayOp(exp.e1);
auto f2 = checkNonAssignmentArrayOp(exp.e2);
if (f0 || f1 || f2)
{
result = new ErrorExp();
return;
}
Type t1 = exp.e1.type;
Type t2 = exp.e2.type;
// If either operand is void the result is void, we have to cast both
// the expression to void so that we explicitly discard the expression
// value if any
// https://issues.dlang.org/show_bug.cgi?id=16598
if (t1.ty == Tvoid || t2.ty == Tvoid)
{
exp.type = Type.tvoid;
exp.e1 = exp.e1.castTo(sc, exp.type);
exp.e2 = exp.e2.castTo(sc, exp.type);
}
else if (t1 == t2)
exp.type = t1;
else
{
if (Expression ex = typeCombine(exp, sc))
{
result = ex;
return;
}
switch (exp.e1.type.toBasetype().ty)
{
case Tcomplex32:
case Tcomplex64:
case Tcomplex80:
exp.e2 = exp.e2.castTo(sc, exp.e1.type);
break;
default:
break;
}
switch (exp.e2.type.toBasetype().ty)
{
case Tcomplex32:
case Tcomplex64:
case Tcomplex80:
exp.e1 = exp.e1.castTo(sc, exp.e2.type);
break;
default:
break;
}
if (exp.type.toBasetype().ty == Tarray)
{
exp.e1 = exp.e1.castTo(sc, exp.type);
exp.e2 = exp.e2.castTo(sc, exp.type);
}
}
exp.type = exp.type.merge2();
version (none)
{
printf("res: %s\n", exp.type.toChars());
printf("e1 : %s\n", exp.e1.type.toChars());
printf("e2 : %s\n", exp.e2.type.toChars());
}
/* https://issues.dlang.org/show_bug.cgi?id=14696
* If either e1 or e2 contain temporaries which need dtor,
* make them conditional.
* Rewrite:
* cond ? (__tmp1 = ..., __tmp1) : (__tmp2 = ..., __tmp2)
* to:
* (auto __cond = cond) ? (... __tmp1) : (... __tmp2)
* and replace edtors of __tmp1 and __tmp2 with:
* __tmp1.edtor --> __cond && __tmp1.dtor()
* __tmp2.edtor --> __cond || __tmp2.dtor()
*/
exp.hookDtors(sc);
result = exp;
}
override void visit(FileInitExp e)
{
//printf("FileInitExp::semantic()\n");
e.type = Type.tstring;
result = e;
}
override void visit(LineInitExp e)
{
e.type = Type.tint32;
result = e;
}
override void visit(ModuleInitExp e)
{
//printf("ModuleInitExp::semantic()\n");
e.type = Type.tstring;
result = e;
}
override void visit(FuncInitExp e)
{
//printf("FuncInitExp::semantic()\n");
e.type = Type.tstring;
if (sc.func)
{
result = e.resolveLoc(Loc(), sc);
return;
}
result = e;
}
override void visit(PrettyFuncInitExp e)
{
//printf("PrettyFuncInitExp::semantic()\n");
e.type = Type.tstring;
if (sc.func)
{
result = e.resolveLoc(Loc(), sc);
return;
}
result = e;
}
}
/**********************************
* Try to run semantic routines.
* If they fail, return NULL.
*/
Expression trySemantic(Expression exp, Scope* sc)
{
//printf("+trySemantic(%s)\n", toChars());
uint errors = global.startGagging();
Expression e = semantic(exp, sc);
if (global.endGagging(errors))
{
e = null;
}
//printf("-trySemantic(%s)\n", toChars());
return e;
}
/**************************
* Helper function for easy error propagation.
* If error occurs, returns ErrorExp. Otherwise returns NULL.
*/
Expression unaSemantic(UnaExp e, Scope* sc)
{
static if (LOGSEMANTIC)
{
printf("UnaExp::semantic('%s')\n", e.toChars());
}
Expression e1x = e.e1.semantic(sc);
if (e1x.op == TOKerror)
return e1x;
e.e1 = e1x;
return null;
}
/**************************
* Helper function for easy error propagation.
* If error occurs, returns ErrorExp. Otherwise returns NULL.
*/
Expression binSemantic(BinExp e, Scope* sc)
{
static if (LOGSEMANTIC)
{
printf("BinExp::semantic('%s')\n", e.toChars());
}
Expression e1x = e.e1.semantic(sc);
Expression e2x = e.e2.semantic(sc);
// for static alias this: https://issues.dlang.org/show_bug.cgi?id=17684
if (e1x.op == TOKtype)
e1x = resolveAliasThis(sc, e1x);
if (e2x.op == TOKtype)
e2x = resolveAliasThis(sc, e2x);
if (e1x.op == TOKerror)
return e1x;
if (e2x.op == TOKerror)
return e2x;
e.e1 = e1x;
e.e2 = e2x;
return null;
}
Expression binSemanticProp(BinExp e, Scope* sc)
{
if (Expression ex = binSemantic(e, sc))
return ex;
Expression e1x = resolveProperties(sc, e.e1);
Expression e2x = resolveProperties(sc, e.e2);
if (e1x.op == TOKerror)
return e1x;
if (e2x.op == TOKerror)
return e2x;
e.e1 = e1x;
e.e2 = e2x;
return null;
}
Expression semanticX(DotIdExp exp, Scope* sc)
{
//printf("DotIdExp::semanticX(this = %p, '%s')\n", this, toChars());
if (Expression ex = unaSemantic(exp, sc))
return ex;
if (exp.ident == Id._mangleof)
{
// symbol.mangleof
Dsymbol ds;
switch (exp.e1.op)
{
case TOKscope:
ds = (cast(ScopeExp)exp.e1).sds;
goto L1;
case TOKvar:
ds = (cast(VarExp)exp.e1).var;
goto L1;
case TOKdotvar:
ds = (cast(DotVarExp)exp.e1).var;
goto L1;
case TOKoverloadset:
ds = (cast(OverExp)exp.e1).vars;
goto L1;
case TOKtemplate:
{
TemplateExp te = cast(TemplateExp)exp.e1;
ds = te.fd ? cast(Dsymbol)te.fd : te.td;
}
L1:
{
assert(ds);
if (auto f = ds.isFuncDeclaration())
{
if (f.checkForwardRef(exp.loc))
{
return new ErrorExp();
}
}
OutBuffer buf;
mangleToBuffer(ds, &buf);
const s = buf.peekSlice();
Expression e = new StringExp(exp.loc, buf.extractString(), s.length);
e = e.semantic(sc);
return e;
}
default:
break;
}
}
if (exp.e1.op == TOKvar && exp.e1.type.toBasetype().ty == Tsarray && exp.ident == Id.length)
{
// bypass checkPurity
return exp.e1.type.dotExp(sc, exp.e1, exp.ident, exp.noderef ? Type.DotExpFlag.noDeref : 0);
}
if (exp.e1.op == TOKdot)
{
}
else
{
exp.e1 = resolvePropertiesX(sc, exp.e1);
}
if (exp.e1.op == TOKtuple && exp.ident == Id.offsetof)
{
/* 'distribute' the .offsetof to each of the tuple elements.
*/
TupleExp te = cast(TupleExp)exp.e1;
auto exps = new Expressions();
exps.setDim(te.exps.dim);
for (size_t i = 0; i < exps.dim; i++)
{
Expression e = (*te.exps)[i];
e = e.semantic(sc);
e = new DotIdExp(e.loc, e, Id.offsetof);
(*exps)[i] = e;
}
// Don't evaluate te.e0 in runtime
Expression e = new TupleExp(exp.loc, null, exps);
e = e.semantic(sc);
return e;
}
if (exp.e1.op == TOKtuple && exp.ident == Id.length)
{
TupleExp te = cast(TupleExp)exp.e1;
// Don't evaluate te.e0 in runtime
Expression e = new IntegerExp(exp.loc, te.exps.dim, Type.tsize_t);
return e;
}
// https://issues.dlang.org/show_bug.cgi?id=14416
// Template has no built-in properties except for 'stringof'.
if ((exp.e1.op == TOKdottd || exp.e1.op == TOKtemplate) && exp.ident != Id.stringof)
{
exp.error("template %s does not have property '%s'", exp.e1.toChars(), exp.ident.toChars());
return new ErrorExp();
}
if (!exp.e1.type)
{
exp.error("expression %s does not have property '%s'", exp.e1.toChars(), exp.ident.toChars());
return new ErrorExp();
}
return exp;
}
// Resolve e1.ident without seeing UFCS.
// If flag == 1, stop "not a property" error and return NULL.
Expression semanticY(DotIdExp exp, Scope* sc, int flag)
{
//printf("DotIdExp::semanticY(this = %p, '%s')\n", this, toChars());
//{ static int z; fflush(stdout); if (++z == 10) *(char*)0=0; }
/* Special case: rewrite this.id and super.id
* to be classtype.id and baseclasstype.id
* if we have no this pointer.
*/
if ((exp.e1.op == TOKthis || exp.e1.op == TOKsuper) && !hasThis(sc))
{
if (AggregateDeclaration ad = sc.getStructClassScope())
{
if (exp.e1.op == TOKthis)
{
exp.e1 = new TypeExp(exp.e1.loc, ad.type);
}
else
{
ClassDeclaration cd = ad.isClassDeclaration();
if (cd && cd.baseClass)
exp.e1 = new TypeExp(exp.e1.loc, cd.baseClass.type);
}
}
}
Expression e = semanticX(exp, sc);
if (e != exp)
return e;
Expression eleft;
Expression eright;
if (exp.e1.op == TOKdot)
{
DotExp de = cast(DotExp)exp.e1;
eleft = de.e1;
eright = de.e2;
}
else
{
eleft = null;
eright = exp.e1;
}
Type t1b = exp.e1.type.toBasetype();
if (eright.op == TOKscope) // also used for template alias's
{
ScopeExp ie = cast(ScopeExp)eright;
int flags = SearchLocalsOnly;
/* Disable access to another module's private imports.
* The check for 'is sds our current module' is because
* the current module should have access to its own imports.
*/
if (ie.sds.isModule() && ie.sds != sc._module)
flags |= IgnorePrivateImports;
if (sc.flags & SCOPEignoresymbolvisibility)
flags |= IgnoreSymbolVisibility;
Dsymbol s = ie.sds.search(exp.loc, exp.ident, flags);
/* Check for visibility before resolving aliases because public
* aliases to private symbols are public.
*/
if (s && !(sc.flags & SCOPEignoresymbolvisibility) && !symbolIsVisible(sc._module, s))
{
if (s.isDeclaration())
error(exp.loc, "%s is not visible from module %s", s.toPrettyChars(), sc._module.toChars());
else
deprecation(exp.loc, "%s is not visible from module %s", s.toPrettyChars(), sc._module.toChars());
// s = null;
}
if (s)
{
if (auto p = s.isPackage())
checkAccess(exp.loc, sc, p);
// if 's' is a tuple variable, the tuple is returned.
s = s.toAlias();
exp.checkDeprecated(sc, s);
EnumMember em = s.isEnumMember();
if (em)
{
return em.getVarExp(exp.loc, sc);
}
VarDeclaration v = s.isVarDeclaration();
if (v)
{
//printf("DotIdExp:: Identifier '%s' is a variable, type '%s'\n", toChars(), v.type.toChars());
if (!v.type ||
!v.type.deco && v.inuse)
{
if (v.inuse)
exp.error("circular reference to %s '%s'", v.kind(), v.toPrettyChars());
else
exp.error("forward reference to %s '%s'", v.kind(), v.toPrettyChars());
return new ErrorExp();
}
if (v.type.ty == Terror)
return new ErrorExp();
if ((v.storage_class & STCmanifest) && v._init && !exp.wantsym)
{
/* Normally, the replacement of a symbol with its initializer is supposed to be in semantic2().
* Introduced by https://github.com/dlang/dmd/pull/5588 which should probably
* be reverted. `wantsym` is the hack to work around the problem.
*/
if (v.inuse)
{
error(exp.loc, "circular initialization of %s '%s'", v.kind(), v.toPrettyChars());
return new ErrorExp();
}
e = v.expandInitializer(exp.loc);
v.inuse++;
e = e.semantic(sc);
v.inuse--;
return e;
}
if (v.needThis())
{
if (!eleft)
eleft = new ThisExp(exp.loc);
e = new DotVarExp(exp.loc, eleft, v);
e = e.semantic(sc);
}
else
{
e = new VarExp(exp.loc, v);
if (eleft)
{
e = new CommaExp(exp.loc, eleft, e);
e.type = v.type;
}
}
e = e.deref();
return e.semantic(sc);
}
FuncDeclaration f = s.isFuncDeclaration();
if (f)
{
//printf("it's a function\n");
if (!f.functionSemantic())
return new ErrorExp();
if (f.needThis())
{
if (!eleft)
eleft = new ThisExp(exp.loc);
e = new DotVarExp(exp.loc, eleft, f, true);
e = e.semantic(sc);
}
else
{
e = new VarExp(exp.loc, f, true);
if (eleft)
{
e = new CommaExp(exp.loc, eleft, e);
e.type = f.type;
}
}
return e;
}
if (auto td = s.isTemplateDeclaration())
{
if (eleft)
e = new DotTemplateExp(exp.loc, eleft, td);
else
e = new TemplateExp(exp.loc, td);
e = e.semantic(sc);
return e;
}
if (OverDeclaration od = s.isOverDeclaration())
{
e = new VarExp(exp.loc, od, true);
if (eleft)
{
e = new CommaExp(exp.loc, eleft, e);
e.type = Type.tvoid; // ambiguous type?
}
return e;
}
OverloadSet o = s.isOverloadSet();
if (o)
{
//printf("'%s' is an overload set\n", o.toChars());
return new OverExp(exp.loc, o);
}
if (auto t = s.getType())
{
return (new TypeExp(exp.loc, t)).semantic(sc);
}
TupleDeclaration tup = s.isTupleDeclaration();
if (tup)
{
if (eleft)
{
e = new DotVarExp(exp.loc, eleft, tup);
e = e.semantic(sc);
return e;
}
e = new TupleExp(exp.loc, tup);
e = e.semantic(sc);
return e;
}
ScopeDsymbol sds = s.isScopeDsymbol();
if (sds)
{
//printf("it's a ScopeDsymbol %s\n", ident.toChars());
e = new ScopeExp(exp.loc, sds);
e = e.semantic(sc);
if (eleft)
e = new DotExp(exp.loc, eleft, e);
return e;
}
Import imp = s.isImport();
if (imp)
{
ie = new ScopeExp(exp.loc, imp.pkg);
return ie.semantic(sc);
}
// BUG: handle other cases like in IdentifierExp::semantic()
debug
{
printf("s = '%s', kind = '%s'\n", s.toChars(), s.kind());
}
assert(0);
}
else if (exp.ident == Id.stringof)
{
const p = ie.toChars();
e = new StringExp(exp.loc, cast(char*)p, strlen(p));
e = e.semantic(sc);
return e;
}
if (ie.sds.isPackage() || ie.sds.isImport() || ie.sds.isModule())
{
flag = 0;
}
if (flag)
return null;
s = ie.sds.search_correct(exp.ident);
if (s)
exp.error("undefined identifier `%s` in %s `%s`, did you mean %s `%s`?", exp.ident.toChars(), ie.sds.kind(), ie.sds.toPrettyChars(), s.kind(), s.toChars());
else
exp.error("undefined identifier `%s` in %s `%s`", exp.ident.toChars(), ie.sds.kind(), ie.sds.toPrettyChars());
return new ErrorExp();
}
else if (t1b.ty == Tpointer && exp.e1.type.ty != Tenum && exp.ident != Id._init && exp.ident != Id.__sizeof && exp.ident != Id.__xalignof && exp.ident != Id.offsetof && exp.ident != Id._mangleof && exp.ident != Id.stringof)
{
Type t1bn = t1b.nextOf();
if (flag)
{
AggregateDeclaration ad = isAggregate(t1bn);
if (ad && !ad.members) // https://issues.dlang.org/show_bug.cgi?id=11312
return null;
}
/* Rewrite:
* p.ident
* as:
* (*p).ident
*/
if (flag && t1bn.ty == Tvoid)
return null;
e = new PtrExp(exp.loc, exp.e1);
e = e.semantic(sc);
return e.type.dotExp(sc, e, exp.ident, flag | (exp.noderef ? Type.DotExpFlag.noDeref : 0));
}
else
{
if (exp.e1.op == TOKtype || exp.e1.op == TOKtemplate)
flag = 0;
e = exp.e1.type.dotExp(sc, exp.e1, exp.ident, flag | (exp.noderef ? Type.DotExpFlag.noDeref : 0));
if (e)
e = e.semantic(sc);
return e;
}
}
// Resolve e1.ident!tiargs without seeing UFCS.
// If flag == 1, stop "not a property" error and return NULL.
Expression semanticY(DotTemplateInstanceExp exp, Scope* sc, int flag)
{
static if (LOGSEMANTIC)
{
printf("DotTemplateInstanceExpY::semantic('%s')\n", exp.toChars());
}
auto die = new DotIdExp(exp.loc, exp.e1, exp.ti.name);
Expression e = die.semanticX(sc);
if (e == die)
{
exp.e1 = die.e1; // take back
Type t1b = exp.e1.type.toBasetype();
if (t1b.ty == Tarray || t1b.ty == Tsarray || t1b.ty == Taarray || t1b.ty == Tnull || (t1b.isTypeBasic() && t1b.ty != Tvoid))
{
/* No built-in type has templatized properties, so do shortcut.
* It is necessary in: 1024.max!"a < b"
*/
if (flag)
return null;
}
e = die.semanticY(sc, flag);
if (flag && e && isDotOpDispatch(e))
{
/* opDispatch!tiargs would be a function template that needs IFTI,
* so it's not a template
*/
e = null; /* fall down to UFCS */
}
if (flag && !e)
return null;
}
assert(e);
L1:
if (e.op == TOKerror)
return e;
if (e.op == TOKdotvar)
{
DotVarExp dve = cast(DotVarExp)e;
if (FuncDeclaration fd = dve.var.isFuncDeclaration())
{
TemplateDeclaration td = fd.findTemplateDeclRoot();
if (td)
{
e = new DotTemplateExp(dve.loc, dve.e1, td);
e = e.semantic(sc);
}
}
else if (OverDeclaration od = dve.var.isOverDeclaration())
{
exp.e1 = dve.e1; // pull semantic() result
if (!exp.findTempDecl(sc))
goto Lerr;
if (exp.ti.needsTypeInference(sc))
return exp;
exp.ti.semantic(sc);
if (!exp.ti.inst || exp.ti.errors) // if template failed to expand
return new ErrorExp();
Dsymbol s = exp.ti.toAlias();
Declaration v = s.isDeclaration();
if (v)
{
if (v.type && !v.type.deco)
v.type = v.type.semantic(v.loc, sc);
e = new DotVarExp(exp.loc, exp.e1, v);
e = e.semantic(sc);
return e;
}
e = new ScopeExp(exp.loc, exp.ti);
e = new DotExp(exp.loc, exp.e1, e);
e = e.semantic(sc);
return e;
}
}
else if (e.op == TOKvar)
{
VarExp ve = cast(VarExp)e;
if (FuncDeclaration fd = ve.var.isFuncDeclaration())
{
TemplateDeclaration td = fd.findTemplateDeclRoot();
if (td)
{
e = new TemplateExp(ve.loc, td);
e = e.semantic(sc);
}
}
else if (OverDeclaration od = ve.var.isOverDeclaration())
{
exp.ti.tempdecl = od;
e = new ScopeExp(exp.loc, exp.ti);
e = e.semantic(sc);
return e;
}
}
if (e.op == TOKdottd)
{
DotTemplateExp dte = cast(DotTemplateExp)e;
exp.e1 = dte.e1; // pull semantic() result
exp.ti.tempdecl = dte.td;
if (!exp.ti.semanticTiargs(sc))
return new ErrorExp();
if (exp.ti.needsTypeInference(sc))
return exp;
exp.ti.semantic(sc);
if (!exp.ti.inst || exp.ti.errors) // if template failed to expand
return new ErrorExp();
Dsymbol s = exp.ti.toAlias();
Declaration v = s.isDeclaration();
if (v && (v.isFuncDeclaration() || v.isVarDeclaration()))
{
e = new DotVarExp(exp.loc, exp.e1, v);
e = e.semantic(sc);
return e;
}
e = new ScopeExp(exp.loc, exp.ti);
e = new DotExp(exp.loc, exp.e1, e);
e = e.semantic(sc);
return e;
}
else if (e.op == TOKtemplate)
{
exp.ti.tempdecl = (cast(TemplateExp)e).td;
e = new ScopeExp(exp.loc, exp.ti);
e = e.semantic(sc);
return e;
}
else if (e.op == TOKdot)
{
DotExp de = cast(DotExp)e;
if (de.e2.op == TOKoverloadset)
{
if (!exp.findTempDecl(sc) || !exp.ti.semanticTiargs(sc))
{
return new ErrorExp();
}
if (exp.ti.needsTypeInference(sc))
return exp;
exp.ti.semantic(sc);
if (!exp.ti.inst || exp.ti.errors) // if template failed to expand
return new ErrorExp();
Dsymbol s = exp.ti.toAlias();
Declaration v = s.isDeclaration();
if (v)
{
if (v.type && !v.type.deco)
v.type = v.type.semantic(v.loc, sc);
e = new DotVarExp(exp.loc, exp.e1, v);
e = e.semantic(sc);
return e;
}
e = new ScopeExp(exp.loc, exp.ti);
e = new DotExp(exp.loc, exp.e1, e);
e = e.semantic(sc);
return e;
}
}
else if (e.op == TOKoverloadset)
{
OverExp oe = cast(OverExp)e;
exp.ti.tempdecl = oe.vars;
e = new ScopeExp(exp.loc, exp.ti);
e = e.semantic(sc);
return e;
}
Lerr:
exp.error("%s isn't a template", e.toChars());
return new ErrorExp();
}
/****************************************************
* Determine if `exp`, which takes the address of `v`, can do so safely.
* Params:
* sc = context
* exp = expression that takes the address of `v`
* v = the variable getting its address taken
* Returns:
* `true` if ok, `false` for error
*/
private bool checkAddressVar(Scope* sc, UnaExp exp, VarDeclaration v)
{
if (v)
{
if (!v.canTakeAddressOf())
{
exp.error("cannot take address of %s", exp.e1.toChars());
return false;
}
if (sc.func && !sc.intypeof && !v.isDataseg())
{
const(char)* p = v.isParameter() ? "parameter" : "local";
if (global.params.vsafe)
{
// Taking the address of v means it cannot be set to 'scope' later
v.storage_class &= ~STCmaybescope;
v.doNotInferScope = true;
if (v.storage_class & STCscope && sc.func.setUnsafe())
{
exp.error("cannot take address of scope %s %s in @safe function %s", p, v.toChars(), sc.func.toChars());
return false;
}
}
else if (sc.func.setUnsafe())
{
exp.error("cannot take address of %s %s in @safe function %s", p, v.toChars(), sc.func.toChars());
return false;
}
}
}
return true;
}
| D |
instance DIA_Addon_Merdarion_EXIT(C_Info)
{
npc = KDW_1405_Addon_Merdarion_NW;
nr = 999;
condition = DIA_Addon_Merdarion_EXIT_Condition;
information = DIA_Addon_Merdarion_EXIT_Info;
permanent = TRUE;
description = Dialog_Ende;
};
func int DIA_Addon_Merdarion_EXIT_Condition()
{
return TRUE;
};
func void DIA_Addon_Merdarion_EXIT_Info()
{
AI_StopProcessInfos(self);
};
instance DIA_Addon_Merdarion_Hallo(C_Info)
{
npc = KDW_1405_Addon_Merdarion_NW;
nr = 5;
condition = DIA_Addon_Merdarion_Hallo_Condition;
information = DIA_Addon_Merdarion_Hallo_Info;
description = "Занят?";
};
func int DIA_Addon_Merdarion_Hallo_Condition()
{
return TRUE;
};
func void DIA_Addon_Merdarion_Hallo_Info()
{
AI_Output(other,self,"DIA_Addon_Merdarion_Hallo_15_00"); //Занят?
AI_Output(self,other,"DIA_Addon_Merdarion_Hallo_06_01"); //Эти подземелья для меня - большая загадка. Трудно представить себе, что никто раньше их не нашел.
AI_Output(self,other,"DIA_Addon_Merdarion_Hallo_06_02"); //Нам же удалось найти вход без особых сложностей.
AI_Output(self,other,"DIA_Addon_Merdarion_Hallo_06_03"); //Люди так заняты своими повседневными делами, что никто не обращал должного внимания на эту постройку.
AI_Output(self,other,"DIA_Addon_Merdarion_Hallo_06_04"); //Другого объяснения у меня нет.
};
instance DIA_Addon_Merdarion_Aufgabe(C_Info)
{
npc = KDW_1405_Addon_Merdarion_NW;
nr = 5;
condition = DIA_Addon_Merdarion_Aufgabe_Condition;
information = DIA_Addon_Merdarion_Aufgabe_Info;
description = "Чем ты занимаешься здесь?";
};
func int DIA_Addon_Merdarion_Aufgabe_Condition()
{
if(Npc_KnowsInfo(other,DIA_Addon_Merdarion_Hallo))
{
return TRUE;
};
};
func void DIA_Addon_Merdarion_Aufgabe_Info()
{
AI_Output(other,self,"DIA_Addon_Merdarion_Aufgabe_15_00"); //Что ты хочешь здесь сделать?
AI_Output(self,other,"DIA_Addon_Merdarion_Aufgabe_06_01"); //Я пытаюсь выяснить, куда ведет этот круглый портал.
AI_Output(self,other,"DIA_Addon_Merdarion_Aufgabe_06_02"); //И еще я помогаю Нефариусу искать потерянный орнамент.
AI_Output(self,other,"DIA_Addon_Merdarion_Aufgabe_06_03"); //Можно сказать с уверенностью, что этот портал ведет в ту часть острова, которая доселе нам была неизвестна.
AI_Output(self,other,"DIA_Addon_Merdarion_Aufgabe_06_04"); //(задумываясь) Я даже, пожалуй, никогда не слышал и не читал про нее...
Npc_ExchangeRoutine(self,"START");
B_StartOtherRoutine(Cronos_NW,"START");
if(Nefarius_NW.aivar[AIV_TalkedToPlayer] == FALSE)
{
B_LogEntry(TOPIC_Addon_KDW,"Нефариус ищет пропавший орнамент.");
};
};
instance DIA_Addon_Merdarion_DaDurch(C_Info)
{
npc = KDW_1405_Addon_Merdarion_NW;
nr = 5;
condition = DIA_Addon_Merdarion_DaDurch_Condition;
information = DIA_Addon_Merdarion_DaDurch_Info;
description = "Ты действительно хочешь пройти через этот портал?";
};
func int DIA_Addon_Merdarion_DaDurch_Condition()
{
if(Npc_KnowsInfo(other,DIA_Addon_Merdarion_Aufgabe))
{
return TRUE;
};
};
func void DIA_Addon_Merdarion_DaDurch_Info()
{
AI_Output(other,self,"DIA_Addon_Merdarion_DaDurch_15_00"); //Ты действительно хочешь пройти через этот портал?
AI_Output(self,other,"DIA_Addon_Merdarion_DaDurch_06_01"); //Да. Ну, если мы найдем потерянный орнамент, конечно.
AI_Output(self,other,"DIA_Addon_Merdarion_DaDurch_06_02"); //Я полагаю, это достаточно рискованная затея.
AI_Output(self,other,"DIA_Addon_Merdarion_DaDurch_06_03"); //Но нам просто необходимо выяснить, как это может быть связано с постоянными землетрясениями.
};
instance DIA_Addon_Merdarion_Bedrohung(C_Info)
{
npc = KDW_1405_Addon_Merdarion_NW;
nr = 5;
condition = DIA_Addon_Merdarion_Bedrohung_Condition;
information = DIA_Addon_Merdarion_Bedrohung_Info;
description = "А что тебе известно про землетрясения?";
};
func int DIA_Addon_Merdarion_Bedrohung_Condition()
{
if(Npc_KnowsInfo(other,DIA_Addon_Merdarion_DaDurch))
{
return TRUE;
};
};
func void DIA_Addon_Merdarion_Bedrohung_Info()
{
AI_Output(other,self,"DIA_Addon_Merdarion_Bedrohung_15_00"); //А что тебе известно про землетрясения?
AI_Output(self,other,"DIA_Addon_Merdarion_Bedrohung_06_01"); //Их причиной является что-то на другой стороне.
AI_Output(self,other,"DIA_Addon_Merdarion_Bedrohung_06_02"); //Возможно, из-за этого пробуждаются каменные стражи.
AI_Output(self,other,"DIA_Addon_Merdarion_Bedrohung_06_03"); //Но это уже не моя забота. Сатурас и Кронос могут рассказать тебе больше.
};
instance DIA_Addon_Merdarion_Wasdahinter2(C_Info)
{
npc = KDW_1405_Addon_Merdarion_NW;
nr = 5;
condition = DIA_Addon_Merdarion_Wasdahinter2_Condition;
information = DIA_Addon_Merdarion_Wasdahinter2_Info;
description = "И что, как ты думаешь, ты там найдешь?";
};
func int DIA_Addon_Merdarion_Wasdahinter2_Condition()
{
if(Npc_KnowsInfo(other,DIA_Addon_Merdarion_Aufgabe))
{
return TRUE;
};
};
func void DIA_Addon_Merdarion_Wasdahinter2_Info()
{
AI_Output(other,self,"DIA_Addon_Merdarion_Wasdahinter2_15_00"); //И что, как ты думаешь, ты там найдешь?
AI_Output(self,other,"DIA_Addon_Merdarion_Wasdahinter2_06_01"); //Я даже не знаю.
AI_Output(self,other,"DIA_Addon_Merdarion_Wasdahinter2_06_02"); //Я полагаю, что на той стороне должно быть строение, схожее с этим. И аналог этого портала.
AI_Output(self,other,"DIA_Addon_Merdarion_Wasdahinter2_06_03"); //Все остальное мы узнаем, только когда попадем туда.
};
instance DIA_Addon_Merdarion_PERM(C_Info)
{
npc = KDW_1405_Addon_Merdarion_NW;
nr = 99;
condition = DIA_Addon_Merdarion_PERM_Condition;
information = DIA_Addon_Merdarion_PERM_Info;
permanent = TRUE;
description = "Ты можешь научить меня чему-нибудь из области магии?";
};
func int DIA_Addon_Merdarion_PERM_Condition()
{
if(Npc_KnowsInfo(other,DIA_Addon_Merdarion_Aufgabe))
{
return TRUE;
};
};
func void DIA_Addon_Merdarion_PERM_Info()
{
AI_Output(other,self,"DIA_Addon_Merdarion_PERM_15_00"); //Ты можешь меня научить магии?
AI_Output(self,other,"DIA_Addon_Merdarion_PERM_06_01"); //Когда мы окажемся там, я буду в полном твоем распоряжении.
};
instance DIA_Addon_Merdarion_Teleportstein(C_Info)
{
npc = KDW_1405_Addon_Merdarion_NW;
nr = 5;
condition = DIA_Addon_Merdarion_Teleportstein_Condition;
information = DIA_Addon_Merdarion_Teleportstein_Info;
description = "Как быстрее всего добраться в город?";
};
func int DIA_Addon_Merdarion_Teleportstein_Condition()
{
if(Npc_KnowsInfo(other,DIA_Addon_Merdarion_Aufgabe) && (MIS_Addon_Lares_Ornament2Saturas == LOG_SUCCESS))
{
return TRUE;
};
};
func void DIA_Addon_Merdarion_Teleportstein_Info()
{
AI_Output(other,self,"DIA_Addon_Merdarion_Teleportstein_15_00"); //Как быстрее всего добраться в город?
AI_Output(self,other,"DIA_Addon_Merdarion_Teleportstein_06_01"); //Я советую тебе пойти тем же путем, что ты и пришел.
AI_Output(self,other,"DIA_Addon_Merdarion_Teleportstein_06_02"); //(прикидывая) Но ты также можешь... Нет, это слишком опасно.
AI_Output(other,self,"DIA_Addon_Merdarion_Teleportstein_15_03"); //Выкладывай.
AI_Output(self,other,"DIA_Addon_Merdarion_Teleportstein_06_04"); //Ладно. Строители этих залов передвигались своим способом.
AI_Output(self,other,"DIA_Addon_Merdarion_Teleportstein_06_05"); //Насколько мы можем судить, они умели телепортироваться.
AI_Output(other,self,"DIA_Addon_Merdarion_Teleportstein_15_06"); //В этом нет ничего необычного.
AI_Output(self,other,"DIA_Addon_Merdarion_Teleportstein_06_07"); //Телепортационные камни, которые мы нашли в Хоринисе, на самом деле, весьма необычны.
AI_Output(self,other,"DIA_Addon_Merdarion_Teleportstein_06_08"); //Кажется, что телепортационный камень в этих залах может вести в город.
AI_Output(self,other,"DIA_Addon_Merdarion_Teleportstein_06_09"); //Но ни у кого из нас не хватило смелости это проверить.
Info_ClearChoices(DIA_Addon_Merdarion_Teleportstein);
Info_AddChoice(DIA_Addon_Merdarion_Teleportstein,"Что если мне попробовать переместиться с его помощью?",DIA_Addon_Merdarion_Teleportstein_ich);
Info_AddChoice(DIA_Addon_Merdarion_Teleportstein,"Где находится этот камень?",DIA_Addon_Merdarion_Teleportstein_wo);
};
func void DIA_Addon_Merdarion_Teleportstein_wo()
{
AI_Output(other,self,"DIA_Addon_Merdarion_Teleportstein_wo_15_00"); //Где находится этот камень?
AI_Output(self,other,"DIA_Addon_Merdarion_Teleportstein_wo_06_01"); //За дверью, в комнате с бассейном. Я запер его там.
Info_AddChoice(DIA_Addon_Merdarion_Teleportstein,"Дай мне ключ. Я хочу посмотреть на него.",DIA_Addon_Merdarion_Teleportstein_key);
};
func void DIA_Addon_Merdarion_Teleportstein_ich()
{
AI_Output(other,self,"DIA_Addon_Merdarion_Teleportstein_ich_15_00"); //Что если мне попробовать переместиться с его помощью?
AI_Output(self,other,"DIA_Addon_Merdarion_Teleportstein_ich_06_01"); //Не знаю. Нам слишком мало об этом известно. Возможно, ты не выживешь.
};
func void DIA_Addon_Merdarion_Teleportstein_key()
{
AI_Output(other,self,"DIA_Addon_Merdarion_Teleportstein_key_15_00"); //Дай мне ключ. Я хочу посмотреть на него.
AI_Output(self,other,"DIA_Addon_Merdarion_Teleportstein_key_06_01"); //(неуверенно) Правда? Но я не отвечаю за последствия.
AI_Output(other,self,"DIA_Addon_Merdarion_Teleportstein_key_15_02"); //Давай ключ.
AI_Output(self,other,"DIA_Addon_Merdarion_Teleportstein_key_06_03"); //Если ты так хочешь. Пожалуйста.
CreateInvItems(self,itke_portaltempelwalkthrough_addon,1);
B_GiveInvItems(self,other,itke_portaltempelwalkthrough_addon,1);
SC_GotPORTALTEMPELWALKTHROUGHKey = TRUE;
Log_CreateTopic(TOPIC_Addon_TeleportsNW,LOG_MISSION);
Log_SetTopicStatus(TOPIC_Addon_TeleportsNW,LOG_Running);
B_LogEntry(TOPIC_Addon_TeleportsNW,"Мердарион дал мне ключ от запертой двери. За ней находится телепорт, который перенесет меня обратно к городу.");
Info_ClearChoices(DIA_Addon_Merdarion_Teleportstein);
};
instance DIA_Addon_Merdarion_WHereOtherTeleports(C_Info)
{
npc = KDW_1405_Addon_Merdarion_NW;
nr = 5;
condition = DIA_Addon_Merdarion_WHereOtherTeleports_Condition;
information = DIA_Addon_Merdarion_WHereOtherTeleports_Info;
description = "Где остальные телепортационные камни?";
};
func int DIA_Addon_Merdarion_WHereOtherTeleports_Condition()
{
if(Npc_KnowsInfo(other,DIA_Addon_Merdarion_Teleportstein))
{
return TRUE;
};
};
func void DIA_Addon_Merdarion_WHereOtherTeleports_Info()
{
AI_Output(other,self,"DIA_Addon_Merdarion_WHereOtherTeleports_15_00"); //Где остальные телепортационные камни?
AI_Output(self,other,"DIA_Addon_Merdarion_WHereOtherTeleports_06_01"); //Мы пока что нашли только один, где-то посередине Хориниса.
AI_Output(self,other,"DIA_Addon_Merdarion_WHereOtherTeleports_06_02"); //Рядом с таверной 'Мертвая Гарпия'.
B_LogEntry(TOPIC_Addon_TeleportsNW,"Рядом с таверной 'Мертвая Гарпия' должен быть еще один телепорт.");
};
instance DIA_Addon_Merdarion_TeleportsteinSuccess(C_Info)
{
npc = KDW_1405_Addon_Merdarion_NW;
nr = 5;
condition = DIA_Addon_Merdarion_TeleportsteinSuccess_Condition;
information = DIA_Addon_Merdarion_TeleportsteinSuccess_Info;
description = "Телепортационные камни, похоже, работают нормально.";
};
func int DIA_Addon_Merdarion_TeleportsteinSuccess_Condition()
{
if(Npc_KnowsInfo(other,DIA_Addon_Merdarion_Teleportstein) && (SCUsed_NW_TELEPORTSTATION_MAYA == TRUE))
{
return TRUE;
};
};
func void DIA_Addon_Merdarion_TeleportsteinSuccess_Info()
{
B_GivePlayerXP(XP_Ambient);
AI_Output(other,self,"DIA_Addon_Merdarion_TeleportsteinSuccess_15_00"); //Телепортационные камни, похоже, работают нормально.
AI_Output(self,other,"DIA_Addon_Merdarion_TeleportsteinSuccess_06_01"); //Ты сделал это? Ты действительно вошел туда?
AI_Output(other,self,"DIA_Addon_Merdarion_TeleportsteinSuccess_15_02"); //Да. Очевидно, они все еще работают.
AI_Output(self,other,"DIA_Addon_Merdarion_TeleportsteinSuccess_06_03"); //(восхищенно) Невероятно. Мне нужно будет поближе взглянуть на них.
};
| D |
/home/iot-dev/Documents/Rust_prac/stm_interrupt/target/rls/debug/deps/aligned-a61f5fa329b95a5e.rmeta: /home/iot-dev/.cargo/registry/src/github.com-1ecc6299db9ec823/aligned-0.3.2/src/lib.rs /home/iot-dev/.cargo/registry/src/github.com-1ecc6299db9ec823/aligned-0.3.2/src/sealed.rs
/home/iot-dev/Documents/Rust_prac/stm_interrupt/target/rls/debug/deps/aligned-a61f5fa329b95a5e.d: /home/iot-dev/.cargo/registry/src/github.com-1ecc6299db9ec823/aligned-0.3.2/src/lib.rs /home/iot-dev/.cargo/registry/src/github.com-1ecc6299db9ec823/aligned-0.3.2/src/sealed.rs
/home/iot-dev/.cargo/registry/src/github.com-1ecc6299db9ec823/aligned-0.3.2/src/lib.rs:
/home/iot-dev/.cargo/registry/src/github.com-1ecc6299db9ec823/aligned-0.3.2/src/sealed.rs:
| D |
/Users/Zhongli/Desktop/NewsDemo/DerivedData/NewsDemo/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Alamofire.build/Objects-normal/x86_64/Timeline.o : /Users/Zhongli/Desktop/NewsDemo/Pods/Alamofire/Source/MultipartFormData.swift /Users/Zhongli/Desktop/NewsDemo/Pods/Alamofire/Source/Timeline.swift /Users/Zhongli/Desktop/NewsDemo/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift /Users/Zhongli/Desktop/NewsDemo/Pods/Alamofire/Source/Alamofire.swift /Users/Zhongli/Desktop/NewsDemo/Pods/Alamofire/Source/Response.swift /Users/Zhongli/Desktop/NewsDemo/Pods/Alamofire/Source/TaskDelegate.swift /Users/Zhongli/Desktop/NewsDemo/Pods/Alamofire/Source/SessionDelegate.swift /Users/Zhongli/Desktop/NewsDemo/Pods/Alamofire/Source/ParameterEncoding.swift /Users/Zhongli/Desktop/NewsDemo/Pods/Alamofire/Source/Validation.swift /Users/Zhongli/Desktop/NewsDemo/Pods/Alamofire/Source/ResponseSerialization.swift /Users/Zhongli/Desktop/NewsDemo/Pods/Alamofire/Source/SessionManager.swift /Users/Zhongli/Desktop/NewsDemo/Pods/Alamofire/Source/NetworkReachabilityManager.swift /Users/Zhongli/Desktop/NewsDemo/Pods/Alamofire/Source/AFError.swift /Users/Zhongli/Desktop/NewsDemo/Pods/Alamofire/Source/Notifications.swift /Users/Zhongli/Desktop/NewsDemo/Pods/Alamofire/Source/Result.swift /Users/Zhongli/Desktop/NewsDemo/Pods/Alamofire/Source/Request.swift /Users/Zhongli/Desktop/NewsDemo/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/Zhongli/Desktop/NewsDemo/Pods/Target\ Support\ Files/Alamofire/Alamofire-umbrella.h /Users/Zhongli/Desktop/NewsDemo/DerivedData/NewsDemo/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Alamofire.build/unextended-module.modulemap
/Users/Zhongli/Desktop/NewsDemo/DerivedData/NewsDemo/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Alamofire.build/Objects-normal/x86_64/Timeline~partial.swiftmodule : /Users/Zhongli/Desktop/NewsDemo/Pods/Alamofire/Source/MultipartFormData.swift /Users/Zhongli/Desktop/NewsDemo/Pods/Alamofire/Source/Timeline.swift /Users/Zhongli/Desktop/NewsDemo/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift /Users/Zhongli/Desktop/NewsDemo/Pods/Alamofire/Source/Alamofire.swift /Users/Zhongli/Desktop/NewsDemo/Pods/Alamofire/Source/Response.swift /Users/Zhongli/Desktop/NewsDemo/Pods/Alamofire/Source/TaskDelegate.swift /Users/Zhongli/Desktop/NewsDemo/Pods/Alamofire/Source/SessionDelegate.swift /Users/Zhongli/Desktop/NewsDemo/Pods/Alamofire/Source/ParameterEncoding.swift /Users/Zhongli/Desktop/NewsDemo/Pods/Alamofire/Source/Validation.swift /Users/Zhongli/Desktop/NewsDemo/Pods/Alamofire/Source/ResponseSerialization.swift /Users/Zhongli/Desktop/NewsDemo/Pods/Alamofire/Source/SessionManager.swift /Users/Zhongli/Desktop/NewsDemo/Pods/Alamofire/Source/NetworkReachabilityManager.swift /Users/Zhongli/Desktop/NewsDemo/Pods/Alamofire/Source/AFError.swift /Users/Zhongli/Desktop/NewsDemo/Pods/Alamofire/Source/Notifications.swift /Users/Zhongli/Desktop/NewsDemo/Pods/Alamofire/Source/Result.swift /Users/Zhongli/Desktop/NewsDemo/Pods/Alamofire/Source/Request.swift /Users/Zhongli/Desktop/NewsDemo/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/Zhongli/Desktop/NewsDemo/Pods/Target\ Support\ Files/Alamofire/Alamofire-umbrella.h /Users/Zhongli/Desktop/NewsDemo/DerivedData/NewsDemo/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Alamofire.build/unextended-module.modulemap
/Users/Zhongli/Desktop/NewsDemo/DerivedData/NewsDemo/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Alamofire.build/Objects-normal/x86_64/Timeline~partial.swiftdoc : /Users/Zhongli/Desktop/NewsDemo/Pods/Alamofire/Source/MultipartFormData.swift /Users/Zhongli/Desktop/NewsDemo/Pods/Alamofire/Source/Timeline.swift /Users/Zhongli/Desktop/NewsDemo/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift /Users/Zhongli/Desktop/NewsDemo/Pods/Alamofire/Source/Alamofire.swift /Users/Zhongli/Desktop/NewsDemo/Pods/Alamofire/Source/Response.swift /Users/Zhongli/Desktop/NewsDemo/Pods/Alamofire/Source/TaskDelegate.swift /Users/Zhongli/Desktop/NewsDemo/Pods/Alamofire/Source/SessionDelegate.swift /Users/Zhongli/Desktop/NewsDemo/Pods/Alamofire/Source/ParameterEncoding.swift /Users/Zhongli/Desktop/NewsDemo/Pods/Alamofire/Source/Validation.swift /Users/Zhongli/Desktop/NewsDemo/Pods/Alamofire/Source/ResponseSerialization.swift /Users/Zhongli/Desktop/NewsDemo/Pods/Alamofire/Source/SessionManager.swift /Users/Zhongli/Desktop/NewsDemo/Pods/Alamofire/Source/NetworkReachabilityManager.swift /Users/Zhongli/Desktop/NewsDemo/Pods/Alamofire/Source/AFError.swift /Users/Zhongli/Desktop/NewsDemo/Pods/Alamofire/Source/Notifications.swift /Users/Zhongli/Desktop/NewsDemo/Pods/Alamofire/Source/Result.swift /Users/Zhongli/Desktop/NewsDemo/Pods/Alamofire/Source/Request.swift /Users/Zhongli/Desktop/NewsDemo/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/Zhongli/Desktop/NewsDemo/Pods/Target\ Support\ Files/Alamofire/Alamofire-umbrella.h /Users/Zhongli/Desktop/NewsDemo/DerivedData/NewsDemo/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Alamofire.build/unextended-module.modulemap
| D |
/Users/gbs/Xcode/MessView/DerivedData/MessView/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Kingfisher.build/Objects-normal/x86_64/ImagePrefetcher.o : /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/String+MD5.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/Resource.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/Image.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/ImageCache.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/ImageTransition.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/KingfisherOptionsInfo.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/ImageDownloader.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/Placeholder.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/KingfisherManager.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/ImagePrefetcher.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/UIButton+Kingfisher.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/ImageView+Kingfisher.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/Kingfisher.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/ImageModifier.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/RequestModifier.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/ThreadHelper.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/Filter.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/CacheSerializer.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/FormatIndicatedCacheSerializer.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/ImageProcessor.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/Indicator.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/AnimatedImageView.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/Box.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/os.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/Accelerate.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/os.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/gbs/Xcode/MessView/Pods/Target\ Support\ Files/Kingfisher/Kingfisher-umbrella.h /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/Kingfisher.h /Users/gbs/Xcode/MessView/DerivedData/MessView/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Kingfisher.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Accelerate.framework/Headers/Accelerate.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/gbs/Xcode/MessView/DerivedData/MessView/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Kingfisher.build/Objects-normal/x86_64/ImagePrefetcher~partial.swiftmodule : /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/String+MD5.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/Resource.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/Image.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/ImageCache.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/ImageTransition.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/KingfisherOptionsInfo.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/ImageDownloader.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/Placeholder.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/KingfisherManager.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/ImagePrefetcher.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/UIButton+Kingfisher.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/ImageView+Kingfisher.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/Kingfisher.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/ImageModifier.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/RequestModifier.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/ThreadHelper.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/Filter.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/CacheSerializer.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/FormatIndicatedCacheSerializer.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/ImageProcessor.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/Indicator.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/AnimatedImageView.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/Box.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/os.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/Accelerate.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/os.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/gbs/Xcode/MessView/Pods/Target\ Support\ Files/Kingfisher/Kingfisher-umbrella.h /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/Kingfisher.h /Users/gbs/Xcode/MessView/DerivedData/MessView/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Kingfisher.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Accelerate.framework/Headers/Accelerate.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/gbs/Xcode/MessView/DerivedData/MessView/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Kingfisher.build/Objects-normal/x86_64/ImagePrefetcher~partial.swiftdoc : /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/String+MD5.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/Resource.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/Image.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/ImageCache.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/ImageTransition.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/KingfisherOptionsInfo.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/ImageDownloader.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/Placeholder.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/KingfisherManager.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/ImagePrefetcher.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/UIButton+Kingfisher.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/ImageView+Kingfisher.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/Kingfisher.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/ImageModifier.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/RequestModifier.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/ThreadHelper.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/Filter.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/CacheSerializer.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/FormatIndicatedCacheSerializer.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/ImageProcessor.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/Indicator.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/AnimatedImageView.swift /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/Box.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/os.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/Accelerate.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/os.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/gbs/Xcode/MessView/Pods/Target\ Support\ Files/Kingfisher/Kingfisher-umbrella.h /Users/gbs/Xcode/MessView/Pods/Kingfisher/Sources/Kingfisher.h /Users/gbs/Xcode/MessView/DerivedData/MessView/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Kingfisher.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Accelerate.framework/Headers/Accelerate.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 |
import cssparser.tokenizer;
import std.stdio;
void main()
{
const cssStr = "p#id { color : #ff3300 }";
foreach (token; new Tokenizer(cssStr))
{
token.writeln;
}
}
| D |
module android.java.android.telephony.mbms.ServiceInfo;
public import android.java.android.telephony.mbms.ServiceInfo_d_interface;
import arsd.jni : ImportExportImpl;
mixin ImportExportImpl!ServiceInfo;
import import0 = android.java.java.lang.CharSequence;
import import5 = android.java.java.lang.Class;
import import3 = android.java.java.util.List;
import import4 = android.java.java.util.Date;
import import2 = android.java.java.util.Set;
| D |
/run/media/sacha/stocky/isousb/isousb/target/rls/debug/build/libloading-9aac0ec89b31e44e/build_script_build-9aac0ec89b31e44e: /home/sacha/.cargo/registry/src/github.com-1ecc6299db9ec823/libloading-0.6.3/build.rs
/run/media/sacha/stocky/isousb/isousb/target/rls/debug/build/libloading-9aac0ec89b31e44e/build_script_build-9aac0ec89b31e44e.d: /home/sacha/.cargo/registry/src/github.com-1ecc6299db9ec823/libloading-0.6.3/build.rs
/home/sacha/.cargo/registry/src/github.com-1ecc6299db9ec823/libloading-0.6.3/build.rs:
| D |
PLONG PLAT ED95 KD LOMAGAGE HIMAGAGE SLAT SLONG RESULTNO DP DM WT ROCKTYPE
151.699997 80.8000031 5.19999981 18.2000008 21 26 36.7999992 -105.400002 355 5.0999999 7.30000019 0.873541195 intrusives
168.699997 66.6999969 8.60000038 22.6000004 25 26 36.5999985 -105.5 549 8.5 12.1000004 0.690872469 intrusives, granodiorite
6.69999981 87.3000031 6.69999981 46.9000015 22 24 36.5999985 -105.5 550 6.69999981 9.5 0.798955534 intrusives
162.600006 79.6999969 6.80000019 21 23 29 37.2000008 -105.599998 8164 6.9000001 9.69999981 0.793580724 extrusives, basalts, andesites, dacites
| D |
/home/shariq/Desktop/discovery-master/target/thumbv7em-none-eabihf/debug/deps/stable_deref_trait-9673b5a26d8945b9.rmeta: /home/shariq/.cargo/registry/src/github.com-1ecc6299db9ec823/stable_deref_trait-1.1.1/src/lib.rs
/home/shariq/Desktop/discovery-master/target/thumbv7em-none-eabihf/debug/deps/libstable_deref_trait-9673b5a26d8945b9.rlib: /home/shariq/.cargo/registry/src/github.com-1ecc6299db9ec823/stable_deref_trait-1.1.1/src/lib.rs
/home/shariq/Desktop/discovery-master/target/thumbv7em-none-eabihf/debug/deps/stable_deref_trait-9673b5a26d8945b9.d: /home/shariq/.cargo/registry/src/github.com-1ecc6299db9ec823/stable_deref_trait-1.1.1/src/lib.rs
/home/shariq/.cargo/registry/src/github.com-1ecc6299db9ec823/stable_deref_trait-1.1.1/src/lib.rs:
| D |
/Users/devesh/Desktop/Swift Apps/SpriteKitTest/DerivedData/SpriteKitTest/Build/Intermediates/SpriteKitTest.build/Debug-iphonesimulator/SpriteKitTest.build/Objects-normal/x86_64/AppDelegate-89976B87C967229E.o : /Users/devesh/Desktop/Swift\ Apps/SpriteKitTest/SpriteKitTest/GameScene.swift /Users/devesh/Desktop/Swift\ Apps/SpriteKitTest/SpriteKitTest/GameViewController.swift /Users/devesh/Desktop/Swift\ Apps/SpriteKitTest/SpriteKitTest/AppDelegate.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Users/devesh/Desktop/Swift\ Apps/SpriteKitTest/SpriteKitTest/SpriteKitTest-Bridging-Header.h /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SpriteKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/GLKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/simd.swiftmodule /Users/devesh/Desktop/Swift\ Apps/SpriteKitTest/DerivedData/SpriteKitTest/Build/Products/Debug-iphonesimulator/SocketIOClientSwift.framework/Modules/SocketIOClientSwift.swiftmodule/x86_64.swiftmodule /Users/devesh/Desktop/Swift\ Apps/SpriteKitTest/DerivedData/SpriteKitTest/Build/Products/Debug-iphonesimulator/SocketIOClientSwift.framework/Headers/SocketIOClientSwift-Swift.h /Users/devesh/Desktop/Swift\ Apps/SpriteKitTest/DerivedData/SpriteKitTest/Build/Products/Debug-iphonesimulator/SocketIOClientSwift.framework/Headers/Socket.IO-Client-Swift-umbrella.h /Users/devesh/Desktop/Swift\ Apps/SpriteKitTest/DerivedData/SpriteKitTest/Build/Products/Debug-iphonesimulator/SocketIOClientSwift.framework/Modules/module.modulemap
/Users/devesh/Desktop/Swift Apps/SpriteKitTest/DerivedData/SpriteKitTest/Build/Intermediates/SpriteKitTest.build/Debug-iphonesimulator/SpriteKitTest.build/Objects-normal/x86_64/AppDelegate-89976B87C967229E~partial.swiftmodule : /Users/devesh/Desktop/Swift\ Apps/SpriteKitTest/SpriteKitTest/GameScene.swift /Users/devesh/Desktop/Swift\ Apps/SpriteKitTest/SpriteKitTest/GameViewController.swift /Users/devesh/Desktop/Swift\ Apps/SpriteKitTest/SpriteKitTest/AppDelegate.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Users/devesh/Desktop/Swift\ Apps/SpriteKitTest/SpriteKitTest/SpriteKitTest-Bridging-Header.h /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SpriteKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/GLKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/simd.swiftmodule /Users/devesh/Desktop/Swift\ Apps/SpriteKitTest/DerivedData/SpriteKitTest/Build/Products/Debug-iphonesimulator/SocketIOClientSwift.framework/Modules/SocketIOClientSwift.swiftmodule/x86_64.swiftmodule /Users/devesh/Desktop/Swift\ Apps/SpriteKitTest/DerivedData/SpriteKitTest/Build/Products/Debug-iphonesimulator/SocketIOClientSwift.framework/Headers/SocketIOClientSwift-Swift.h /Users/devesh/Desktop/Swift\ Apps/SpriteKitTest/DerivedData/SpriteKitTest/Build/Products/Debug-iphonesimulator/SocketIOClientSwift.framework/Headers/Socket.IO-Client-Swift-umbrella.h /Users/devesh/Desktop/Swift\ Apps/SpriteKitTest/DerivedData/SpriteKitTest/Build/Products/Debug-iphonesimulator/SocketIOClientSwift.framework/Modules/module.modulemap
/Users/devesh/Desktop/Swift Apps/SpriteKitTest/DerivedData/SpriteKitTest/Build/Intermediates/SpriteKitTest.build/Debug-iphonesimulator/SpriteKitTest.build/Objects-normal/x86_64/AppDelegate-89976B87C967229E~partial.swiftdoc : /Users/devesh/Desktop/Swift\ Apps/SpriteKitTest/SpriteKitTest/GameScene.swift /Users/devesh/Desktop/Swift\ Apps/SpriteKitTest/SpriteKitTest/GameViewController.swift /Users/devesh/Desktop/Swift\ Apps/SpriteKitTest/SpriteKitTest/AppDelegate.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Users/devesh/Desktop/Swift\ Apps/SpriteKitTest/SpriteKitTest/SpriteKitTest-Bridging-Header.h /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SpriteKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/GLKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/simd.swiftmodule /Users/devesh/Desktop/Swift\ Apps/SpriteKitTest/DerivedData/SpriteKitTest/Build/Products/Debug-iphonesimulator/SocketIOClientSwift.framework/Modules/SocketIOClientSwift.swiftmodule/x86_64.swiftmodule /Users/devesh/Desktop/Swift\ Apps/SpriteKitTest/DerivedData/SpriteKitTest/Build/Products/Debug-iphonesimulator/SocketIOClientSwift.framework/Headers/SocketIOClientSwift-Swift.h /Users/devesh/Desktop/Swift\ Apps/SpriteKitTest/DerivedData/SpriteKitTest/Build/Products/Debug-iphonesimulator/SocketIOClientSwift.framework/Headers/Socket.IO-Client-Swift-umbrella.h /Users/devesh/Desktop/Swift\ Apps/SpriteKitTest/DerivedData/SpriteKitTest/Build/Products/Debug-iphonesimulator/SocketIOClientSwift.framework/Modules/module.modulemap
| D |
module moc.debugging;
import moc;
/**
* Check the output of the Q_OBJECT mixin.
*/
void debugMocClass(T)()
{
import std.stdio : writeln;
writeln("/////////// ", T.stringof, " ///////////\n");
foreach (s; T.ClassDef.signalList)
writeln("signal: ", s);
foreach (s; T.ClassDef.slotList)
writeln("slot: ", s);
foreach (s; T.ClassDef.methodList)
writeln("method: ", s);
foreach(m; T.ClassDef.signalSeedList)
{
alias signalSeed = symalias!(__traits(getMember, T, m));
writeln("\n", T.ClassDef.getSignalStr!(signalSeed._name, signalSeed._T));
}
writeln("\n=== genMetaStringData() ===\n", T.ClassDef.genMetaStringData(), "\n");
writeln("\n=== genMetaDataArray() ===\n", T.ClassDef.genMetaDataArray(), "\n");
writeln("\n=== genStaticMetaCallBody() ===\n", T.ClassDef.genStaticMetaCallBody(), "\n");
writeln("\n=== genMetaCastBody() ===\n", T.ClassDef.genMetaCastBody(), "\n");
writeln("\n=== genMetaCallBody() ===\n", T.ClassDef.genMetaCallBody(), "\n");
}
| D |
module System.Boolean;
import System.Namespace;
class Boolean : NObject
{
this()
{
// Constructor code
}
public override string toString() {
return "true";
}
}
| D |
import std.stdio;
void main(){
int a;
int b = 1;
while ( b <= 100 ) {
a += b;
b++;
}
a = a * a;
int c;
int d = 1;
while ( d <= 100){
c += d * d;
d++;
}
writeln( a - c );
}
| D |
/Users/lipeng/Developer/rustworkspace/rust_module/pkg_demo_1/target/rls/debug/deps/libc-932d01d8c01add63.rmeta: /Users/lipeng/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/libc-0.2.76/src/lib.rs /Users/lipeng/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/libc-0.2.76/src/macros.rs /Users/lipeng/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/libc-0.2.76/src/fixed_width_ints.rs /Users/lipeng/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/libc-0.2.76/src/unix/mod.rs /Users/lipeng/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/libc-0.2.76/src/unix/bsd/mod.rs /Users/lipeng/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/libc-0.2.76/src/unix/bsd/apple/mod.rs /Users/lipeng/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/libc-0.2.76/src/unix/bsd/apple/b64/mod.rs /Users/lipeng/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/libc-0.2.76/src/unix/bsd/apple/b64/align.rs /Users/lipeng/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/libc-0.2.76/src/unix/align.rs
/Users/lipeng/Developer/rustworkspace/rust_module/pkg_demo_1/target/rls/debug/deps/libc-932d01d8c01add63.d: /Users/lipeng/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/libc-0.2.76/src/lib.rs /Users/lipeng/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/libc-0.2.76/src/macros.rs /Users/lipeng/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/libc-0.2.76/src/fixed_width_ints.rs /Users/lipeng/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/libc-0.2.76/src/unix/mod.rs /Users/lipeng/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/libc-0.2.76/src/unix/bsd/mod.rs /Users/lipeng/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/libc-0.2.76/src/unix/bsd/apple/mod.rs /Users/lipeng/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/libc-0.2.76/src/unix/bsd/apple/b64/mod.rs /Users/lipeng/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/libc-0.2.76/src/unix/bsd/apple/b64/align.rs /Users/lipeng/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/libc-0.2.76/src/unix/align.rs
/Users/lipeng/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/libc-0.2.76/src/lib.rs:
/Users/lipeng/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/libc-0.2.76/src/macros.rs:
/Users/lipeng/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/libc-0.2.76/src/fixed_width_ints.rs:
/Users/lipeng/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/libc-0.2.76/src/unix/mod.rs:
/Users/lipeng/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/libc-0.2.76/src/unix/bsd/mod.rs:
/Users/lipeng/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/libc-0.2.76/src/unix/bsd/apple/mod.rs:
/Users/lipeng/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/libc-0.2.76/src/unix/bsd/apple/b64/mod.rs:
/Users/lipeng/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/libc-0.2.76/src/unix/bsd/apple/b64/align.rs:
/Users/lipeng/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/libc-0.2.76/src/unix/align.rs:
| D |
int main(){
Print("input your name:");
Print(ReadLine());
Print("ok bruh now input your age : ->\n", ReadInteger(), "good age? answer is ", true);
if (itob(ReadInteger())){
Print("ok1 simple if");
}
if (itob(ReadInteger())){
Print("wrong");
}
}
| D |
# FIXED
ICallBLE/ble_user_config.obj: C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/blestack/icall/app/ble_user_config.c
ICallBLE/ble_user_config.obj: C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/blestack/hal/src/target/_common/hal_types.h
ICallBLE/ble_user_config.obj: C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/blestack/hal/src/target/_common/../_common/cc26xx/_hal_types.h
ICallBLE/ble_user_config.obj: C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.6.LTS/include/stdint.h
ICallBLE/ble_user_config.obj: C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.6.LTS/include/stdbool.h
ICallBLE/ble_user_config.obj: C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/blestack/icall/inc/ble_user_config.h
ICallBLE/ble_user_config.obj: C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/blestack/icall/src/inc/icall_user_config.h
ICallBLE/ble_user_config.obj: C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/blestack/hal/src/target/_common/cc26xx/rf_hal.h
ICallBLE/ble_user_config.obj: C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/blestack/hal/src/target/_common/hal_types.h
ICallBLE/ble_user_config.obj: C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/blestack/hal/src/inc/hal_assert.h
ICallBLE/ble_user_config.obj: C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/blestack/hal/src/target/_common/hal_types.h
ICallBLE/ble_user_config.obj: C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/blestack/hal/src/inc/hal_defs.h
ICallBLE/ble_user_config.obj: C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/drivers/rf/RF.h
ICallBLE/ble_user_config.obj: C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/drivers/dpl/ClockP.h
ICallBLE/ble_user_config.obj: C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.6.LTS/include/stddef.h
ICallBLE/ble_user_config.obj: C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/drivers/dpl/SemaphoreP.h
ICallBLE/ble_user_config.obj: C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.6.LTS/include/stddef.h
ICallBLE/ble_user_config.obj: C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/devices/DeviceFamily.h
ICallBLE/ble_user_config.obj: C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/devices/cc26x0r2/driverlib/rf_common_cmd.h
ICallBLE/ble_user_config.obj: C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/devices/cc26x0r2/driverlib/rf_mailbox.h
ICallBLE/ble_user_config.obj: C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.6.LTS/include/string.h
ICallBLE/ble_user_config.obj: C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.6.LTS/include/linkage.h
ICallBLE/ble_user_config.obj: C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/devices/cc26x0r2/driverlib/rf_prop_cmd.h
ICallBLE/ble_user_config.obj: C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/devices/cc26x0r2/driverlib/rf_ble_cmd.h
ICallBLE/ble_user_config.obj: C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/blestack/icall/inc/ble_dispatch.h
ICallBLE/ble_user_config.obj: C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/blestack/target/board.h
ICallBLE/ble_user_config.obj: C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/blestack/target/./cc2640r2lp/cc2640r2lp_board.h
ICallBLE/ble_user_config.obj: C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/blestack/target/./cc2640r2lp/../../boards/CC2640R2_LAUNCHXL/Board.h
ICallBLE/ble_user_config.obj: C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/drivers/ADC.h
ICallBLE/ble_user_config.obj: C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/drivers/ADCBuf.h
ICallBLE/ble_user_config.obj: C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/drivers/PWM.h
ICallBLE/ble_user_config.obj: C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/drivers/SPI.h
ICallBLE/ble_user_config.obj: C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.6.LTS/include/stddef.h
ICallBLE/ble_user_config.obj: C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/drivers/UART.h
ICallBLE/ble_user_config.obj: C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.6.LTS/include/stddef.h
ICallBLE/ble_user_config.obj: C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/drivers/Watchdog.h
ICallBLE/ble_user_config.obj: C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/blestack/target/./cc2640r2lp/../../boards/CC2640R2_LAUNCHXL/CC2640R2_LAUNCHXL.h
ICallBLE/ble_user_config.obj: C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/drivers/PIN.h
ICallBLE/ble_user_config.obj: C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/devices/cc26x0r2/driverlib/ioc.h
ICallBLE/ble_user_config.obj: C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/devices/cc26x0r2/driverlib/../inc/hw_types.h
ICallBLE/ble_user_config.obj: C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/devices/cc26x0r2/driverlib/../inc/../inc/hw_chip_def.h
ICallBLE/ble_user_config.obj: C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/devices/cc26x0r2/driverlib/../inc/hw_memmap.h
ICallBLE/ble_user_config.obj: C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/devices/cc26x0r2/driverlib/../inc/hw_ioc.h
ICallBLE/ble_user_config.obj: C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/devices/cc26x0r2/driverlib/../inc/hw_ints.h
ICallBLE/ble_user_config.obj: C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/devices/cc26x0r2/driverlib/interrupt.h
ICallBLE/ble_user_config.obj: C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/devices/cc26x0r2/driverlib/../inc/hw_nvic.h
ICallBLE/ble_user_config.obj: C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/devices/cc26x0r2/driverlib/debug.h
ICallBLE/ble_user_config.obj: C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/devices/cc26x0r2/driverlib/cpu.h
ICallBLE/ble_user_config.obj: C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/devices/cc26x0r2/driverlib/../inc/hw_cpu_scs.h
ICallBLE/ble_user_config.obj: C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/devices/cc26x0r2/driverlib/../driverlib/rom.h
ICallBLE/ble_user_config.obj: C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/devices/cc26x0r2/driverlib/gpio.h
ICallBLE/ble_user_config.obj: C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/devices/cc26x0r2/driverlib/../inc/hw_gpio.h
ICallBLE/ble_user_config.obj: C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/blestack/common/cc26xx/ecc/ECCROMCC26XX.h
ICallBLE/ble_user_config.obj: C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/drivers/crypto/CryptoCC26XX.h
ICallBLE/ble_user_config.obj: C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/drivers/Power.h
ICallBLE/ble_user_config.obj: C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/drivers/utils/List.h
ICallBLE/ble_user_config.obj: C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.6.LTS/include/stddef.h
ICallBLE/ble_user_config.obj: C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/devices/cc26x0r2/driverlib/crypto.h
ICallBLE/ble_user_config.obj: C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/devices/cc26x0r2/driverlib/../inc/hw_crypto.h
ICallBLE/ble_user_config.obj: C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/drivers/dpl/HwiP.h
ICallBLE/ble_user_config.obj: C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.6.LTS/include/stddef.h
ICallBLE/ble_user_config.obj: C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/blestack/hal/src/target/_common/TRNGCC26XX.h
ICallBLE/ble_user_config.obj: C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/blestack/icall/src/inc/icall.h
ICallBLE/ble_user_config.obj: C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.6.LTS/include/stdlib.h
C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/blestack/icall/app/ble_user_config.c:
C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/blestack/hal/src/target/_common/hal_types.h:
C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/blestack/hal/src/target/_common/../_common/cc26xx/_hal_types.h:
C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.6.LTS/include/stdint.h:
C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.6.LTS/include/stdbool.h:
C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/blestack/icall/inc/ble_user_config.h:
C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/blestack/icall/src/inc/icall_user_config.h:
C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/blestack/hal/src/target/_common/cc26xx/rf_hal.h:
C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/blestack/hal/src/target/_common/hal_types.h:
C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/blestack/hal/src/inc/hal_assert.h:
C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/blestack/hal/src/target/_common/hal_types.h:
C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/blestack/hal/src/inc/hal_defs.h:
C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/drivers/rf/RF.h:
C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/drivers/dpl/ClockP.h:
C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.6.LTS/include/stddef.h:
C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/drivers/dpl/SemaphoreP.h:
C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.6.LTS/include/stddef.h:
C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/devices/DeviceFamily.h:
C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/devices/cc26x0r2/driverlib/rf_common_cmd.h:
C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/devices/cc26x0r2/driverlib/rf_mailbox.h:
C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.6.LTS/include/string.h:
C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.6.LTS/include/linkage.h:
C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/devices/cc26x0r2/driverlib/rf_prop_cmd.h:
C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/devices/cc26x0r2/driverlib/rf_ble_cmd.h:
C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/blestack/icall/inc/ble_dispatch.h:
C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/blestack/target/board.h:
C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/blestack/target/./cc2640r2lp/cc2640r2lp_board.h:
C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/blestack/target/./cc2640r2lp/../../boards/CC2640R2_LAUNCHXL/Board.h:
C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/drivers/ADC.h:
C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/drivers/ADCBuf.h:
C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/drivers/PWM.h:
C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/drivers/SPI.h:
C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.6.LTS/include/stddef.h:
C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/drivers/UART.h:
C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.6.LTS/include/stddef.h:
C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/drivers/Watchdog.h:
C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/blestack/target/./cc2640r2lp/../../boards/CC2640R2_LAUNCHXL/CC2640R2_LAUNCHXL.h:
C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/drivers/PIN.h:
C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/devices/cc26x0r2/driverlib/ioc.h:
C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/devices/cc26x0r2/driverlib/../inc/hw_types.h:
C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/devices/cc26x0r2/driverlib/../inc/../inc/hw_chip_def.h:
C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/devices/cc26x0r2/driverlib/../inc/hw_memmap.h:
C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/devices/cc26x0r2/driverlib/../inc/hw_ioc.h:
C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/devices/cc26x0r2/driverlib/../inc/hw_ints.h:
C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/devices/cc26x0r2/driverlib/interrupt.h:
C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/devices/cc26x0r2/driverlib/../inc/hw_nvic.h:
C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/devices/cc26x0r2/driverlib/debug.h:
C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/devices/cc26x0r2/driverlib/cpu.h:
C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/devices/cc26x0r2/driverlib/../inc/hw_cpu_scs.h:
C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/devices/cc26x0r2/driverlib/../driverlib/rom.h:
C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/devices/cc26x0r2/driverlib/gpio.h:
C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/devices/cc26x0r2/driverlib/../inc/hw_gpio.h:
C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/blestack/common/cc26xx/ecc/ECCROMCC26XX.h:
C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/drivers/crypto/CryptoCC26XX.h:
C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/drivers/Power.h:
C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/drivers/utils/List.h:
C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.6.LTS/include/stddef.h:
C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/devices/cc26x0r2/driverlib/crypto.h:
C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/devices/cc26x0r2/driverlib/../inc/hw_crypto.h:
C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/drivers/dpl/HwiP.h:
C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.6.LTS/include/stddef.h:
C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/blestack/hal/src/target/_common/TRNGCC26XX.h:
C:/ti/simplelink_cc2640r2_sdk_1_50_00_58/source/ti/blestack/icall/src/inc/icall.h:
C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.6.LTS/include/stdlib.h:
| D |
/Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/CoreML_test.build/Debug-iphonesimulator/CoreML_test.build/Objects-normal/x86_64/ImageUtils.o : /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/CoreML_test.build/Debug-iphonesimulator/CoreML_test.build/DerivedSources/CoreMLGenerated/Inceptionv3/Inceptionv3.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/CoreML_test.build/Debug-iphonesimulator/CoreML_test.build/DerivedSources/CoreMLGenerated/Alphanum_28x28/Alphanum_28x28.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Data/New\ Group/TranslatedData.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Services/TranslationService.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/AppDelegate.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Map_/MapAnnotation/Artwork.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Common/Views/KerningLabel.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/OCR/OCRPresenterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Main/MainPresenterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Translation/TranslationPresenterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/TextDetection/TextDetectionPresenterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Map_/MapPresenterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/TextDetector/TextDetectorPresenterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/OCR/OCRRouterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Main/MainRouterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Translation/TranslationRouterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/TextDetection/TextDetectionRouterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Map_/MapRouterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/TextDetector/TextDetectorRouterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Extension/HTTPURLResponseExtension.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Services/Providers/\ TranslationProvider.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/ViewController.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/OCR/OCRViewController.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Main/MainViewController.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Translation/TranslationViewController.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/TextDetection/TextDetectionViewController.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Map_/MapViewController.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/TextDetector/TextDetectorViewController.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Data/New\ Group/ApiError.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Common/TranslationApiError.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/OCR/Utils/ImageUtils.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Extension/UIViewController\ Extensions.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/OCR/AlertControllers/AlertControllerFunctions.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/OCR/OCRContract.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Main/MainContract.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Translation/TranslationContract.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/TextDetection/TextDetectionContract.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Map_/MapContract.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/TextDetector/TextDetectorContract.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/OCR/OCRDIPart.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/DI/NetworkDIPart.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Main/MainDIPart.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Translation/TranslationDIPart.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/TextDetection/TextDetectionDIPart.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Map_/MapDIPart.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/DI/AppDIPart.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/TextDetector/TextDetectorDIPart.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Map_/MapViews/ArtworkView.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/CustomView/PreviewView.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/Alamofire/Alamofire.framework/Modules/Alamofire.swiftmodule/x86_64.swiftmodule /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/CodableAlamofire/CodableAlamofire.framework/Modules/CodableAlamofire.swiftmodule/x86_64.swiftmodule /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/RxAlamofire/RxAlamofire.framework/Modules/RxAlamofire.swiftmodule/x86_64.swiftmodule /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/SwiftHash/SwiftHash.framework/Modules/SwiftHash.swiftmodule/x86_64.swiftmodule /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/ObjectMapper/ObjectMapper.framework/Modules/ObjectMapper.swiftmodule/x86_64.swiftmodule /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/Localize-Swift/Localize_Swift.framework/Modules/Localize_Swift.swiftmodule/x86_64.swiftmodule /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/RxSwift/RxSwift.framework/Modules/RxSwift.swiftmodule/x86_64.swiftmodule /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/DITranquillity/DITranquillity.framework/Modules/DITranquillity.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreMedia.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/simd.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/Vision.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreLocation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/AVFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreAudio.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Contacts.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/MapKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/SVProgressHUD/SVProgressHUD.framework/Headers/SVProgressHUD.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/Headers/TesseractOCR.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/SVProgressHUD/SVProgressHUD.framework/Headers/SVProgressHUD-umbrella.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/Headers/TesseractOCRiOS-umbrella.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/Alamofire/Alamofire.framework/Headers/Alamofire-umbrella.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/CodableAlamofire/CodableAlamofire.framework/Headers/CodableAlamofire-umbrella.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/RxAlamofire/RxAlamofire.framework/Headers/RxAlamofire-umbrella.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/SwiftHash/SwiftHash.framework/Headers/SwiftHash-umbrella.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/ObjectMapper/ObjectMapper.framework/Headers/ObjectMapper-umbrella.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/Localize-Swift/Localize_Swift.framework/Headers/Localize-Swift-umbrella.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/RxSwift/RxSwift.framework/Headers/RxSwift-umbrella.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/DITranquillity/DITranquillity.framework/Headers/DITranquillity-umbrella.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/CodableAlamofire/CodableAlamofire.framework/Headers/CodableAlamofire.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/DITranquillity/DITranquillity.framework/Headers/DIStoryboardBase.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/Headers/G8TesseractDelegate.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/Headers/G8RecognizedBlock.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/Headers/G8RecognitionOperation.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Tesseract/CoreML_test-Bridging-Header.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/SVProgressHUD/SVProgressHUD.framework/Headers/SVRadialGradientLayer.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/Headers/G8TesseractParameters.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/Headers/UIImage+G8Filters.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/Headers/G8Constants.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/Headers/G8Tesseract.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/Alamofire/Alamofire.framework/Headers/Alamofire-Swift.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/CodableAlamofire/CodableAlamofire.framework/Headers/CodableAlamofire-Swift.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/RxAlamofire/RxAlamofire.framework/Headers/RxAlamofire-Swift.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/SwiftHash/SwiftHash.framework/Headers/SwiftHash-Swift.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/ObjectMapper/ObjectMapper.framework/Headers/ObjectMapper-Swift.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/Localize-Swift/Localize_Swift.framework/Headers/Localize_Swift-Swift.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/RxSwift/RxSwift.framework/Headers/RxSwift-Swift.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/DITranquillity/DITranquillity.framework/Headers/DITranquillity-Swift.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/Localize-Swift/Localize_Swift.framework/Headers/Localize_Swift.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/SVProgressHUD/SVProgressHUD.framework/Headers/SVIndefiniteAnimatedView.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/SVProgressHUD/SVProgressHUD.framework/Headers/SVProgressAnimatedView.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/DITranquillity/DITranquillity.framework/Headers/DITranquillity.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/SVProgressHUD/SVProgressHUD.framework/Modules/module.modulemap /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/Modules/module.modulemap /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/Alamofire/Alamofire.framework/Modules/module.modulemap /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/CodableAlamofire/CodableAlamofire.framework/Modules/module.modulemap /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/RxAlamofire/RxAlamofire.framework/Modules/module.modulemap /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/SwiftHash/SwiftHash.framework/Modules/module.modulemap /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/ObjectMapper/ObjectMapper.framework/Modules/module.modulemap /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/Localize-Swift/Localize_Swift.framework/Modules/module.modulemap /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/RxSwift/RxSwift.framework/Modules/module.modulemap /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/DITranquillity/DITranquillity.framework/Modules/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.2.sdk/System/Library/Frameworks/CoreML.framework/Headers/CoreML.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.2.sdk/System/Library/Frameworks/Vision.framework/Headers/Vision.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.2.sdk/System/Library/Frameworks/CoreLocation.framework/Headers/CoreLocation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.2.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.2.sdk/System/Library/Frameworks/Contacts.framework/Headers/Contacts.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.2.sdk/System/Library/Frameworks/MapKit.framework/Headers/MapKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.2.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioToolbox.apinotes
/Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/CoreML_test.build/Debug-iphonesimulator/CoreML_test.build/Objects-normal/x86_64/ImageUtils~partial.swiftmodule : /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/CoreML_test.build/Debug-iphonesimulator/CoreML_test.build/DerivedSources/CoreMLGenerated/Inceptionv3/Inceptionv3.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/CoreML_test.build/Debug-iphonesimulator/CoreML_test.build/DerivedSources/CoreMLGenerated/Alphanum_28x28/Alphanum_28x28.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Data/New\ Group/TranslatedData.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Services/TranslationService.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/AppDelegate.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Map_/MapAnnotation/Artwork.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Common/Views/KerningLabel.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/OCR/OCRPresenterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Main/MainPresenterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Translation/TranslationPresenterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/TextDetection/TextDetectionPresenterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Map_/MapPresenterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/TextDetector/TextDetectorPresenterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/OCR/OCRRouterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Main/MainRouterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Translation/TranslationRouterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/TextDetection/TextDetectionRouterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Map_/MapRouterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/TextDetector/TextDetectorRouterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Extension/HTTPURLResponseExtension.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Services/Providers/\ TranslationProvider.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/ViewController.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/OCR/OCRViewController.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Main/MainViewController.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Translation/TranslationViewController.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/TextDetection/TextDetectionViewController.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Map_/MapViewController.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/TextDetector/TextDetectorViewController.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Data/New\ Group/ApiError.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Common/TranslationApiError.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/OCR/Utils/ImageUtils.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Extension/UIViewController\ Extensions.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/OCR/AlertControllers/AlertControllerFunctions.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/OCR/OCRContract.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Main/MainContract.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Translation/TranslationContract.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/TextDetection/TextDetectionContract.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Map_/MapContract.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/TextDetector/TextDetectorContract.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/OCR/OCRDIPart.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/DI/NetworkDIPart.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Main/MainDIPart.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Translation/TranslationDIPart.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/TextDetection/TextDetectionDIPart.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Map_/MapDIPart.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/DI/AppDIPart.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/TextDetector/TextDetectorDIPart.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Map_/MapViews/ArtworkView.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/CustomView/PreviewView.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/Alamofire/Alamofire.framework/Modules/Alamofire.swiftmodule/x86_64.swiftmodule /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/CodableAlamofire/CodableAlamofire.framework/Modules/CodableAlamofire.swiftmodule/x86_64.swiftmodule /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/RxAlamofire/RxAlamofire.framework/Modules/RxAlamofire.swiftmodule/x86_64.swiftmodule /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/SwiftHash/SwiftHash.framework/Modules/SwiftHash.swiftmodule/x86_64.swiftmodule /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/ObjectMapper/ObjectMapper.framework/Modules/ObjectMapper.swiftmodule/x86_64.swiftmodule /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/Localize-Swift/Localize_Swift.framework/Modules/Localize_Swift.swiftmodule/x86_64.swiftmodule /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/RxSwift/RxSwift.framework/Modules/RxSwift.swiftmodule/x86_64.swiftmodule /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/DITranquillity/DITranquillity.framework/Modules/DITranquillity.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreMedia.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/simd.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/Vision.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreLocation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/AVFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreAudio.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Contacts.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/MapKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/SVProgressHUD/SVProgressHUD.framework/Headers/SVProgressHUD.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/Headers/TesseractOCR.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/SVProgressHUD/SVProgressHUD.framework/Headers/SVProgressHUD-umbrella.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/Headers/TesseractOCRiOS-umbrella.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/Alamofire/Alamofire.framework/Headers/Alamofire-umbrella.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/CodableAlamofire/CodableAlamofire.framework/Headers/CodableAlamofire-umbrella.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/RxAlamofire/RxAlamofire.framework/Headers/RxAlamofire-umbrella.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/SwiftHash/SwiftHash.framework/Headers/SwiftHash-umbrella.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/ObjectMapper/ObjectMapper.framework/Headers/ObjectMapper-umbrella.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/Localize-Swift/Localize_Swift.framework/Headers/Localize-Swift-umbrella.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/RxSwift/RxSwift.framework/Headers/RxSwift-umbrella.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/DITranquillity/DITranquillity.framework/Headers/DITranquillity-umbrella.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/CodableAlamofire/CodableAlamofire.framework/Headers/CodableAlamofire.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/DITranquillity/DITranquillity.framework/Headers/DIStoryboardBase.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/Headers/G8TesseractDelegate.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/Headers/G8RecognizedBlock.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/Headers/G8RecognitionOperation.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Tesseract/CoreML_test-Bridging-Header.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/SVProgressHUD/SVProgressHUD.framework/Headers/SVRadialGradientLayer.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/Headers/G8TesseractParameters.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/Headers/UIImage+G8Filters.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/Headers/G8Constants.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/Headers/G8Tesseract.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/Alamofire/Alamofire.framework/Headers/Alamofire-Swift.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/CodableAlamofire/CodableAlamofire.framework/Headers/CodableAlamofire-Swift.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/RxAlamofire/RxAlamofire.framework/Headers/RxAlamofire-Swift.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/SwiftHash/SwiftHash.framework/Headers/SwiftHash-Swift.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/ObjectMapper/ObjectMapper.framework/Headers/ObjectMapper-Swift.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/Localize-Swift/Localize_Swift.framework/Headers/Localize_Swift-Swift.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/RxSwift/RxSwift.framework/Headers/RxSwift-Swift.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/DITranquillity/DITranquillity.framework/Headers/DITranquillity-Swift.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/Localize-Swift/Localize_Swift.framework/Headers/Localize_Swift.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/SVProgressHUD/SVProgressHUD.framework/Headers/SVIndefiniteAnimatedView.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/SVProgressHUD/SVProgressHUD.framework/Headers/SVProgressAnimatedView.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/DITranquillity/DITranquillity.framework/Headers/DITranquillity.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/SVProgressHUD/SVProgressHUD.framework/Modules/module.modulemap /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/Modules/module.modulemap /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/Alamofire/Alamofire.framework/Modules/module.modulemap /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/CodableAlamofire/CodableAlamofire.framework/Modules/module.modulemap /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/RxAlamofire/RxAlamofire.framework/Modules/module.modulemap /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/SwiftHash/SwiftHash.framework/Modules/module.modulemap /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/ObjectMapper/ObjectMapper.framework/Modules/module.modulemap /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/Localize-Swift/Localize_Swift.framework/Modules/module.modulemap /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/RxSwift/RxSwift.framework/Modules/module.modulemap /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/DITranquillity/DITranquillity.framework/Modules/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.2.sdk/System/Library/Frameworks/CoreML.framework/Headers/CoreML.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.2.sdk/System/Library/Frameworks/Vision.framework/Headers/Vision.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.2.sdk/System/Library/Frameworks/CoreLocation.framework/Headers/CoreLocation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.2.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.2.sdk/System/Library/Frameworks/Contacts.framework/Headers/Contacts.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.2.sdk/System/Library/Frameworks/MapKit.framework/Headers/MapKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.2.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioToolbox.apinotes
/Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/CoreML_test.build/Debug-iphonesimulator/CoreML_test.build/Objects-normal/x86_64/ImageUtils~partial.swiftdoc : /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/CoreML_test.build/Debug-iphonesimulator/CoreML_test.build/DerivedSources/CoreMLGenerated/Inceptionv3/Inceptionv3.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/CoreML_test.build/Debug-iphonesimulator/CoreML_test.build/DerivedSources/CoreMLGenerated/Alphanum_28x28/Alphanum_28x28.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Data/New\ Group/TranslatedData.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Services/TranslationService.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/AppDelegate.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Map_/MapAnnotation/Artwork.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Common/Views/KerningLabel.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/OCR/OCRPresenterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Main/MainPresenterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Translation/TranslationPresenterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/TextDetection/TextDetectionPresenterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Map_/MapPresenterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/TextDetector/TextDetectorPresenterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/OCR/OCRRouterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Main/MainRouterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Translation/TranslationRouterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/TextDetection/TextDetectionRouterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Map_/MapRouterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/TextDetector/TextDetectorRouterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Extension/HTTPURLResponseExtension.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Services/Providers/\ TranslationProvider.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/ViewController.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/OCR/OCRViewController.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Main/MainViewController.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Translation/TranslationViewController.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/TextDetection/TextDetectionViewController.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Map_/MapViewController.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/TextDetector/TextDetectorViewController.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Data/New\ Group/ApiError.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Common/TranslationApiError.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/OCR/Utils/ImageUtils.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Extension/UIViewController\ Extensions.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/OCR/AlertControllers/AlertControllerFunctions.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/OCR/OCRContract.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Main/MainContract.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Translation/TranslationContract.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/TextDetection/TextDetectionContract.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Map_/MapContract.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/TextDetector/TextDetectorContract.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/OCR/OCRDIPart.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/DI/NetworkDIPart.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Main/MainDIPart.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Translation/TranslationDIPart.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/TextDetection/TextDetectionDIPart.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Map_/MapDIPart.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/DI/AppDIPart.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/TextDetector/TextDetectorDIPart.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Map_/MapViews/ArtworkView.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/CustomView/PreviewView.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/Alamofire/Alamofire.framework/Modules/Alamofire.swiftmodule/x86_64.swiftmodule /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/CodableAlamofire/CodableAlamofire.framework/Modules/CodableAlamofire.swiftmodule/x86_64.swiftmodule /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/RxAlamofire/RxAlamofire.framework/Modules/RxAlamofire.swiftmodule/x86_64.swiftmodule /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/SwiftHash/SwiftHash.framework/Modules/SwiftHash.swiftmodule/x86_64.swiftmodule /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/ObjectMapper/ObjectMapper.framework/Modules/ObjectMapper.swiftmodule/x86_64.swiftmodule /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/Localize-Swift/Localize_Swift.framework/Modules/Localize_Swift.swiftmodule/x86_64.swiftmodule /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/RxSwift/RxSwift.framework/Modules/RxSwift.swiftmodule/x86_64.swiftmodule /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/DITranquillity/DITranquillity.framework/Modules/DITranquillity.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreMedia.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/simd.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/Vision.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreLocation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/AVFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreAudio.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Contacts.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/MapKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/SVProgressHUD/SVProgressHUD.framework/Headers/SVProgressHUD.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/Headers/TesseractOCR.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/SVProgressHUD/SVProgressHUD.framework/Headers/SVProgressHUD-umbrella.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/Headers/TesseractOCRiOS-umbrella.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/Alamofire/Alamofire.framework/Headers/Alamofire-umbrella.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/CodableAlamofire/CodableAlamofire.framework/Headers/CodableAlamofire-umbrella.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/RxAlamofire/RxAlamofire.framework/Headers/RxAlamofire-umbrella.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/SwiftHash/SwiftHash.framework/Headers/SwiftHash-umbrella.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/ObjectMapper/ObjectMapper.framework/Headers/ObjectMapper-umbrella.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/Localize-Swift/Localize_Swift.framework/Headers/Localize-Swift-umbrella.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/RxSwift/RxSwift.framework/Headers/RxSwift-umbrella.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/DITranquillity/DITranquillity.framework/Headers/DITranquillity-umbrella.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/CodableAlamofire/CodableAlamofire.framework/Headers/CodableAlamofire.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/DITranquillity/DITranquillity.framework/Headers/DIStoryboardBase.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/Headers/G8TesseractDelegate.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/Headers/G8RecognizedBlock.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/Headers/G8RecognitionOperation.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Tesseract/CoreML_test-Bridging-Header.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/SVProgressHUD/SVProgressHUD.framework/Headers/SVRadialGradientLayer.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/Headers/G8TesseractParameters.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/Headers/UIImage+G8Filters.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/Headers/G8Constants.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/Headers/G8Tesseract.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/Alamofire/Alamofire.framework/Headers/Alamofire-Swift.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/CodableAlamofire/CodableAlamofire.framework/Headers/CodableAlamofire-Swift.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/RxAlamofire/RxAlamofire.framework/Headers/RxAlamofire-Swift.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/SwiftHash/SwiftHash.framework/Headers/SwiftHash-Swift.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/ObjectMapper/ObjectMapper.framework/Headers/ObjectMapper-Swift.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/Localize-Swift/Localize_Swift.framework/Headers/Localize_Swift-Swift.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/RxSwift/RxSwift.framework/Headers/RxSwift-Swift.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/DITranquillity/DITranquillity.framework/Headers/DITranquillity-Swift.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/Localize-Swift/Localize_Swift.framework/Headers/Localize_Swift.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/SVProgressHUD/SVProgressHUD.framework/Headers/SVIndefiniteAnimatedView.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/SVProgressHUD/SVProgressHUD.framework/Headers/SVProgressAnimatedView.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/DITranquillity/DITranquillity.framework/Headers/DITranquillity.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/SVProgressHUD/SVProgressHUD.framework/Modules/module.modulemap /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/Modules/module.modulemap /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/Alamofire/Alamofire.framework/Modules/module.modulemap /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/CodableAlamofire/CodableAlamofire.framework/Modules/module.modulemap /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/RxAlamofire/RxAlamofire.framework/Modules/module.modulemap /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/SwiftHash/SwiftHash.framework/Modules/module.modulemap /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/ObjectMapper/ObjectMapper.framework/Modules/module.modulemap /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/Localize-Swift/Localize_Swift.framework/Modules/module.modulemap /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/RxSwift/RxSwift.framework/Modules/module.modulemap /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/DITranquillity/DITranquillity.framework/Modules/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.2.sdk/System/Library/Frameworks/CoreML.framework/Headers/CoreML.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.2.sdk/System/Library/Frameworks/Vision.framework/Headers/Vision.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.2.sdk/System/Library/Frameworks/CoreLocation.framework/Headers/CoreLocation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.2.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.2.sdk/System/Library/Frameworks/Contacts.framework/Headers/Contacts.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.2.sdk/System/Library/Frameworks/MapKit.framework/Headers/MapKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.2.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioToolbox.apinotes
| D |
/Users/augustomachado/github/rust_sudoku/sudoku/target/rls/debug/build/gl-7728b51ed12eaa23/build_script_build-7728b51ed12eaa23: /Users/augustomachado/.cargo/registry/src/github.com-1ecc6299db9ec823/gl-0.13.0/build.rs
/Users/augustomachado/github/rust_sudoku/sudoku/target/rls/debug/build/gl-7728b51ed12eaa23/build_script_build-7728b51ed12eaa23.d: /Users/augustomachado/.cargo/registry/src/github.com-1ecc6299db9ec823/gl-0.13.0/build.rs
/Users/augustomachado/.cargo/registry/src/github.com-1ecc6299db9ec823/gl-0.13.0/build.rs:
| D |
/Users/GelinZHU/Library/Developer/Xcode/DerivedData/WorldTrotter-ekrotxwvppnrckbczkihwrqyaaas/Build/Intermediates/WorldTrotter.build/Debug-iphonesimulator/WorldTrotter.build/Objects-normal/i386/AppDelegate.o : /Users/GelinZHU/Desktop/Chapter2/WorldTrotter/WorldTrotter/ViewController.swift /Users/GelinZHU/Desktop/Chapter2/WorldTrotter/WorldTrotter/AppDelegate.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/i386/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/i386/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/i386/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/i386/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/i386/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/i386/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/i386/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/i386/CoreImage.swiftmodule
/Users/GelinZHU/Library/Developer/Xcode/DerivedData/WorldTrotter-ekrotxwvppnrckbczkihwrqyaaas/Build/Intermediates/WorldTrotter.build/Debug-iphonesimulator/WorldTrotter.build/Objects-normal/i386/AppDelegate~partial.swiftmodule : /Users/GelinZHU/Desktop/Chapter2/WorldTrotter/WorldTrotter/ViewController.swift /Users/GelinZHU/Desktop/Chapter2/WorldTrotter/WorldTrotter/AppDelegate.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/i386/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/i386/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/i386/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/i386/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/i386/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/i386/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/i386/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/i386/CoreImage.swiftmodule
/Users/GelinZHU/Library/Developer/Xcode/DerivedData/WorldTrotter-ekrotxwvppnrckbczkihwrqyaaas/Build/Intermediates/WorldTrotter.build/Debug-iphonesimulator/WorldTrotter.build/Objects-normal/i386/AppDelegate~partial.swiftdoc : /Users/GelinZHU/Desktop/Chapter2/WorldTrotter/WorldTrotter/ViewController.swift /Users/GelinZHU/Desktop/Chapter2/WorldTrotter/WorldTrotter/AppDelegate.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/i386/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/i386/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/i386/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/i386/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/i386/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/i386/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/i386/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/i386/CoreImage.swiftmodule
| D |
/**
* Windows API header module
*
* Translated from MinGW Windows headers
*
* License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
* Source: $(DRUNTIMESRC core/sys/windows/_lmrepl.d)
*/
module core.sys.windows.lmrepl;
version (Windows):
pragma(lib, "netapi32");
import core.sys.windows.lmcons, core.sys.windows.windef;
enum REPL_ROLE_EXPORT=1;
enum REPL_ROLE_IMPORT=2;
enum REPL_ROLE_BOTH=3;
enum REPL_INTERVAL_INFOLEVEL = PARMNUM_BASE_INFOLEVEL+0;
enum REPL_PULSE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL+1;
enum REPL_GUARDTIME_INFOLEVEL = PARMNUM_BASE_INFOLEVEL+2;
enum REPL_RANDOM_INFOLEVEL = PARMNUM_BASE_INFOLEVEL+3;
enum REPL_UNLOCK_NOFORCE=0;
enum REPL_UNLOCK_FORCE=1;
enum REPL_STATE_OK=0;
enum REPL_STATE_NO_MASTER=1;
enum REPL_STATE_NO_SYNC=2;
enum REPL_STATE_NEVER_REPLICATED=3;
enum REPL_INTEGRITY_FILE=1;
enum REPL_INTEGRITY_TREE=2;
enum REPL_EXTENT_FILE=1;
enum REPL_EXTENT_TREE=2;
enum REPL_EXPORT_INTEGRITY_INFOLEVEL = PARMNUM_BASE_INFOLEVEL+0;
enum REPL_EXPORT_EXTENT_INFOLEVEL = PARMNUM_BASE_INFOLEVEL+1;
struct REPL_INFO_0 {
DWORD rp0_role;
LPWSTR rp0_exportpath;
LPWSTR rp0_exportlist;
LPWSTR rp0_importpath;
LPWSTR rp0_importlist;
LPWSTR rp0_logonusername;
DWORD rp0_interval;
DWORD rp0_pulse;
DWORD rp0_guardtime;
DWORD rp0_random;
}
alias REPL_INFO_0* PREPL_INFO_0, LPREPL_INFO_0;
struct REPL_INFO_1000 {
DWORD rp1000_interval;
}
alias REPL_INFO_1000* PREPL_INFO_1000, LPREPL_INFO_1000;
struct REPL_INFO_1001 {
DWORD rp1001_pulse;
}
alias REPL_INFO_1001* PREPL_INFO_1001, LPREPL_INFO_1001;
struct REPL_INFO_1002 {
DWORD rp1002_guardtime;
}
alias REPL_INFO_1002* PREPL_INFO_1002, LPREPL_INFO_1002;
struct REPL_INFO_1003 {
DWORD rp1003_random;
}
alias REPL_INFO_1003* PREPL_INFO_1003, LPREPL_INFO_1003;
struct REPL_EDIR_INFO_0 {
LPWSTR rped0_dirname;
}
alias REPL_EDIR_INFO_0* PREPL_EDIR_INFO_0, LPREPL_EDIR_INFO_0;
struct REPL_EDIR_INFO_1 {
LPWSTR rped1_dirname;
DWORD rped1_integrity;
DWORD rped1_extent;
}
alias REPL_EDIR_INFO_1* PREPL_EDIR_INFO_1, LPREPL_EDIR_INFO_1;
struct REPL_EDIR_INFO_2 {
LPWSTR rped2_dirname;
DWORD rped2_integrity;
DWORD rped2_extent;
DWORD rped2_lockcount;
DWORD rped2_locktime;
}
alias REPL_EDIR_INFO_2* PREPL_EDIR_INFO_2, LPREPL_EDIR_INFO_2;
struct REPL_EDIR_INFO_1000 {
DWORD rped1000_integrity;
}
alias REPL_EDIR_INFO_1000* PREPL_EDIR_INFO_1000, LPREPL_EDIR_INFO_1000;
struct REPL_EDIR_INFO_1001 {
DWORD rped1001_extent;
}
alias REPL_EDIR_INFO_1001* PREPL_EDIR_INFO_1001, LPREPL_EDIR_INFO_1001;
struct REPL_IDIR_INFO_0 {
LPWSTR rpid0_dirname;
}
alias REPL_IDIR_INFO_0* PREPL_IDIR_INFO_0, LPREPL_IDIR_INFO_0;
struct REPL_IDIR_INFO_1 {
LPWSTR rpid1_dirname;
DWORD rpid1_state;
LPWSTR rpid1_mastername;
DWORD rpid1_last_update_time;
DWORD rpid1_lockcount;
DWORD rpid1_locktime;
}
alias REPL_IDIR_INFO_1* PREPL_IDIR_INFO_1, LPREPL_IDIR_INFO_1;
extern (Windows) {
NET_API_STATUS NetReplGetInfo(LPCWSTR,DWORD,PBYTE*);
NET_API_STATUS NetReplSetInfo(LPCWSTR,DWORD,PBYTE,PDWORD);
NET_API_STATUS NetReplExportDirAdd(LPCWSTR,DWORD,PBYTE,PDWORD);
NET_API_STATUS NetReplExportDirDel(LPCWSTR,LPCWSTR);
NET_API_STATUS NetReplExportDirEnum(LPCWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD);
NET_API_STATUS NetReplExportDirGetInfo(LPCWSTR,LPCWSTR,DWORD,PBYTE*);
NET_API_STATUS NetReplExportDirSetInfo(LPCWSTR,LPCWSTR,DWORD,PBYTE,PDWORD);
NET_API_STATUS NetReplExportDirLock(LPCWSTR,LPCWSTR);
NET_API_STATUS NetReplExportDirUnlock(LPCWSTR,LPCWSTR,DWORD);
NET_API_STATUS NetReplImportDirAdd(LPCWSTR,DWORD,PBYTE,PDWORD);
NET_API_STATUS NetReplImportDirDel(LPCWSTR,LPCWSTR);
NET_API_STATUS NetReplImportDirEnum(LPCWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD);
NET_API_STATUS NetReplImportDirGetInfo(LPCWSTR,LPCWSTR,DWORD,PBYTE*);
NET_API_STATUS NetReplImportDirLock(LPCWSTR,LPCWSTR);
NET_API_STATUS NetReplImportDirUnlock(LPCWSTR,LPCWSTR,DWORD);
}
| D |
import progressbar.parser;
import std.stdio;
import std.range;
import std.typecons;
int main(string[] args)
{
auto pb = new Progressbar(100, 0);
auto ui = textUi(pb, "abc%=30p");
pb.message("hello world");
for (int i = 0; i < 10; ++i)
{
pb.step(1);
write(ui.toString() ~ "\r");
}
ui.toString.writeln;
pb.step(20);
ui.toString.writeln;
pb.step(10);
ui.toString.writeln;
return 0;
}
| D |
/afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/obj/x86_64-slc6-gcc48-opt/xAODHIEvent/obj/HIEventShape_v1.o /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/obj/x86_64-slc6-gcc48-opt/xAODHIEvent/obj/HIEventShape_v1.d : /afs/cern.ch/work/m/mizhou/RUN_FB/xAODHIEvent/Root/HIEventShape_v1.cxx /afs/cern.ch/work/m/mizhou/RUN_FB/xAODHIEvent/xAODHIEvent/versions/HIEventShape_v1.h /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthContainers/AuxElement.h /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthContainersInterfaces/IAuxElement.h /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthContainersInterfaces/IConstAuxStore.h /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthContainersInterfaces/AuxTypes.h /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/CxxUtils/unordered_set.h /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/CxxUtils/hashtable.h /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/remove_const.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/is_volatile.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/config.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/config/user.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/config/select_compiler_config.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/config/compiler/gcc.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/config/select_stdlib_config.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/config/stdlib/libstdcpp3.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/config/select_platform_config.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/config/platform/linux.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/config/posix_features.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/config/suffix.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/detail/workaround.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/detail/cv_traits_impl.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/detail/bool_trait_def.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/detail/template_arity_spec.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/int.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/int_fwd.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/adl_barrier.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/config/adl.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/config/msvc.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/config/intel.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/config/gcc.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/config/workaround.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/nttp_decl.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/config/nttp.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/integral_wrapper.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/integral_c_tag.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/config/static_constant.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/static_cast.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/preprocessor/cat.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/preprocessor/config/config.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/template_arity_fwd.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/preprocessor/params.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/config/preprocessor.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/preprocessor/comma_if.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/preprocessor/punctuation/comma_if.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/preprocessor/control/if.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/preprocessor/control/iif.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/preprocessor/logical/bool.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/preprocessor/facilities/empty.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/preprocessor/punctuation/comma.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/preprocessor/repeat.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/preprocessor/repetition/repeat.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/preprocessor/debug/error.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/preprocessor/detail/auto_rec.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/preprocessor/tuple/eat.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/preprocessor/inc.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/preprocessor/arithmetic/inc.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/config/lambda.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/config/ttp.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/config/ctps.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/config/overload_resolution.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/integral_constant.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/bool.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/bool_fwd.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/integral_c.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/integral_c_fwd.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/lambda_support.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/detail/bool_trait_undef.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/detail/type_trait_def.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/detail/type_trait_undef.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthContainersInterfaces/IAuxStore.h /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthLinks/DataLink.h /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthLinks/DataLinkBase.h /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthLinks/tools/selection_ns.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.02.12-x86_64-slc6-gcc48-opt/include/RVersion.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.02.12-x86_64-slc6-gcc48-opt/include/RootMetaSelection.h /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthLinks/DataLink.icc /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.02.12-x86_64-slc6-gcc48-opt/include/TError.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.02.12-x86_64-slc6-gcc48-opt/include/Rtypes.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.02.12-x86_64-slc6-gcc48-opt/include/RtypesCore.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.02.12-x86_64-slc6-gcc48-opt/include/RConfig.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.02.12-x86_64-slc6-gcc48-opt/include/DllImport.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.02.12-x86_64-slc6-gcc48-opt/include/Rtypeinfo.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.02.12-x86_64-slc6-gcc48-opt/include/snprintf.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.02.12-x86_64-slc6-gcc48-opt/include/strlcpy.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.02.12-x86_64-slc6-gcc48-opt/include/TGenericClassInfo.h /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.02.12-x86_64-slc6-gcc48-opt/include/TSchemaHelper.h /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/xAODRootAccessInterfaces/TVirtualEvent.h /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/xAODRootAccessInterfaces/TVirtualEvent.icc /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/xAODRootAccessInterfaces/TActiveEvent.h /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthContainers/AuxTypeRegistry.h /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthContainersInterfaces/IAuxTypeVector.h /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthContainersInterfaces/IAuxTypeVectorFactory.h /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthContainers/tools/AuxTypeVector.h /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthContainersInterfaces/IAuxSetOption.h /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthContainers/tools/AuxDataTraits.h /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthContainers/PackedContainer.h /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthContainers/PackedParameters.h /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthContainersInterfaces/AuxDataOption.h /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthContainersInterfaces/AuxDataOption.icc /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthContainers/PackedParameters.icc /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/CxxUtils/override.h /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthContainers/PackedContainer.icc /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthContainers/tools/AuxTypeVector.icc /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthContainers/tools/AuxTypeVectorFactory.h /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthContainers/tools/AuxTypeVectorFactory.icc /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthContainers/tools/threading.h /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthContainers/tools/threading.icc /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthContainers/AuxTypeRegistry.icc /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthContainers/AuxVectorData.h /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthContainers/tools/likely.h /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthContainers/tools/assume.h /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthContainers/AuxVectorData.icc /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthContainers/exceptions.h /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/CxxUtils/noreturn.h /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthContainers/AuxElement.icc /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthContainers/DataVector.h /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthContainers/OwnershipPolicy.h /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthContainers/IndexTrackingPolicy.h /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthContainers/AuxVectorBase.h /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthContainers/tools/ATHCONTAINERS_ASSERT.h /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthContainersInterfaces/AuxStore_traits.h /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthContainers/AuxVectorBase.icc /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthContainers/tools/DVLNoBase.h /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthContainers/tools/DVLInfo.h /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthContainers/tools/ClassID.h /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthContainers/tools/DVLInfo.icc /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthContainers/tools/DVLCast.h /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthContainers/tools/DVLIterator.h /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthContainers/tools/ElementProxy.h /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthContainers/tools/ElementProxy.icc /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/iterator/iterator_adaptor.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/static_assert.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/iterator.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/detail/iterator.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/iterator/iterator_categories.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/iterator/detail/config_def.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/eval_if.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/if.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/value_wknd.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/config/integral.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/config/eti.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/na_spec.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/lambda_fwd.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/void_fwd.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/na.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/na_fwd.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/lambda_arity_param.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/arity.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/config/dtp.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/preprocessor/enum.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/limits/arity.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/preprocessor/logical/and.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/preprocessor/logical/bitand.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/preprocessor/identity.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/preprocessor/facilities/identity.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/preprocessor/empty.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/preprocessor/arithmetic/add.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/preprocessor/arithmetic/dec.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/preprocessor/control/while.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/preprocessor/list/fold_left.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/preprocessor/list/detail/fold_left.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/preprocessor/control/expr_iif.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/preprocessor/list/adt.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/preprocessor/detail/is_binary.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/preprocessor/detail/check.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/preprocessor/logical/compl.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/preprocessor/list/fold_right.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/preprocessor/list/detail/fold_right.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/preprocessor/list/reverse.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/preprocessor/control/detail/while.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/preprocessor/tuple/elem.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/preprocessor/facilities/expand.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/preprocessor/facilities/overload.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/preprocessor/variadic/size.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/preprocessor/tuple/rem.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/preprocessor/tuple/detail/is_single_return.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/preprocessor/variadic/elem.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/preprocessor/arithmetic/sub.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/identity.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/placeholders.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/arg.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/arg_fwd.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/na_assert.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/assert.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/not.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/nested_type_wknd.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/yes_no.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/config/arrays.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/config/gpu.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/config/pp_counter.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/arity_spec.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/arg_typedef.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/config/use_preprocessed.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/include_preprocessed.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/config/compiler.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/preprocessor/stringize.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/preprocessed/gcc/arg.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/is_convertible.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/intrinsics.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/config.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/is_same.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/is_reference.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/is_lvalue_reference.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/is_rvalue_reference.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/ice.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/detail/yes_no_type.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/detail/ice_or.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/detail/ice_and.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/detail/ice_not.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/detail/ice_eq.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/is_array.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/is_arithmetic.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/is_integral.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/is_float.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/is_void.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/is_abstract.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/add_lvalue_reference.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/add_reference.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/add_rvalue_reference.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/is_function.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/detail/false_result.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/detail/is_function_ptr_helper.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/utility/declval.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/iterator/detail/config_undef.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/iterator/iterator_facade.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/iterator/interoperable.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/or.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/preprocessed/gcc/or.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/iterator/iterator_traits.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/iterator/detail/facade_iterator_category.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/and.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/preprocessed/gcc/and.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/is_const.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/detail/indirect_traits.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/is_pointer.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/is_member_pointer.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/is_member_function_pointer.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/detail/is_mem_fun_pointer_impl.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/remove_cv.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/is_class.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/remove_reference.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/remove_pointer.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/iterator/detail/enable_if.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/utility/addressof.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/core/addressof.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/add_const.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/add_pointer.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/is_pod.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/is_scalar.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/is_enum.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/always.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/preprocessor/default_params.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/apply.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/apply_fwd.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/preprocessed/gcc/apply_fwd.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/apply_wrap.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/has_apply.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/has_xxx.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/type_wrapper.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/config/has_xxx.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/config/msvc_typename.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/preprocessor/array/elem.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/preprocessor/array/data.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/preprocessor/array/size.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/preprocessor/repetition/enum_params.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/preprocessor/repetition/enum_trailing_params.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/config/has_apply.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/msvc_never_true.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/preprocessed/gcc/apply_wrap.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/lambda.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/bind.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/bind_fwd.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/config/bind.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/preprocessed/gcc/bind_fwd.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/next.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/next_prior.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/common_name_wknd.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/protect.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/preprocessed/gcc/bind.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/full_lambda.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/quote.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/void.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/has_type.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/config/bcc.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/preprocessed/gcc/quote.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/template_arity.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/aux_/preprocessed/gcc/apply.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/version.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthContainers/tools/DVL_iter_swap.h /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthContainers/tools/DVL_algorithms.h /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthContainers/tools/DVL_algorithms.icc /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthContainers/tools/IsMostDerivedFlag.h /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/add_cv.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/add_volatile.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/aligned_storage.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/aligned_storage.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/alignment_of.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/detail/size_t_trait_def.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/size_t.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/mpl/size_t_fwd.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/detail/size_t_trait_undef.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/type_with_alignment.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/preprocessor/list/for_each_i.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/preprocessor/repetition/for.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/preprocessor/repetition/detail/for.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/preprocessor/tuple/to_list.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/preprocessor/tuple/size.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/preprocessor/list/transform.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/preprocessor/list/append.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/common_type.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/conditional.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/decay.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/remove_bounds.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/extent.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/floating_point_promotion.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/function_traits.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/has_new_operator.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/has_nothrow_assign.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/has_trivial_assign.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/has_nothrow_constructor.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/has_trivial_constructor.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/has_nothrow_copy.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/has_trivial_copy.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/has_nothrow_destructor.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/has_trivial_destructor.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/has_operator.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/has_bit_and.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/detail/has_binary_operator.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/is_base_of.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/is_base_and_derived.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/is_fundamental.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/has_bit_and_assign.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/has_bit_or.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/has_bit_or_assign.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/has_bit_xor.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/has_bit_xor_assign.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/has_complement.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/detail/has_prefix_operator.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/has_dereference.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/has_divides.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/has_divides_assign.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/has_equal_to.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/has_greater.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/has_greater_equal.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/has_left_shift.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/has_left_shift_assign.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/has_less.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/has_less_equal.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/has_logical_and.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/has_logical_not.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/has_logical_or.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/has_minus.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/has_minus_assign.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/has_modulus.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/has_modulus_assign.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/has_multiplies.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/has_multiplies_assign.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/has_negate.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/has_not_equal_to.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/has_plus.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/has_plus_assign.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/has_post_decrement.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/detail/has_postfix_operator.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/has_post_increment.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/has_pre_decrement.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/has_pre_increment.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/has_right_shift.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/has_right_shift_assign.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/has_unary_minus.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/has_unary_plus.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/has_trivial_move_assign.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/has_trivial_move_constructor.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/has_virtual_destructor.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/is_complex.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/is_compound.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/is_copy_constructible.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/noncopyable.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/core/noncopyable.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/is_copy_assignable.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/is_empty.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/is_floating_point.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/is_member_object_pointer.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/is_nothrow_move_assignable.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/utility/enable_if.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/core/enable_if.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/is_nothrow_move_constructible.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/is_object.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/is_polymorphic.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/is_signed.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/is_stateless.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/is_union.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/is_unsigned.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/is_virtual_base_of.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/make_unsigned.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/make_signed.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/rank.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/remove_extent.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/remove_all_extents.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/remove_volatile.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/integral_promotion.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/boost/type_traits/promote.hpp /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthContainers/ClassName.h /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthContainers/ClassName.icc /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthContainers/tools/error.h /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthContainers/DataVector.icc /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthContainers/tools/CompareAndPrint.h /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthLinks/ElementLink.h /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthLinks/ElementLinkBase.h /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthLinks/tools/TypeTools.h /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/AthLinks/ElementLink.icc /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/xAODCore/BaseInfo.h /afs/cern.ch/work/m/mizhou/RUN_FB/xAODHIEvent/xAODHIEvent/versions/HIEventShapeContainer_v1.h /afs/cern.ch/work/m/mizhou/RUN_FB/RootCoreBin/include/xAODCore/AuxStoreAccessorMacros.h
| D |
/home/adam/Bureau/GitProjetAlgoFinal/ProjetAlgoFinal/executable-Bahroun-Ranarimahefa/.build/x86_64-unknown-linux/debug/executable_Bahroun_Ranarimahefa.build/main.swift.o : /home/adam/Bureau/GitProjetAlgoFinal/ProjetAlgoFinal/executable-Bahroun-Ranarimahefa/Sources/executable-Bahroun-Ranarimahefa/main.swift /home/adam/.local/share/umake/swift/swift-lang/usr/lib/swift/linux/x86_64/Swift.swiftmodule /home/adam/.local/share/umake/swift/swift-lang/usr/lib/swift/linux/x86_64/SwiftOnoneSupport.swiftmodule /home/adam/.local/share/umake/swift/swift-lang/usr/lib/swift/linux/x86_64/glibc.modulemap
/home/adam/Bureau/GitProjetAlgoFinal/ProjetAlgoFinal/executable-Bahroun-Ranarimahefa/.build/x86_64-unknown-linux/debug/executable_Bahroun_Ranarimahefa.build/main~partial.swiftmodule : /home/adam/Bureau/GitProjetAlgoFinal/ProjetAlgoFinal/executable-Bahroun-Ranarimahefa/Sources/executable-Bahroun-Ranarimahefa/main.swift /home/adam/.local/share/umake/swift/swift-lang/usr/lib/swift/linux/x86_64/Swift.swiftmodule /home/adam/.local/share/umake/swift/swift-lang/usr/lib/swift/linux/x86_64/SwiftOnoneSupport.swiftmodule /home/adam/.local/share/umake/swift/swift-lang/usr/lib/swift/linux/x86_64/glibc.modulemap
/home/adam/Bureau/GitProjetAlgoFinal/ProjetAlgoFinal/executable-Bahroun-Ranarimahefa/.build/x86_64-unknown-linux/debug/executable_Bahroun_Ranarimahefa.build/main~partial.swiftdoc : /home/adam/Bureau/GitProjetAlgoFinal/ProjetAlgoFinal/executable-Bahroun-Ranarimahefa/Sources/executable-Bahroun-Ranarimahefa/main.swift /home/adam/.local/share/umake/swift/swift-lang/usr/lib/swift/linux/x86_64/Swift.swiftmodule /home/adam/.local/share/umake/swift/swift-lang/usr/lib/swift/linux/x86_64/SwiftOnoneSupport.swiftmodule /home/adam/.local/share/umake/swift/swift-lang/usr/lib/swift/linux/x86_64/glibc.modulemap
| D |
module procon.connecter;
import std.stdio;
import vibe.d;
import vibe.http.websockets;
import std.json;
import procon.container;
import procon.greedySearch;
import procon.mct;
import procon.encoder;
import procon.decoder;
const serverURL = "ws://127.0.0.1:8080";
/*
JSONValue search(Color color,int turn,Board board){
MCT mct;
mct.color=color;
mct.gameTurn=turn;
Node rootNode;
rootNode.board=board;
mct.nodes~=rootNode;
foreach(i;0..searchLimit){
mct.visitNode();
}
auto bestOp=mct.bestOp();
return makeOperationJson(color,bestOp);
}
*/
void connect (Color color){
while (true){
auto ws=connectWebSocket(URL.parse(serverURL));
JSONValue req;
req["type"]="req-board";
ws.send(req.toString);
while(ws.waitForData()){
auto txt=ws.receiveText();
//txt.writeln();
auto json=parseJSON(txt);
if (json["type"].toString=="\"distribute-board\""){
Board board=decode(json["payload"]["board"]);
int turn=to!int(json["payload"]["turn"].integer);
auto opJson = MCTSearch(color,turn,board);
opJson.writeln();
ws.send(opJson.toString);
}
}
}
}
| D |
/Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/CoreML_test.build/Debug-iphonesimulator/CoreML_test.build/Objects-normal/x86_64/TranslatedData.o : /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/CoreML_test.build/Debug-iphonesimulator/CoreML_test.build/DerivedSources/CoreMLGenerated/Inceptionv3/Inceptionv3.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/CoreML_test.build/Debug-iphonesimulator/CoreML_test.build/DerivedSources/CoreMLGenerated/Alphanum_28x28/Alphanum_28x28.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Data/New\ Group/TranslatedData.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Services/TranslationService.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/AppDelegate.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Map_/MapAnnotation/Artwork.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Common/Views/KerningLabel.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/OCR/OCRPresenterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Main/MainPresenterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Translation/TranslationPresenterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/TextDetection/TextDetectionPresenterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Map_/MapPresenterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/TextDetector/TextDetectorPresenterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/OCR/OCRRouterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Main/MainRouterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Translation/TranslationRouterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/TextDetection/TextDetectionRouterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Map_/MapRouterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/TextDetector/TextDetectorRouterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Extension/HTTPURLResponseExtension.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Services/Providers/\ TranslationProvider.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/ViewController.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/OCR/OCRViewController.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Main/MainViewController.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Translation/TranslationViewController.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/TextDetection/TextDetectionViewController.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Map_/MapViewController.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/TextDetector/TextDetectorViewController.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Data/New\ Group/ApiError.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Common/TranslationApiError.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/OCR/Utils/ImageUtils.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Extension/UIViewController\ Extensions.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/OCR/AlertControllers/AlertControllerFunctions.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/OCR/OCRContract.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Main/MainContract.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Translation/TranslationContract.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/TextDetection/TextDetectionContract.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Map_/MapContract.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/TextDetector/TextDetectorContract.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/OCR/OCRDIPart.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/DI/NetworkDIPart.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Main/MainDIPart.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Translation/TranslationDIPart.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/TextDetection/TextDetectionDIPart.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Map_/MapDIPart.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/DI/AppDIPart.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/TextDetector/TextDetectorDIPart.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Map_/MapViews/ArtworkView.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/CustomView/PreviewView.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/Alamofire/Alamofire.framework/Modules/Alamofire.swiftmodule/x86_64.swiftmodule /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/CodableAlamofire/CodableAlamofire.framework/Modules/CodableAlamofire.swiftmodule/x86_64.swiftmodule /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/RxAlamofire/RxAlamofire.framework/Modules/RxAlamofire.swiftmodule/x86_64.swiftmodule /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/SwiftHash/SwiftHash.framework/Modules/SwiftHash.swiftmodule/x86_64.swiftmodule /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/ObjectMapper/ObjectMapper.framework/Modules/ObjectMapper.swiftmodule/x86_64.swiftmodule /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/Localize-Swift/Localize_Swift.framework/Modules/Localize_Swift.swiftmodule/x86_64.swiftmodule /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/RxSwift/RxSwift.framework/Modules/RxSwift.swiftmodule/x86_64.swiftmodule /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/DITranquillity/DITranquillity.framework/Modules/DITranquillity.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreMedia.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/simd.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/Vision.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreLocation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/AVFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreAudio.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Contacts.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/MapKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/SVProgressHUD/SVProgressHUD.framework/Headers/SVProgressHUD.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/Headers/TesseractOCR.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/SVProgressHUD/SVProgressHUD.framework/Headers/SVProgressHUD-umbrella.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/Headers/TesseractOCRiOS-umbrella.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/Alamofire/Alamofire.framework/Headers/Alamofire-umbrella.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/CodableAlamofire/CodableAlamofire.framework/Headers/CodableAlamofire-umbrella.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/RxAlamofire/RxAlamofire.framework/Headers/RxAlamofire-umbrella.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/SwiftHash/SwiftHash.framework/Headers/SwiftHash-umbrella.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/ObjectMapper/ObjectMapper.framework/Headers/ObjectMapper-umbrella.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/Localize-Swift/Localize_Swift.framework/Headers/Localize-Swift-umbrella.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/RxSwift/RxSwift.framework/Headers/RxSwift-umbrella.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/DITranquillity/DITranquillity.framework/Headers/DITranquillity-umbrella.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/CodableAlamofire/CodableAlamofire.framework/Headers/CodableAlamofire.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/DITranquillity/DITranquillity.framework/Headers/DIStoryboardBase.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/Headers/G8TesseractDelegate.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/Headers/G8RecognizedBlock.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/Headers/G8RecognitionOperation.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Tesseract/CoreML_test-Bridging-Header.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/SVProgressHUD/SVProgressHUD.framework/Headers/SVRadialGradientLayer.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/Headers/G8TesseractParameters.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/Headers/UIImage+G8Filters.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/Headers/G8Constants.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/Headers/G8Tesseract.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/Alamofire/Alamofire.framework/Headers/Alamofire-Swift.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/CodableAlamofire/CodableAlamofire.framework/Headers/CodableAlamofire-Swift.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/RxAlamofire/RxAlamofire.framework/Headers/RxAlamofire-Swift.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/SwiftHash/SwiftHash.framework/Headers/SwiftHash-Swift.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/ObjectMapper/ObjectMapper.framework/Headers/ObjectMapper-Swift.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/Localize-Swift/Localize_Swift.framework/Headers/Localize_Swift-Swift.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/RxSwift/RxSwift.framework/Headers/RxSwift-Swift.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/DITranquillity/DITranquillity.framework/Headers/DITranquillity-Swift.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/Localize-Swift/Localize_Swift.framework/Headers/Localize_Swift.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/SVProgressHUD/SVProgressHUD.framework/Headers/SVIndefiniteAnimatedView.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/SVProgressHUD/SVProgressHUD.framework/Headers/SVProgressAnimatedView.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/DITranquillity/DITranquillity.framework/Headers/DITranquillity.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/SVProgressHUD/SVProgressHUD.framework/Modules/module.modulemap /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/Modules/module.modulemap /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/Alamofire/Alamofire.framework/Modules/module.modulemap /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/CodableAlamofire/CodableAlamofire.framework/Modules/module.modulemap /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/RxAlamofire/RxAlamofire.framework/Modules/module.modulemap /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/SwiftHash/SwiftHash.framework/Modules/module.modulemap /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/ObjectMapper/ObjectMapper.framework/Modules/module.modulemap /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/Localize-Swift/Localize_Swift.framework/Modules/module.modulemap /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/RxSwift/RxSwift.framework/Modules/module.modulemap /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/DITranquillity/DITranquillity.framework/Modules/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.2.sdk/System/Library/Frameworks/CoreML.framework/Headers/CoreML.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.2.sdk/System/Library/Frameworks/Vision.framework/Headers/Vision.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.2.sdk/System/Library/Frameworks/CoreLocation.framework/Headers/CoreLocation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.2.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.2.sdk/System/Library/Frameworks/Contacts.framework/Headers/Contacts.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.2.sdk/System/Library/Frameworks/MapKit.framework/Headers/MapKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.2.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioToolbox.apinotes
/Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/CoreML_test.build/Debug-iphonesimulator/CoreML_test.build/Objects-normal/x86_64/TranslatedData~partial.swiftmodule : /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/CoreML_test.build/Debug-iphonesimulator/CoreML_test.build/DerivedSources/CoreMLGenerated/Inceptionv3/Inceptionv3.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/CoreML_test.build/Debug-iphonesimulator/CoreML_test.build/DerivedSources/CoreMLGenerated/Alphanum_28x28/Alphanum_28x28.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Data/New\ Group/TranslatedData.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Services/TranslationService.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/AppDelegate.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Map_/MapAnnotation/Artwork.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Common/Views/KerningLabel.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/OCR/OCRPresenterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Main/MainPresenterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Translation/TranslationPresenterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/TextDetection/TextDetectionPresenterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Map_/MapPresenterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/TextDetector/TextDetectorPresenterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/OCR/OCRRouterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Main/MainRouterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Translation/TranslationRouterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/TextDetection/TextDetectionRouterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Map_/MapRouterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/TextDetector/TextDetectorRouterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Extension/HTTPURLResponseExtension.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Services/Providers/\ TranslationProvider.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/ViewController.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/OCR/OCRViewController.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Main/MainViewController.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Translation/TranslationViewController.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/TextDetection/TextDetectionViewController.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Map_/MapViewController.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/TextDetector/TextDetectorViewController.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Data/New\ Group/ApiError.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Common/TranslationApiError.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/OCR/Utils/ImageUtils.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Extension/UIViewController\ Extensions.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/OCR/AlertControllers/AlertControllerFunctions.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/OCR/OCRContract.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Main/MainContract.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Translation/TranslationContract.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/TextDetection/TextDetectionContract.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Map_/MapContract.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/TextDetector/TextDetectorContract.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/OCR/OCRDIPart.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/DI/NetworkDIPart.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Main/MainDIPart.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Translation/TranslationDIPart.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/TextDetection/TextDetectionDIPart.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Map_/MapDIPart.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/DI/AppDIPart.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/TextDetector/TextDetectorDIPart.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Map_/MapViews/ArtworkView.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/CustomView/PreviewView.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/Alamofire/Alamofire.framework/Modules/Alamofire.swiftmodule/x86_64.swiftmodule /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/CodableAlamofire/CodableAlamofire.framework/Modules/CodableAlamofire.swiftmodule/x86_64.swiftmodule /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/RxAlamofire/RxAlamofire.framework/Modules/RxAlamofire.swiftmodule/x86_64.swiftmodule /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/SwiftHash/SwiftHash.framework/Modules/SwiftHash.swiftmodule/x86_64.swiftmodule /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/ObjectMapper/ObjectMapper.framework/Modules/ObjectMapper.swiftmodule/x86_64.swiftmodule /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/Localize-Swift/Localize_Swift.framework/Modules/Localize_Swift.swiftmodule/x86_64.swiftmodule /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/RxSwift/RxSwift.framework/Modules/RxSwift.swiftmodule/x86_64.swiftmodule /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/DITranquillity/DITranquillity.framework/Modules/DITranquillity.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreMedia.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/simd.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/Vision.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreLocation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/AVFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreAudio.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Contacts.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/MapKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/SVProgressHUD/SVProgressHUD.framework/Headers/SVProgressHUD.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/Headers/TesseractOCR.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/SVProgressHUD/SVProgressHUD.framework/Headers/SVProgressHUD-umbrella.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/Headers/TesseractOCRiOS-umbrella.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/Alamofire/Alamofire.framework/Headers/Alamofire-umbrella.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/CodableAlamofire/CodableAlamofire.framework/Headers/CodableAlamofire-umbrella.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/RxAlamofire/RxAlamofire.framework/Headers/RxAlamofire-umbrella.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/SwiftHash/SwiftHash.framework/Headers/SwiftHash-umbrella.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/ObjectMapper/ObjectMapper.framework/Headers/ObjectMapper-umbrella.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/Localize-Swift/Localize_Swift.framework/Headers/Localize-Swift-umbrella.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/RxSwift/RxSwift.framework/Headers/RxSwift-umbrella.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/DITranquillity/DITranquillity.framework/Headers/DITranquillity-umbrella.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/CodableAlamofire/CodableAlamofire.framework/Headers/CodableAlamofire.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/DITranquillity/DITranquillity.framework/Headers/DIStoryboardBase.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/Headers/G8TesseractDelegate.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/Headers/G8RecognizedBlock.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/Headers/G8RecognitionOperation.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Tesseract/CoreML_test-Bridging-Header.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/SVProgressHUD/SVProgressHUD.framework/Headers/SVRadialGradientLayer.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/Headers/G8TesseractParameters.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/Headers/UIImage+G8Filters.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/Headers/G8Constants.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/Headers/G8Tesseract.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/Alamofire/Alamofire.framework/Headers/Alamofire-Swift.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/CodableAlamofire/CodableAlamofire.framework/Headers/CodableAlamofire-Swift.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/RxAlamofire/RxAlamofire.framework/Headers/RxAlamofire-Swift.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/SwiftHash/SwiftHash.framework/Headers/SwiftHash-Swift.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/ObjectMapper/ObjectMapper.framework/Headers/ObjectMapper-Swift.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/Localize-Swift/Localize_Swift.framework/Headers/Localize_Swift-Swift.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/RxSwift/RxSwift.framework/Headers/RxSwift-Swift.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/DITranquillity/DITranquillity.framework/Headers/DITranquillity-Swift.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/Localize-Swift/Localize_Swift.framework/Headers/Localize_Swift.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/SVProgressHUD/SVProgressHUD.framework/Headers/SVIndefiniteAnimatedView.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/SVProgressHUD/SVProgressHUD.framework/Headers/SVProgressAnimatedView.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/DITranquillity/DITranquillity.framework/Headers/DITranquillity.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/SVProgressHUD/SVProgressHUD.framework/Modules/module.modulemap /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/Modules/module.modulemap /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/Alamofire/Alamofire.framework/Modules/module.modulemap /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/CodableAlamofire/CodableAlamofire.framework/Modules/module.modulemap /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/RxAlamofire/RxAlamofire.framework/Modules/module.modulemap /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/SwiftHash/SwiftHash.framework/Modules/module.modulemap /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/ObjectMapper/ObjectMapper.framework/Modules/module.modulemap /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/Localize-Swift/Localize_Swift.framework/Modules/module.modulemap /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/RxSwift/RxSwift.framework/Modules/module.modulemap /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/DITranquillity/DITranquillity.framework/Modules/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.2.sdk/System/Library/Frameworks/CoreML.framework/Headers/CoreML.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.2.sdk/System/Library/Frameworks/Vision.framework/Headers/Vision.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.2.sdk/System/Library/Frameworks/CoreLocation.framework/Headers/CoreLocation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.2.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.2.sdk/System/Library/Frameworks/Contacts.framework/Headers/Contacts.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.2.sdk/System/Library/Frameworks/MapKit.framework/Headers/MapKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.2.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioToolbox.apinotes
/Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/CoreML_test.build/Debug-iphonesimulator/CoreML_test.build/Objects-normal/x86_64/TranslatedData~partial.swiftdoc : /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/CoreML_test.build/Debug-iphonesimulator/CoreML_test.build/DerivedSources/CoreMLGenerated/Inceptionv3/Inceptionv3.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/CoreML_test.build/Debug-iphonesimulator/CoreML_test.build/DerivedSources/CoreMLGenerated/Alphanum_28x28/Alphanum_28x28.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Data/New\ Group/TranslatedData.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Services/TranslationService.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/AppDelegate.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Map_/MapAnnotation/Artwork.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Common/Views/KerningLabel.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/OCR/OCRPresenterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Main/MainPresenterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Translation/TranslationPresenterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/TextDetection/TextDetectionPresenterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Map_/MapPresenterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/TextDetector/TextDetectorPresenterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/OCR/OCRRouterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Main/MainRouterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Translation/TranslationRouterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/TextDetection/TextDetectionRouterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Map_/MapRouterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/TextDetector/TextDetectorRouterImpl.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Extension/HTTPURLResponseExtension.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Services/Providers/\ TranslationProvider.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/ViewController.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/OCR/OCRViewController.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Main/MainViewController.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Translation/TranslationViewController.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/TextDetection/TextDetectionViewController.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Map_/MapViewController.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/TextDetector/TextDetectorViewController.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Data/New\ Group/ApiError.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Common/TranslationApiError.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/OCR/Utils/ImageUtils.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Extension/UIViewController\ Extensions.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/OCR/AlertControllers/AlertControllerFunctions.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/OCR/OCRContract.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Main/MainContract.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Translation/TranslationContract.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/TextDetection/TextDetectionContract.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Map_/MapContract.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/TextDetector/TextDetectorContract.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/OCR/OCRDIPart.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/DI/NetworkDIPart.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Main/MainDIPart.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Translation/TranslationDIPart.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/TextDetection/TextDetectionDIPart.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Map_/MapDIPart.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/DI/AppDIPart.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/TextDetector/TextDetectorDIPart.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Models/Map_/MapViews/ArtworkView.swift /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/CustomView/PreviewView.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.apinotesc /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/Alamofire/Alamofire.framework/Modules/Alamofire.swiftmodule/x86_64.swiftmodule /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/CodableAlamofire/CodableAlamofire.framework/Modules/CodableAlamofire.swiftmodule/x86_64.swiftmodule /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/RxAlamofire/RxAlamofire.framework/Modules/RxAlamofire.swiftmodule/x86_64.swiftmodule /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/SwiftHash/SwiftHash.framework/Modules/SwiftHash.swiftmodule/x86_64.swiftmodule /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/ObjectMapper/ObjectMapper.framework/Modules/ObjectMapper.swiftmodule/x86_64.swiftmodule /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/Localize-Swift/Localize_Swift.framework/Modules/Localize_Swift.swiftmodule/x86_64.swiftmodule /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/RxSwift/RxSwift.framework/Modules/RxSwift.swiftmodule/x86_64.swiftmodule /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/DITranquillity/DITranquillity.framework/Modules/DITranquillity.swiftmodule/x86_64.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreMedia.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/simd.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/Vision.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreLocation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/AVFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreFoundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreAudio.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Contacts.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/MapKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/SwiftOnoneSupport.swiftmodule /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/SVProgressHUD/SVProgressHUD.framework/Headers/SVProgressHUD.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/Headers/TesseractOCR.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/SVProgressHUD/SVProgressHUD.framework/Headers/SVProgressHUD-umbrella.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/Headers/TesseractOCRiOS-umbrella.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/Alamofire/Alamofire.framework/Headers/Alamofire-umbrella.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/CodableAlamofire/CodableAlamofire.framework/Headers/CodableAlamofire-umbrella.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/RxAlamofire/RxAlamofire.framework/Headers/RxAlamofire-umbrella.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/SwiftHash/SwiftHash.framework/Headers/SwiftHash-umbrella.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/ObjectMapper/ObjectMapper.framework/Headers/ObjectMapper-umbrella.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/Localize-Swift/Localize_Swift.framework/Headers/Localize-Swift-umbrella.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/RxSwift/RxSwift.framework/Headers/RxSwift-umbrella.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/DITranquillity/DITranquillity.framework/Headers/DITranquillity-umbrella.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/CodableAlamofire/CodableAlamofire.framework/Headers/CodableAlamofire.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/DITranquillity/DITranquillity.framework/Headers/DIStoryboardBase.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/Headers/G8TesseractDelegate.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/Headers/G8RecognizedBlock.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/Headers/G8RecognitionOperation.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/CoreML_test/Tesseract/CoreML_test-Bridging-Header.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/SVProgressHUD/SVProgressHUD.framework/Headers/SVRadialGradientLayer.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/Headers/G8TesseractParameters.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/Headers/UIImage+G8Filters.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/Headers/G8Constants.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/Headers/G8Tesseract.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/Alamofire/Alamofire.framework/Headers/Alamofire-Swift.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/CodableAlamofire/CodableAlamofire.framework/Headers/CodableAlamofire-Swift.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/RxAlamofire/RxAlamofire.framework/Headers/RxAlamofire-Swift.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/SwiftHash/SwiftHash.framework/Headers/SwiftHash-Swift.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/ObjectMapper/ObjectMapper.framework/Headers/ObjectMapper-Swift.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/Localize-Swift/Localize_Swift.framework/Headers/Localize_Swift-Swift.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/RxSwift/RxSwift.framework/Headers/RxSwift-Swift.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/DITranquillity/DITranquillity.framework/Headers/DITranquillity-Swift.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/Localize-Swift/Localize_Swift.framework/Headers/Localize_Swift.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/SVProgressHUD/SVProgressHUD.framework/Headers/SVIndefiniteAnimatedView.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/SVProgressHUD/SVProgressHUD.framework/Headers/SVProgressAnimatedView.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/DITranquillity/DITranquillity.framework/Headers/DITranquillity.h /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/SVProgressHUD/SVProgressHUD.framework/Modules/module.modulemap /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/TesseractOCRiOS/TesseractOCR.framework/Modules/module.modulemap /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/Alamofire/Alamofire.framework/Modules/module.modulemap /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/CodableAlamofire/CodableAlamofire.framework/Modules/module.modulemap /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/RxAlamofire/RxAlamofire.framework/Modules/module.modulemap /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/SwiftHash/SwiftHash.framework/Modules/module.modulemap /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/ObjectMapper/ObjectMapper.framework/Modules/module.modulemap /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/Localize-Swift/Localize_Swift.framework/Modules/module.modulemap /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/RxSwift/RxSwift.framework/Modules/module.modulemap /Users/Polina/XcodeApp/diplom_prj/CoreML_test/build/Debug-iphonesimulator/DITranquillity/DITranquillity.framework/Modules/module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.2.sdk/System/Library/Frameworks/CoreML.framework/Headers/CoreML.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.2.sdk/System/Library/Frameworks/Vision.framework/Headers/Vision.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.2.sdk/System/Library/Frameworks/CoreLocation.framework/Headers/CoreLocation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.2.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.2.sdk/System/Library/Frameworks/Contacts.framework/Headers/Contacts.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.2.sdk/System/Library/Frameworks/MapKit.framework/Headers/MapKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.2.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioToolbox.apinotes
| D |
//****************************
//
var int OLDWOLRDThomas;
var int BUCHLABYRINTH_SCHALTER1;
var int BUCHLABYRINTH_SCHALTER2;
var int BUCHLABYRINTH_SCHALTER3;
var int BUCHLABYRINTH_SCHALTER4;
var int BUCHLABYRINTH_TRUHE1;
var int BUCHLABYRINTH_TRUHE2;
var int BUCHLABYRINTH_TRUHE3;
var int BUCHLABYRINTH_TRUHE4;
CONST STRING MOBNAME_LABYRINTHTRUHE = "Schatztruhe"; //Kisten
FUNC VOID ENTER_EVT_OLDWORLDMONSTER ()
{
if (OLDWOLRDThomas == FALSE)
{
Wld_PlayEffect("FX_EarthQuake", hero, hero, 0, 0, 0, FALSE );
Snd_Play ("Ravens_Earthquake4" );
//****************************
//
// Ehemaliges Lager der Waldleufer an der Küste
Wld_InsertNpc (Schattenwark,"FP_ROAM_OLDWORLD_PUMALOCH_1");
Wld_InsertNpc (Schattenwark,"FP_ROAM_OLDWORLD_PUMALOCH_2");
Wld_InsertNpc (Schattenwark,"FP_ROAM_OLDWORLD_PUMALOCH_3");
//****************************
// Buchlabyrinth
//
/*Wld_InsertNpc (Gobbo_Skeleton,"FP_ROAM_OLDWORLD_DUNGEON_1");
Wld_InsertNpc (Gobbo_Skeleton,"FP_ROAM_OLDWORLD_DUNGEON_2");
Wld_InsertNpc (Gobbo_Skeleton,"FP_ROAM_OLDWORLD_DUNGEON_3");
Wld_InsertNpc (Gobbo_Skeleton,"FP_ROAM_OLDWORLD_DUNGEON_4");
Wld_InsertNpc (Gobbo_Skeleton,"FP_ROAM_OLDWORLD_DUNGEON_5");
Wld_InsertNpc (Gobbo_Skeleton,"FP_ROAM_OLDWORLD_DUNGEON_6");
Wld_InsertNpc (Gobbo_Skeleton,"FP_ROAM_OLDWORLD_DUNGEON_7");
Wld_InsertNpc (Gobbo_Skeleton,"FP_ROAM_OLDWORLD_DUNGEON_8");
Wld_InsertNpc (Gobbo_Skeleton,"FP_ROAM_OLDWORLD_DUNGEON_9");
Wld_InsertNpc (Gobbo_Skeleton,"FP_ROAM_OLDWORLD_DUNGEON_10");
Wld_InsertNpc (Gobbo_Skeleton,"FP_ROAM_OLDWORLD_DUNGEON_11");
Wld_InsertNpc (Gobbo_Skeleton,"FP_ROAM_OLDWORLD_DUNGEON_12");*/
/*Wld_InsertNpc (SKELETRazor,"FP_ROAM_OLDWORLD_SKELETRAZOR_1");
Wld_InsertNpc (SKELETRazor,"FP_ROAM_OLDWORLD_SKELETRAZOR_2");
Wld_InsertNpc (SKELETRazor,"FP_ROAM_OLDWORLD_SKELETRAZOR_3");
Wld_InsertNpc (SKELETRazor,"FP_ROAM_OLDWORLD_SKELETRAZOR_4");
Wld_InsertNpc (SKELETRazor,"FP_ROAM_OLDWORLD_SKELETRAZOR_5");*/
Wld_InsertNpc (Scavenger_Demon,"FP_ROAM_OLDWORLD_BURG_1");
Wld_InsertNpc (Scavenger_Demon,"FP_ROAM_OLDWORLD_BURG_2");
Wld_InsertNpc (Scavenger_Demon,"FP_ROAM_OLDWORLD_BURG_3");
Wld_InsertNpc (Scavenger_Demon,"FP_ROAM_OLDWORLD_BURG_4");
Wld_InsertNpc (Scavenger_Demon,"FP_ROAM_OLDWORLD_BURG_5");
//****************************
//
// Plato hinter Xardas Turm
Wld_InsertNpc (Scavenger_Demon,"FP_ROAM_OLDWORLD_GRASPLATO_1");
Wld_InsertNpc (Scavenger_Demon,"FP_ROAM_OLDWORLD_GRASPLATO_2");
Wld_InsertNpc (Scavenger_Demon,"FP_ROAM_OLDWORLD_GRASPLATO_3");
Wld_InsertNpc (Scavenger_Demon,"FP_ROAM_OLDWORLD_GRASPLATO_4");
Wld_InsertNpc (Scavenger_Demon,"FP_ROAM_OLDWORLD_GRASPLATO_5");
Wld_InsertNpc (Scavenger_Demon,"FP_ROAM_OLDWORLD_GRASPLATO_6");
Wld_InsertNpc (Scavenger_Demon,"FP_ROAM_OLDWORLD_GRASPLATO_7");
Wld_InsertNpc (Scavenger_Demon,"FP_ROAM_OLDWORLD_GRASPLATO_8");
Wld_InsertNpc (Scavenger_Demon,"FP_ROAM_OLDWORLD_GRASPLATO_9");
Wld_InsertNpc (Scavenger_Demon,"FP_ROAM_OLDWORLD_GRASPLATO_10");
Wld_InsertNpc (Scavenger_Demon,"FP_ROAM_OLDWORLD_GRASPLATO_11");
Wld_InsertNpc (Scavenger_Demon,"FP_ROAM_OLDWORLD_GRASPLATO_12");
Wld_InsertNpc (Scavenger_Demon,"FP_ROAM_OLDWORLD_GRASPLATO_13");
Wld_InsertNpc (Scavenger_Demon,"FP_ROAM_OLDWORLD_GRASPLATO_14");
Wld_InsertNpc (Scavenger_Demon,"FP_ROAM_OLDWORLD_GRASPLATO_15");
Wld_InsertNpc (Hauertroll,"FP_ROAM_OLDWORLD_GRASPLATOTROL_1");
Wld_InsertNpc (Hauertroll,"FP_ROAM_OLDWORLD_GRASPLATOTROL_2");
Wld_InsertNpc (Gobbo_Tugettso01,"FP_ROAM_OLDWORLD_GRASPLATO_100");
Wld_InsertNpc (Gobbo_Tugettso02,"FP_ROAM_OLDWORLD_GRASPLATO_101");
Wld_InsertNpc (Gobbo_Tugettso03,"FP_ROAM_OLDWORLD_GRASPLATO_102");
Wld_InsertNpc (Gobbo_Tugettso04,"FP_ROAM_OLDWORLD_GRASPLATO_103");
Wld_InsertNpc (Schattenwark,"FP_ROAM_OLDWORLD_GRASPLATO_104");
Wld_InsertNpc (Shadowbeast,"FP_ROAM_OLDWORLD_GRASPLATOSHA_1");
//****************************
//
//****************************Felsen überdem neeun Lager
Wld_InsertNpc (Gobbo_Tugettso01,"FP_ROAM_OLDWORLD_NEUESLAGER_104");
Wld_InsertNpc (Gobbo_Tugettso02,"FP_ROAM_OLDWORLD_NEUESLAGER_105");
Wld_InsertNpc (Gobbo_Tugettso03,"FP_ROAM_OLDWORLD_NEUESLAGER_106");
Wld_InsertNpc (Gobbo_Tugettso04,"FP_ROAM_OLDWORLD_NEUESLAGER_107");
Wld_InsertNpc (Scavenger_Demon,"FP_ROAM_OLDWORLD_NEUESLAGER_108");
Wld_InsertNpc (Scavenger_Demon,"FP_ROAM_OLDWORLD_NEUESLAGER_109");
Wld_InsertNpc (Scavenger_Demon,"FP_ROAM_OLDWORLD_NEUESLAGER_1010");
Wld_InsertNpc (Scavenger_Demon,"FP_ROAM_OLDWORLD_NEUESLAGER_1011");
Wld_InsertNpc (Scavenger_Demon,"FP_ROAM_OLDWORLD_NEUESLAGER_1012");
Wld_InsertNpc (Scavenger_Demon,"FP_ROAM_OLDWORLD_NEUESLAGER_1021");
Wld_InsertNpc (Scavenger_Demon,"FP_ROAM_OLDWORLD_NEUESLAGER_1022");
Wld_InsertNpc (Scavenger_Demon,"FP_ROAM_OLDWORLD_NEUESLAGER_1024");
Wld_InsertNpc (Scavenger_Demon,"FP_ROAM_OLDWORLD_NEUESLAGER_1025");
Wld_InsertNpc (Gobbo_Skeleton,"FP_ROAM_OLDWORLD_NEUESLAGER_1015");
Wld_InsertNpc (Gobbo_Skeleton,"FP_ROAM_OLDWORLD_NEUESLAGER_1016");
Wld_InsertNpc (Scavenger_Demon,"FP_ROAM_OLDWORLD_NEUESLAGER_1011");
Wld_InsertNpc (Scavenger_Demon,"FP_ROAM_OLDWORLD_NEUESLAGER_1012");
//****************************
//
//****************************Plato hinterder neuen Mine
//
Wld_InsertNpc (Shadowbeast,"FP_ROAM_OLDWORLD_PLATOZURBURG_1");
//****************************
//
//****************************Bei den Waldleufern
//
Wld_InsertNpc (Harpie,"FP_ROAM_OLDWORLD_HARPIENLOCH_1");
Wld_InsertNpc (Harpie,"FP_ROAM_OLDWORLD_HARPIENLOCH_2");
Wld_InsertNpc (Harpie,"FP_ROAM_OLDWORLD_HARPIENLOCH_3");
Wld_InsertNpc (Harpie,"FP_ROAM_OLDWORLD_HARPIENLOCH_4");
Wld_InsertNpc (Harpie,"FP_ROAM_OLDWORLD_HARPIENLOCH_5");
Wld_InsertNpc (Harpie,"FP_ROAM_OLDWORLD_HARPIENLOCH_6");
Wld_InsertNpc (Harpie,"FP_ROAM_OLDWORLD_HARPIENLOCH_7");
Wld_InsertNpc (Harpie,"FP_ROAM_OLDWORLD_HARPIENLOCH_8");
Wld_InsertNpc (Molerat,"FP_ROAM_OLDWORLD_ALTERWALD_1");
Wld_InsertNpc (Molerat,"FP_ROAM_OLDWORLD_ALTERWALD_2");
Wld_InsertNpc (Molerat,"FP_ROAM_OLDWORLD_ALTERWALD_3");
Wld_InsertNpc (DemonLord,"FP_ROAM_OLDWORLD_ALTERWALD_6");
Wld_InsertNpc (Shadowbeast_Skeleton,"FP_ROAM_OLDWORLD_ALTERWALD_7");
Wld_InsertNpc (Keiler,"FP_ROAM_OLDWORLD_ALTERWALD_10");
Wld_InsertNpc (Keiler,"FP_ROAM_OLDWORLD_ALTERWALD_11");
Wld_InsertNpc (Keiler,"FP_ROAM_OLDWORLD_ALTERWALD_16");
Wld_InsertNpc (Keiler,"FP_ROAM_OLDWORLD_ALTERWALD_17");
Wld_InsertNpc (Scavenger,"FP_ROAM_OLDWORLD_ALTERWALDOBEN_1");
Wld_InsertNpc (Scavenger,"FP_ROAM_OLDWORLD_ALTERWALDOBEN_2");
Wld_InsertNpc (Scavenger,"FP_ROAM_OLDWORLD_ALTERWALDOBEN_3");
Wld_InsertNpc (Razor,"FP_ROAM_OLDWORLD_ALTERWALDOBEN_4");
Wld_InsertNpc (Gobbo_Skeleton,"FP_ROAM_OLDWORLD_ALTERWALDOBEN_5");
Wld_InsertNpc (Gobbo_Skeleton,"FP_ROAM_OLDWORLD_ALTERWALDOBEN_6");
Wld_InsertNpc (Gobbo_Skeleton,"FP_ROAM_OLDWORLD_ALTERWALDOBEN_7");
Wld_InsertNpc (Gobbo_Skeleton,"FP_ROAM_OLDWORLD_ALTERWALDOBEN_8");
Wld_InsertNpc (Gobbo_Skeleton,"FP_ROAM_OLDWORLD_ALTERWALDOBEN_9");
Wld_InsertNpc (Gobbo_Skeleton,"FP_ROAM_OLDWORLD_ALTERWALDOBEN_10");
Wld_InsertNpc (Gobbo_Skeleton,"FP_ROAM_OLDWORLD_ALTERWALDOBEN_11");
Wld_InsertNpc (Gobbo_Skeleton,"FP_ROAM_OLDWORLD_ALTERWALDOBEN_12");
OLDWOLRDThomas = TRUE;
};
};
/********************************************************************************/
/*************************Die Tore im Buchlabyrinth ****************************************/
FUNC VOID EVT_BUCHLABYRINTH_SCHALTER1 ()
{
if (BUCHLABYRINTH_SCHALTER1 == FALSE)
{
Wld_SendTrigger ("TOR1");
Snd_Play ("MYSTERY_03");
Wld_InsertNpc (ZombieRandom_Lib,"FP_ROAM_OLDWORLD_SKELETRAZOR_7");
BUCHLABYRINTH_SCHALTER1 = TRUE;
};
};
FUNC VOID EVT_BUCHLABYRINTH_SCHALTER2 ()
{
if (BUCHLABYRINTH_SCHALTER2 == FALSE)
{
Wld_SendTrigger ("TOR2");
Snd_Play ("MYSTERY_03");
Wld_InsertNpc (Spider_Lib,"FP_ROAM_OLDWORLD_SKELETRAZOR_9");
BUCHLABYRINTH_SCHALTER2 = TRUE;
};
};
FUNC VOID EVT_BUCHLABYRINTH_SCHALTER3 ()
{
if (BUCHLABYRINTH_SCHALTER3 == FALSE)
{
Wld_SendTrigger ("TOR3_1");
Wld_SendTrigger ("TOR3_2");
Wld_SendTrigger ("TOR32");
Snd_Play ("MYSTERY_03");
Wld_InsertNpc (ZombieRandom_Lib,"FP_ROAM_OLDWORLD_SKELETRAZOR_13");
BUCHLABYRINTH_SCHALTER3 = TRUE;
};
};
FUNC VOID EVT_BUCHLABYRINTH_SCHALTER4 ()
{
if (BUCHLABYRINTH_SCHALTER4 == FALSE)
{
Wld_SendTrigger ("TOR4");
Snd_Play ("MYSTERY_03");
Wld_InsertNpc (ZombieRandom_Lib,"FP_ROAM_OLDWORLD_SKELETRAZOR_14");
Wld_InsertNpc (Spider_Lib,"FP_ROAM_OLDWORLD_SKELETRAZOR_17");
BUCHLABYRINTH_SCHALTER4 = TRUE;
};
};
/********************************************************************************/
/*************************Truhen im Labyrinth ****************************************/
FUNC VOID EVT_BUCHLABYRINTH_TRUHE1_S1 ()
{
if (BUCHLABYRINTH_TRUHE1 == FALSE)
{
Snd_Play (" MYSTERY_03" );
Wld_InsertNpc (Gobbo_Skeleton,"FP_ROAM_OLDWORLD_SKELETRAZOR_18");
Wld_InsertNpc (Gobbo_Skeleton,"FP_ROAM_OLDWORLD_SKELETRAZOR_19");
Wld_InsertNpc (Gobbo_Skeleton,"FP_ROAM_OLDWORLD_SKELETRAZOR_20");
Wld_InsertNpc (Gobbo_Skeleton,"FP_ROAM_OLDWORLD_SKELETRAZOR_21");
BUCHLABYRINTH_TRUHE1 = TRUE;
};
};
FUNC VOID EVT_BUCHLABYRINTH_TRUHE2_S1 ()
{
if (BUCHLABYRINTH_TRUHE2 == FALSE)
{
Snd_Play (" MYSTERY_03" );
Wld_InsertNpc (Gobbo_Skeleton,"FP_ROAM_OLDWORLD_SKELETRAZOR_38");
Wld_InsertNpc (Gobbo_Skeleton,"FP_ROAM_OLDWORLD_SKELETRAZOR_39");
Wld_InsertNpc (Gobbo_Skeleton,"FP_ROAM_OLDWORLD_SKELETRAZOR_40");
Wld_InsertNpc (Gobbo_Skeleton,"FP_ROAM_OLDWORLD_SKELETRAZOR_41");
Wld_InsertNpc (Gobbo_Skeleton,"FP_ROAM_OLDWORLD_SKELETRAZOR_42");
Wld_InsertNpc (Gobbo_Skeleton,"FP_ROAM_OLDWORLD_SKELETRAZOR_43");
BUCHLABYRINTH_TRUHE2 = TRUE;
};
};
FUNC VOID EVT_BUCHLABYRINTH_TRUHE3_S1 ()
{
if (BUCHLABYRINTH_TRUHE3 == FALSE)
{
Snd_Play (" MYSTERY_03" );
Wld_InsertNpc (Skeleton_Lord,"FP_ROAM_OLDWORLD_SKELETRAZOR_44");
Wld_InsertNpc (Gobbo_Skeleton,"FP_ROAM_OLDWORLD_SKELETRAZOR_45");
Wld_InsertNpc (Gobbo_Skeleton,"FP_ROAM_OLDWORLD_SKELETRAZOR_46");
Wld_InsertNpc (Gobbo_Skeleton,"FP_ROAM_OLDWORLD_SKELETRAZOR_47");
BUCHLABYRINTH_TRUHE3 = TRUE;
};
};
FUNC VOID EVT_BUCHLABYRINTH_TRUHE4_S1 ()
{
if (BUCHLABYRINTH_TRUHE4 == FALSE)
{
Snd_Play ("MYSTERY_03");
Wld_InsertNpc (Skeleton_Lord,"FP_ROAM_OLDWORLD_SKELETRAZOR_48");
Wld_InsertNpc (Skeleton_Lord,"FP_ROAM_OLDWORLD_SKELETRAZOR_49");
Wld_InsertNpc (Gobbo_Skeleton,"FP_ROAM_OLDWORLD_SKELETRAZOR_50");
Wld_InsertNpc (Gobbo_Skeleton,"FP_ROAM_OLDWORLD_SKELETRAZOR_51");
BUCHLABYRINTH_TRUHE4 = TRUE;
};
};
FUNC VOID EVT_FOKUS_TROLL ()
{
if (Kapitel == 2)
{
Wld_SpawnNpcRange(hero, Gobbo_Warrior_Weg, 5, 500);
B_LogEntry (TOPIC_MOD_FOKUSSUCHE, "Nanu? Anscheinend war eine Gruppe Goblins ebenfalls hinter dem Fokusstein im Norden her. Was könnten die damit vorhaben?");
};
};
/********************************************************************************/
/*************************Tiere und neue Monster****************************************/
func void Set_SKELETRazor_Visuals()
{
Mdl_SetVisual (self, "Razor.mds");
// Body-Mesh Body-Tex Skin-Color Head-MMS Head-Tex Teeth-Tex ARMOR
Mdl_SetVisualBody (self, "RAZSKELET_BODY", DEFAULT, DEFAULT, "", DEFAULT, DEFAULT, -1);
};
INSTANCE SKELETRazor (Mst_Default_Razor)
{
name = "Dino-Skelett";
Set_SKELETRazor_Visuals();
Npc_SetToFistMode(self);
};
func void B_SetVisuals_Schattenwark()
{
Mdl_SetVisual (self,"StonePuma.mds");
// Body-Mesh Body-Tex Skin-Color Head-MMS Head-Tex Teeth-Tex ARMOR
Mdl_SetVisualBody (self, "SHAWARK_BODY", DEFAULT, DEFAULT, "", DEFAULT, DEFAULT, -1);
};
INSTANCE Schattenwark (Mst_Default_StonePuma)
{
B_SetVisuals_Schattenwark();
Npc_SetToFistMode(self);
CreateInvItems (self, ItFo_MuttonRaw, 2);
//----- Monster ----
name = "Schattenwarg";
guild = GIL_Gargoyle;
aivar[AIV_MM_REAL_ID] = ID_Gargoyle;
level = 20;
//----- Attribute ----
attribute [ATR_STRENGTH] = 400;
attribute [ATR_DEXTERITY] = 400;
attribute [ATR_HITPOINTS_MAX] = 800;
attribute [ATR_HITPOINTS] = 800;
attribute [ATR_MANA_MAX] = 0;
attribute [ATR_MANA] = 0;
//----- Protections ----
protection [PROT_BLUNT] = 100000;
protection [PROT_EDGE] = 100000;
protection [PROT_POINT] = 100000;
protection [PROT_FIRE] = 75;
protection [PROT_FLY] = 0;
protection [PROT_MAGIC] = 50;
};
INSTANCE Schattenwark_XW_01 (Mst_Default_StonePuma)
{
B_SetVisuals_Schattenwark();
Npc_SetToFistMode(self);
CreateInvItems (self, ItFo_MuttonRaw, 2);
//----- Monster ----
name = "Schattenwarg";
guild = GIL_Gargoyle;
aivar[AIV_MM_REAL_ID] = ID_Gargoyle;
level = 20;
//----- Attribute ----
attribute [ATR_STRENGTH] = 400;
attribute [ATR_DEXTERITY] = 400;
attribute [ATR_HITPOINTS_MAX] = 800;
attribute [ATR_HITPOINTS] = 800;
attribute [ATR_MANA_MAX] = 0;
attribute [ATR_MANA] = 0;
//----- Protections ----
protection [PROT_BLUNT] = 100000;
protection [PROT_EDGE] = 100000;
protection [PROT_POINT] = 100000;
protection [PROT_FIRE] = 75;
protection [PROT_FLY] = 0;
protection [PROT_MAGIC] = 50;
start_aistate = ZS_MM_Rtn_XWArena;
};
INSTANCE Schattenwark_XW_02 (Mst_Default_StonePuma)
{
B_SetVisuals_Schattenwark();
Npc_SetToFistMode(self);
CreateInvItems (self, ItFo_MuttonRaw, 2);
//----- Monster ----
name = "Schattenwarg";
guild = GIL_Gargoyle;
aivar[AIV_MM_REAL_ID] = ID_Gargoyle;
level = 20;
//----- Attribute ----
attribute [ATR_STRENGTH] = 400;
attribute [ATR_DEXTERITY] = 400;
attribute [ATR_HITPOINTS_MAX] = 800;
attribute [ATR_HITPOINTS] = 800;
attribute [ATR_MANA_MAX] = 0;
attribute [ATR_MANA] = 0;
//----- Protections ----
protection [PROT_BLUNT] = 100000;
protection [PROT_EDGE] = 100000;
protection [PROT_POINT] = 100000;
protection [PROT_FIRE] = 75;
protection [PROT_FLY] = 0;
protection [PROT_MAGIC] = 50;
start_aistate = ZS_MM_Rtn_XWArena;
};
INSTANCE Schattenwark_XW_03 (Mst_Default_StonePuma)
{
B_SetVisuals_Schattenwark();
Npc_SetToFistMode(self);
CreateInvItems (self, ItFo_MuttonRaw, 2);
//----- Monster ----
name = "Schattenwarg";
guild = GIL_Gargoyle;
aivar[AIV_MM_REAL_ID] = ID_Gargoyle;
level = 20;
//----- Attribute ----
attribute [ATR_STRENGTH] = 400;
attribute [ATR_DEXTERITY] = 400;
attribute [ATR_HITPOINTS_MAX] = 800;
attribute [ATR_HITPOINTS] = 800;
attribute [ATR_MANA_MAX] = 0;
attribute [ATR_MANA] = 0;
//----- Protections ----
protection [PROT_BLUNT] = 100000;
protection [PROT_EDGE] = 100000;
protection [PROT_POINT] = 100000;
protection [PROT_FIRE] = 75;
protection [PROT_FLY] = 0;
protection [PROT_MAGIC] = 50;
start_aistate = ZS_MM_Rtn_XWArena;
};
INSTANCE Schattenwark_XW_04 (Mst_Default_StonePuma)
{
B_SetVisuals_Schattenwark();
Npc_SetToFistMode(self);
CreateInvItems (self, ItFo_MuttonRaw, 2);
//----- Monster ----
name = "Schattenwarg";
guild = GIL_Gargoyle;
aivar[AIV_MM_REAL_ID] = ID_Gargoyle;
level = 20;
//----- Attribute ----
attribute [ATR_STRENGTH] = 400;
attribute [ATR_DEXTERITY] = 400;
attribute [ATR_HITPOINTS_MAX] = 800;
attribute [ATR_HITPOINTS] = 800;
attribute [ATR_MANA_MAX] = 0;
attribute [ATR_MANA] = 0;
//----- Protections ----
protection [PROT_BLUNT] = 100000;
protection [PROT_EDGE] = 100000;
protection [PROT_POINT] = 100000;
protection [PROT_FIRE] = 75;
protection [PROT_FLY] = 0;
protection [PROT_MAGIC] = 50;
start_aistate = ZS_MM_Rtn_XWArena;
};
INSTANCE Schattenwark_XW_05 (Mst_Default_StonePuma)
{
B_SetVisuals_Schattenwark();
Npc_SetToFistMode(self);
CreateInvItems (self, ItFo_MuttonRaw, 2);
//----- Monster ----
name = "Schattenwarg";
guild = GIL_Gargoyle;
aivar[AIV_MM_REAL_ID] = ID_Gargoyle;
level = 20;
//----- Attribute ----
attribute [ATR_STRENGTH] = 400;
attribute [ATR_DEXTERITY] = 400;
attribute [ATR_HITPOINTS_MAX] = 800;
attribute [ATR_HITPOINTS] = 800;
attribute [ATR_MANA_MAX] = 0;
attribute [ATR_MANA] = 0;
//----- Protections ----
protection [PROT_BLUNT] = 100000;
protection [PROT_EDGE] = 100000;
protection [PROT_POINT] = 100000;
protection [PROT_FIRE] = 75;
protection [PROT_FLY] = 0;
protection [PROT_MAGIC] = 50;
start_aistate = ZS_MM_Rtn_XWArena;
};
INSTANCE Schattenwark_XW_06 (Mst_Default_StonePuma)
{
B_SetVisuals_Schattenwark();
Npc_SetToFistMode(self);
CreateInvItems (self, ItFo_MuttonRaw, 2);
//----- Monster ----
name = "Schattenwarg";
guild = GIL_Gargoyle;
aivar[AIV_MM_REAL_ID] = ID_Gargoyle;
level = 20;
//----- Attribute ----
attribute [ATR_STRENGTH] = 400;
attribute [ATR_DEXTERITY] = 400;
attribute [ATR_HITPOINTS_MAX] = 800;
attribute [ATR_HITPOINTS] = 800;
attribute [ATR_MANA_MAX] = 0;
attribute [ATR_MANA] = 0;
//----- Protections ----
protection [PROT_BLUNT] = 100000;
protection [PROT_EDGE] = 100000;
protection [PROT_POINT] = 100000;
protection [PROT_FIRE] = 75;
protection [PROT_FLY] = 0;
protection [PROT_MAGIC] = 50;
start_aistate = ZS_MM_Rtn_XWArena;
};
INSTANCE Schattenwark_XW_07 (Mst_Default_StonePuma)
{
B_SetVisuals_Schattenwark();
Npc_SetToFistMode(self);
CreateInvItems (self, ItFo_MuttonRaw, 2);
//----- Monster ----
name = "Schattenwarg";
guild = GIL_Gargoyle;
aivar[AIV_MM_REAL_ID] = ID_Gargoyle;
level = 20;
//----- Attribute ----
attribute [ATR_STRENGTH] = 400;
attribute [ATR_DEXTERITY] = 400;
attribute [ATR_HITPOINTS_MAX] = 800;
attribute [ATR_HITPOINTS] = 800;
attribute [ATR_MANA_MAX] = 0;
attribute [ATR_MANA] = 0;
//----- Protections ----
protection [PROT_BLUNT] = 100000;
protection [PROT_EDGE] = 100000;
protection [PROT_POINT] = 100000;
protection [PROT_FIRE] = 75;
protection [PROT_FLY] = 0;
protection [PROT_MAGIC] = 50;
start_aistate = ZS_MM_Rtn_XWArena;
};
INSTANCE Schattenwark_XW_08 (Mst_Default_StonePuma)
{
B_SetVisuals_Schattenwark();
Npc_SetToFistMode(self);
CreateInvItems (self, ItFo_MuttonRaw, 2);
//----- Monster ----
name = "Schattenwarg";
guild = GIL_Gargoyle;
aivar[AIV_MM_REAL_ID] = ID_Gargoyle;
level = 20;
//----- Attribute ----
attribute [ATR_STRENGTH] = 400;
attribute [ATR_DEXTERITY] = 400;
attribute [ATR_HITPOINTS_MAX] = 800;
attribute [ATR_HITPOINTS] = 800;
attribute [ATR_MANA_MAX] = 0;
attribute [ATR_MANA] = 0;
//----- Protections ----
protection [PROT_BLUNT] = 100000;
protection [PROT_EDGE] = 100000;
protection [PROT_POINT] = 100000;
protection [PROT_FIRE] = 75;
protection [PROT_FLY] = 0;
protection [PROT_MAGIC] = 50;
start_aistate = ZS_MM_Rtn_XWArena;
};
INSTANCE Schattenwark_XW_09 (Mst_Default_StonePuma)
{
B_SetVisuals_Schattenwark();
Npc_SetToFistMode(self);
CreateInvItems (self, ItFo_MuttonRaw, 2);
//----- Monster ----
name = "Schattenwarg";
guild = GIL_Gargoyle;
aivar[AIV_MM_REAL_ID] = ID_Gargoyle;
level = 20;
//----- Attribute ----
attribute [ATR_STRENGTH] = 400;
attribute [ATR_DEXTERITY] = 400;
attribute [ATR_HITPOINTS_MAX] = 800;
attribute [ATR_HITPOINTS] = 800;
attribute [ATR_MANA_MAX] = 0;
attribute [ATR_MANA] = 0;
//----- Protections ----
protection [PROT_BLUNT] = 100000;
protection [PROT_EDGE] = 100000;
protection [PROT_POINT] = 100000;
protection [PROT_FIRE] = 75;
protection [PROT_FLY] = 0;
protection [PROT_MAGIC] = 50;
start_aistate = ZS_MM_Rtn_XWArena;
};
INSTANCE Schattenwark_XW_10 (Mst_Default_StonePuma)
{
B_SetVisuals_Schattenwark();
Npc_SetToFistMode(self);
CreateInvItems (self, ItFo_MuttonRaw, 2);
//----- Monster ----
name = "Schattenwarg";
guild = GIL_Gargoyle;
aivar[AIV_MM_REAL_ID] = ID_Gargoyle;
level = 20;
//----- Attribute ----
attribute [ATR_STRENGTH] = 400;
attribute [ATR_DEXTERITY] = 400;
attribute [ATR_HITPOINTS_MAX] = 800;
attribute [ATR_HITPOINTS] = 800;
attribute [ATR_MANA_MAX] = 0;
attribute [ATR_MANA] = 0;
//----- Protections ----
protection [PROT_BLUNT] = 100000;
protection [PROT_EDGE] = 100000;
protection [PROT_POINT] = 100000;
protection [PROT_FIRE] = 75;
protection [PROT_FLY] = 0;
protection [PROT_MAGIC] = 50;
start_aistate = ZS_MM_Rtn_XWArena;
};
INSTANCE Schattenwark_XW_11 (Mst_Default_StonePuma)
{
B_SetVisuals_Schattenwark();
Npc_SetToFistMode(self);
CreateInvItems (self, ItFo_MuttonRaw, 2);
//----- Monster ----
name = "Schattenwarg";
guild = GIL_Gargoyle;
aivar[AIV_MM_REAL_ID] = ID_Gargoyle;
level = 20;
//----- Attribute ----
attribute [ATR_STRENGTH] = 400;
attribute [ATR_DEXTERITY] = 400;
attribute [ATR_HITPOINTS_MAX] = 800;
attribute [ATR_HITPOINTS] = 800;
attribute [ATR_MANA_MAX] = 0;
attribute [ATR_MANA] = 0;
//----- Protections ----
protection [PROT_BLUNT] = 100000;
protection [PROT_EDGE] = 100000;
protection [PROT_POINT] = 100000;
protection [PROT_FIRE] = 75;
protection [PROT_FLY] = 0;
protection [PROT_MAGIC] = 50;
start_aistate = ZS_MM_Rtn_XWArena;
};
INSTANCE Schattenwark_XW_12 (Mst_Default_StonePuma)
{
B_SetVisuals_Schattenwark();
Npc_SetToFistMode(self);
CreateInvItems (self, ItFo_MuttonRaw, 2);
//----- Monster ----
name = "Schattenwarg";
guild = GIL_Gargoyle;
aivar[AIV_MM_REAL_ID] = ID_Gargoyle;
level = 20;
//----- Attribute ----
attribute [ATR_STRENGTH] = 400;
attribute [ATR_DEXTERITY] = 400;
attribute [ATR_HITPOINTS_MAX] = 800;
attribute [ATR_HITPOINTS] = 800;
attribute [ATR_MANA_MAX] = 0;
attribute [ATR_MANA] = 0;
//----- Protections ----
protection [PROT_BLUNT] = 100000;
protection [PROT_EDGE] = 100000;
protection [PROT_POINT] = 100000;
protection [PROT_FIRE] = 75;
protection [PROT_FLY] = 0;
protection [PROT_MAGIC] = 50;
start_aistate = ZS_MM_Rtn_XWArena;
};
//***********
// Hauertroll
//***********
func void B_SetVisuals_Hauertroll()
{
Mdl_SetVisual (self, "Troll.mds");
// Body-Mesh Body-Tex Skin-Color Head-MMS Head-Tex Teeth-Tex ARMOR
Mdl_SetVisualBody (self, "Hauertroll_body", DEFAULT, DEFAULT, "", DEFAULT, DEFAULT, -1);
};
//***********
// Troll
//***********
INSTANCE Hauertroll (Mst_Default_Troll)
{
name = "Hauertroll";
guild = GIL_TROLL;
aivar[AIV_MM_REAL_ID] = ID_TROLL;
level = 50; //30
//----- Attribute ----
attribute [ATR_STRENGTH] = 350; //FlyDamage
attribute [ATR_DEXTERITY] = 300;
attribute [ATR_HITPOINTS_MAX] = 1000;
attribute [ATR_HITPOINTS] = 1000;
attribute [ATR_MANA_MAX] = 0;
attribute [ATR_MANA] = 0;
//----- Protections ----
protection [PROT_BLUNT] = 180000;
protection [PROT_EDGE] = 180000;
protection [PROT_POINT] = IMMUNE;
protection [PROT_FIRE] = 125;
protection [PROT_FLY] = IMMUNE;
protection [PROT_MAGIC] = 125;
Mdl_SetModelScale(self, 1.1, 1.1, 1.1);
B_SetVisuals_Hauertroll();
Npc_SetToFistMode(self);
};
INSTANCE Hauertroll_XW_01 (Mst_Default_Troll)
{
name = "Hauertroll";
guild = GIL_TROLL;
aivar[AIV_MM_REAL_ID] = ID_TROLL;
level = 50; //30
flags = 2;
//----- Attribute ----
attribute [ATR_STRENGTH] = 350; //FlyDamage
attribute [ATR_DEXTERITY] = 300;
attribute [ATR_HITPOINTS_MAX] = 1000;
attribute [ATR_HITPOINTS] = 1000;
attribute [ATR_MANA_MAX] = 0;
attribute [ATR_MANA] = 0;
//----- Protections ----
protection [PROT_BLUNT] = 180000;
protection [PROT_EDGE] = 180000;
protection [PROT_POINT] = IMMUNE;
protection [PROT_FIRE] = 125;
protection [PROT_FLY] = IMMUNE;
protection [PROT_MAGIC] = 125;
Mdl_SetModelScale(self, 1.1, 1.1, 1.1);
B_SetVisuals_Hauertroll();
Npc_SetToFistMode(self);
};
INSTANCE Hauertroll_XW_02 (Mst_Default_Troll)
{
name = "Hauertroll";
guild = GIL_TROLL;
aivar[AIV_MM_REAL_ID] = ID_TROLL;
level = 50; //30
//----- Attribute ----
attribute [ATR_STRENGTH] = 350; //FlyDamage
attribute [ATR_DEXTERITY] = 300;
attribute [ATR_HITPOINTS_MAX] = 1000;
attribute [ATR_HITPOINTS] = 1000;
attribute [ATR_MANA_MAX] = 0;
attribute [ATR_MANA] = 0;
//----- Protections ----
protection [PROT_BLUNT] = 180000;
protection [PROT_EDGE] = 180000;
protection [PROT_POINT] = IMMUNE;
protection [PROT_FIRE] = 125;
protection [PROT_FLY] = IMMUNE;
protection [PROT_MAGIC] = 125;
Mdl_SetModelScale(self, 1.1, 1.1, 1.1);
B_SetVisuals_Hauertroll();
Npc_SetToFistMode(self);
start_aistate = ZS_MM_Rtn_XWArena;
};
INSTANCE Hauertroll_XW_03 (Mst_Default_Troll)
{
name = "Hauertroll";
guild = GIL_TROLL;
aivar[AIV_MM_REAL_ID] = ID_TROLL;
level = 50; //30
//----- Attribute ----
attribute [ATR_STRENGTH] = 350; //FlyDamage
attribute [ATR_DEXTERITY] = 300;
attribute [ATR_HITPOINTS_MAX] = 1000;
attribute [ATR_HITPOINTS] = 1000;
attribute [ATR_MANA_MAX] = 0;
attribute [ATR_MANA] = 0;
//----- Protections ----
protection [PROT_BLUNT] = 180000;
protection [PROT_EDGE] = 180000;
protection [PROT_POINT] = IMMUNE;
protection [PROT_FIRE] = 125;
protection [PROT_FLY] = IMMUNE;
protection [PROT_MAGIC] = 125;
Mdl_SetModelScale(self, 1.1, 1.1, 1.1);
B_SetVisuals_Hauertroll();
Npc_SetToFistMode(self);
start_aistate = ZS_MM_Rtn_XWArena;
};
INSTANCE Hauertroll_XW_04 (Mst_Default_Troll)
{
name = "Hauertroll";
guild = GIL_TROLL;
aivar[AIV_MM_REAL_ID] = ID_TROLL;
level = 50; //30
//----- Attribute ----
attribute [ATR_STRENGTH] = 350; //FlyDamage
attribute [ATR_DEXTERITY] = 300;
attribute [ATR_HITPOINTS_MAX] = 1000;
attribute [ATR_HITPOINTS] = 1000;
attribute [ATR_MANA_MAX] = 0;
attribute [ATR_MANA] = 0;
//----- Protections ----
protection [PROT_BLUNT] = 180000;
protection [PROT_EDGE] = 180000;
protection [PROT_POINT] = IMMUNE;
protection [PROT_FIRE] = 125;
protection [PROT_FLY] = IMMUNE;
protection [PROT_MAGIC] = 125;
Mdl_SetModelScale(self, 1.1, 1.1, 1.1);
B_SetVisuals_Hauertroll();
Npc_SetToFistMode(self);
start_aistate = ZS_MM_Rtn_XWArena;
}; | D |
module ScriptDebugger;
public import iscriptsystem;
import game;
extern (C++):
class CScriptDebugSink : IScriptDebugSink
{
IScriptSystem m_pScriptSystem;
this(IScriptSystem pScriptSystem)
{
m_pScriptSystem = pScriptSystem;
CryLogAlways("Debug Script Sink Constructed");
}
void OnLoadSource(const char* sSourceName, char* sSource, long nSourceSize)
{
game.GetISystem().GetILog().LogWarning("Debug Script Sink OnLoadSource");
}
void OnExecuteLine(ref ScriptDebugInfo sdiDebugInfo)
{
game.GetISystem().GetILog().LogWarning("Debug Script Sink OnExecuteLine");
}
}
| 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_14_BeT-7581137578.notation#_copSALmGEeKQQp7P9cQvNQ"/>
</availablePage>
</pageList>
<sashModel currentSelection="//@sashModel/@windows.0/@children.0">
<windows>
<children xsi:type="di:TabFolder">
<children>
<emfPageIdentifier href="VAR_14_BeT-7581137578.notation#_copSALmGEeKQQp7P9cQvNQ"/>
</children>
</children>
</windows>
</sashModel>
</di:SashWindowsMngr>
| D |
/*
* Hunt - A high-level D Programming Language Web framework that encourages rapid development and clean, pragmatic design.
*
* Copyright (C) 2015-2019, HuntLabs
*
* Website: https://www.huntlabs.net/
*
* Licensed under the Apache-2.0 License.
*
*/
module hunt.framework.websocket.StandardWebSocketSession;
// import java.util.Map;
// import javax.websocket.CloseReason;
// import javax.websocket.CloseReason.CloseCodes;
// import javax.websocket.Extension;
// import javax.websocket.Session;
// import hunt.framework.util.CollectionUtils;
// import hunt.framework.websocket.BinaryMessage;
// import hunt.framework.websocket.PingMessage;
// import hunt.framework.websocket.PongMessage;
// import hunt.framework.websocket.TextMessage;
// import hunt.framework.websocket.WebSocketExtension;
import hunt.framework.websocket.WebSocketSession;
import hunt.framework.websocket.AbstractWebSocketSession;
import hunt.collection;
import hunt.http.codec.http.model.HttpFields;
import hunt.http.codec.http.model.HttpURI;
import hunt.http.codec.websocket.model.CloseStatus;
import hunt.http.codec.websocket.stream.WebSocketConnection;
import hunt.Exceptions;
import hunt.logging;
import hunt.security.Principal;
import std.socket;
alias HttpHeaders = HttpFields;
/**
* A {@link WebSocketSession} for use with the standard WebSocket for Java API.
*
* @author Rossen Stoyanchev
* @since 4.0
*/
class StandardWebSocketSession : AbstractWebSocketSession!(WebSocketConnection) {
private string id;
private HttpURI uri;
private HttpHeaders handshakeHeaders;
private string acceptedProtocol;
// private List!(WebSocketExtension) extensions;
private Principal user;
private Address localAddress;
private Address remoteAddress;
/**
* Constructor for a standard WebSocket session.
* @param headers the headers of the handshake request
* @param attributes attributes from the HTTP handshake to associate with the WebSocket
* session; the provided attributes are copied, the original map is not used.
* @param localAddress the address on which the request was received
* @param remoteAddress the address of the remote client
*/
this(HttpHeaders headers, Map!(string, Object) attributes,
Address localAddress, Address remoteAddress) {
this(headers, attributes, localAddress, remoteAddress, null);
}
/**
* Constructor that associates a user with the WebSocket session.
* @param headers the headers of the handshake request
* @param attributes attributes from the HTTP handshake to associate with the WebSocket session
* @param localAddress the address on which the request was received
* @param remoteAddress the address of the remote client
* @param user the user associated with the session; if {@code null} we'll
* fallback on the user available in the underlying WebSocket session
*/
this(HttpHeaders headers, Map!(string, Object) attributes,
Address localAddress, Address remoteAddress, Principal user) {
super(attributes);
this.id = idGenerator.generateId().toString();
headers = (headers !is null ? headers : new HttpHeaders());
this.handshakeHeaders = headers;
this.user = user;
this.localAddress = localAddress;
this.remoteAddress = remoteAddress;
}
// override
string getId() {
return this.id;
}
// override
HttpURI getUri() {
checkNativeSessionInitialized();
return this.uri;
}
// override
HttpHeaders getHandshakeHeaders() {
return this.handshakeHeaders;
}
// override
string getAcceptedProtocol() {
checkNativeSessionInitialized();
return this.acceptedProtocol;
}
// override
// List!(WebSocketExtension) getExtensions() {
// assert(this.extensions !is null, "WebSocket session is not yet initialized");
// return this.extensions;
// }
Principal getPrincipal() {
return this.user;
}
// override
Address getLocalAddress() {
return this.localAddress;
}
// override
Address getRemoteAddress() {
return this.remoteAddress;
}
// override
void setTextMessageSizeLimit(int messageSizeLimit) {
checkNativeSessionInitialized();
// getNativeSession().setMaxTextMessageBufferSize(messageSizeLimit);
implementationMissing(false);
}
// override
int getTextMessageSizeLimit() {
checkNativeSessionInitialized();
// return getNativeSession().getMaxTextMessageBufferSize();
implementationMissing(false);
return 0;
}
// override
void setBinaryMessageSizeLimit(int messageSizeLimit) {
checkNativeSessionInitialized();
// getNativeSession().setMaxBinaryMessageBufferSize(messageSizeLimit);
implementationMissing(false);
}
// override
int getBinaryMessageSizeLimit() {
checkNativeSessionInitialized();
// return getNativeSession().getMaxBinaryMessageBufferSize();
implementationMissing(false);
return 0;
}
// override
bool isOpen() {
return getNativeSession().isOpen();
}
override
void initializeNativeSession(WebSocketConnection session) {
super.initializeNativeSession(session);
this.uri = session.getUpgradeRequest().getURI();
// TODO: Tasks pending completion -@zxp at 11/4/2018, 10:15:44 AM
//
// this.acceptedProtocol = session.getNegotiatedSubprotocol();
this.acceptedProtocol = "";
// List!(Extension) standardExtensions = getNativeSession().getNegotiatedExtensions();
// if (!CollectionUtils.isEmpty(standardExtensions)) {
// this.extensions = new ArrayList<>(standardExtensions.size());
// for (Extension standardExtension : standardExtensions) {
// this.extensions.add(new StandardToWebSocketExtensionAdapter(standardExtension));
// }
// this.extensions = Collections.unmodifiableList(this.extensions);
// }
// else {
// this.extensions = Collections.emptyList();
// }
// if (this.user is null) {
// this.user = session.getUserPrincipal();
// }
}
override
void sendTextMessage(string message) {
// getNativeSession().getBasicRemote().sendText(message.getPayload(), message.isLast());
getNativeSession().sendText(message);
}
override
void sendBinaryMessage(byte[] message) {
// getNativeSession().getBasicRemote().sendBinary(message.getPayload(), message.isLast());
getNativeSession().sendData(message);
}
// override
// protected void sendPingMessage(PingMessage message) {
// getNativeSession().getBasicRemote().sendPing(message.getPayload());
// }
// override
// protected void sendPongMessage(PongMessage message) {
// getNativeSession().getBasicRemote().sendPong(message.getPayload());
// }
override
protected void closeInternal(CloseStatus status) {
getNativeSession().close();
// getNativeSession().close(new CloseReason(CloseCodes.getCloseCode(status.getCode()), status.getReason()));
}
}
| D |
module slimRnn.SlimRnnLevinSearch;
import std.stdint;
import memoryLowlevel.StackAllocator;
import slimRnn.SlimRnn;
import search.levin.LevinSearch;
import slimRnn.SlimRnnStackBasedManipulationInstruction;
static import slimRnn.programEncoding.Vliw2; // stack based "very large instruction word"-style instructions on which levin search can operate
import slimRnn.SlimRnnStackBasedInterpreter;
/*
struct StackBasedInstructionInterpretationContext {
int pieceIndex;
uint[] stack;
final void reset() {
pieceIndex = -1;
stack.length = 0;
}
}
*/
struct Stack6BitInstructionEncodingStack1 {
/+ uncommented because its outdate, but the encoding is still useful in the future
static void decodeAndExecute(ref InstructionInterpretationContext context, SlimRnn slimRnn, uint instruction, out bool unknownEncoding, out bool executionSuccess) {
Instruction instructionDecoded = decode(instruction, /*out*/unknownEncoding);
interpret(context, slimRnn, instructionDecoded, /*out*/executionSuccess);
}
/*
this instruction set works with 5 bits for the neuron id's and other values
it operates on a context with an stack and the current pieceIndex
- push working value (1xxxxx)
- set neuron index to #top, [optionally] activate neuron #top, set type of neuron to either CA or XOR(0-10-aa-t)
- aa : 10 : disable neuron
- aa : 11 : enable neuron
- aa : 00 : don't touch
- aa : 01 : NOT USED ENCODING
- t : 0 : set type to CA
- t : 1 : set type to XOR
- set neuron index to #top, [optionally] activate neuron #top, set type of neuron to either CLASSICAL or CA(0-11-aa-t)
- aa : 10 : disable neuron
- aa : 11 : enable neuron
- aa : 00 : don't touch
- aa : 01 : NOT USED ENCODING
- t : 0 : set type to CLASSIC
- t : 1 : set type to <NOT USED ENCODING, do not use this >
- set threshold of input index 'a' to #top (0-00-00-a)
- set threshold of input index 'aa' to #top (0-00-1-aa)
- set output strength to #top (0-01-100)
# ## ###
*/
// decodes an instruction to a "Instruction" structure
static private Instruction decode(uint instruction, out bool unknownEncoding) {
unknownEncoding = true;
if( ((instruction >> 5) & 1) == 1 ) {
uint valueToPush = instruction & 0x1f;
unknownEncoding = false;
return Instruction.makePush(valueToPush);
}
else {
uint followingEncoding = (instruction >> 3) & 3;
if( followingEncoding == 2 ) { // set neuron index to #top, [optionally] activate neuron #top, set type of neuron to either CA or XOR
bool activateFlagActive = (instruction & (1 << 2)) != 0;
bool activateFlag = (instruction & (1 << 1)) != 0;
if( !activateFlagActive & activateFlag ) {
return Instruction.init;
}
bool typeFlag = (instruction & 1) != 0;
if( typeFlag == true ) {
// not valid encoding because its not used
return Instruction.init;
}
Piece.EnumType setNeuronTypeToType = typeFlag ? Piece.EnumType.CLASSICNEURON : Piece.EnumType.CLASSICNEURON;
unknownEncoding = false;
return Instruction.makeSetNeuronIndexToTopActivateNeuronSetTypeOfNeuron(activateFlagActive, activateFlag, setNeuronTypeToType);
}
else if( followingEncoding == 3 ) {
bool activateFlagActive = (instruction & (1 << 2)) != 0;
bool activateFlag = (instruction & (1 << 1)) != 0;
if( !activateFlagActive & activateFlag ) {
return Instruction.init;
}
bool typeFlag = (instruction & 1) != 0;
Piece.EnumType setNeuronTypeToType = typeFlag ? Piece.EnumType.CA : Piece.EnumType.XOR;
unknownEncoding = false;
return Instruction.makeSetNeuronIndexToTopActivateNeuronSetTypeOfNeuron(activateFlagActive, activateFlag, setNeuronTypeToType);
}
else if( followingEncoding == 0 ) {
bool followingEncoding = (instruction & (1 << 2)) != 0;
if( followingEncoding ) {
// the size of the input index is two bits
uint inputIndex = instruction & 3;
unknownEncoding = false;
return Instruction.makeSetInputThreshold(inputIndex);
}
else {
// TODO< there is an unused encoding possibility here >
// the size of the input index is one bit
uint inputIndex = instruction & 1;
unknownEncoding = false;
return Instruction.makeSetInputThreshold(inputIndex);
}
}
else {
if( instruction == 0xC ) {
unknownEncoding = false;
return Instruction.makeSetOutputStrengthToTop();
}
// else we are here
// not used/valid encoding
return Instruction.init;
}
}
}
static private void interpret(ref InstructionInterpretationContext context, SlimRnn slimRnn, Instruction instruction, out bool executionSuccess) {
executionSuccess = false;
if( instruction.type == Instruction.EnumType.PUSHVALUE ) {
context.stack.push(instruction.value);
executionSuccess = true;
}
else if( instruction.type == Instruction.EnumType.SETNEURONINDEXTOTOPACTIVATENEURONSETTYPEOFNEURON ) {
if( context.stack.isEmpty ) { // not valid to execute this instruction with an empty stack
return;
}
// set the pieceIndex
context.pieceIndex = context.stack.top();
// enable
if( instruction.activateFlagActive ) {
slimRnn.pieces[context.pieceIndex].enabled = instruction.activateFlag;
}
// set type
slimRnn.pieces[context.pieceIndex].type = instruction.setNeuronTypeToType;
executionSuccess = true;
}
else if( instruction.type == Instruction.EnumType.SETINPUTTHRESHOLD ) {
if( context.pieceIndex == -1 ) { // can't execute this instruction of the pieceIndex is not set
return;
}
if( context.stack.isEmpty ) { // can't execute this instruction on an empty stack
return;
}
if( slimRnn.pieces[context.pieceIndex].inputs.length >= instruction.inputIndex ) { // can't execute of input index doesn't match up
return;
}
slimRnn.pieces[context.pieceIndex].inputs[instruction.inputIndex].value = (1.0f/cast(float)(1 << 5)) * cast(float)context.stack.top;
executionSuccess = true;
}
}+/
}
/+
uncommented because encoding can still be useful in the future
struct InstructionEncoding {
// 8 bits
// 0 - set new inputIndex (2) and (conditionally, if 1111 then it's disabled) set CA rule index (5), dependent on [pieceIndex]
// 10 - set piece index (6)
///// 1100 - set CA rule index (4), dependent on [pieceIndex] and [inputIndex]
// 11010 - set CA readoff index (3), dependent on [pieceIndex]
// 1101100x - set enabled of piece to 'x' , dependent on [pieceIndex]
static void executeInstructionOnSlimRnn(ref InstructionInterpretationContext context, SlimRnn slimRnn, uint instruction, out bool unknownEncoding) {
unknownEncoding = true;
uint encoding[2];
encoding[0] = instruction & 1;
if( encoding[0] == 0 ) {
unknownEncoding = false;
context.inputIndex = (instruction >> 1) & 3;
uint caRuleIndex = (instruction >> 3) & 0x1f;
if( caRuleIndex != 0x1f-1 ) { // check if not disabled
slimRnn.pieces[context.pieceIndex].ca.rule = caRuleIndex;
}
}
else if( encoding[0] == 1 ) {
encoding[1] = (instruction >> 1) & 1;
if( encoding[1] == 0 ) {
unknownEncoding = false;
context.pieceIndex = (instruction >> 2) & 0x3f;
}
else {
uint prefix1 = (instruction >> 2) & 7;
if( prefix1 == 2 ) {
unknownEncoding = false;
slimRnn.pieces[context.pieceIndex].ca.readofIndex = (instruction >> (8-3)) & 7;
}
else if( prefix1 == 3 ) {
unknownEncoding = false;
slimRnn.pieces[context.pieceIndex].enabled = ((instruction >> 7) & 1) != 0;
}
}
}
}
static void debugInstructionToConsole(uint instruction) {
import std.stdio : writeln;
import std.format : format;
bool unknownEncoding;
uint encoding[2];
encoding[0] = instruction & 1;
if( encoding[0] == 0 ) {
unknownEncoding = false;
string caRuleIndexString = "<disabled>";
uint inputIndex = (instruction >> 1) & 3;
uint caRuleIndex = (instruction >> 3) & 0x1f;
if( caRuleIndex != 0x1f-1 ) { // check if not disabled
caRuleIndexString = "%s".format(caRuleIndex);
}
writeln("instruction - set inputIndex and (conditionally) set CA rule index : inputIndex=%s, caRuleIndex=%s".format(inputIndex, caRuleIndexString));
}
else if( encoding[0] == 1 ) {
unknownEncoding = false;
encoding[1] = (instruction >> 1) & 1;
if( encoding[1] == 0 ) {
uint pieceIndex = (instruction >> 2) & 0x3f;
writeln("instruction - set piece index : pieceIndex=%s".format(pieceIndex));
}
else {
uint prefix1 = (instruction >> 2) & 7;
if( prefix1 == 2 ) {
unknownEncoding = false;
uint readofIndex = (instruction >> (8-3)) & 7;
writeln("instruction - set CA readoff index : readoffIndex=%s".format(readofIndex));
}
else if( prefix1 == 3 ) {
unknownEncoding = false;
bool enabled = ((instruction >> 7) & 1) != 0;
writeln("instruction - enable piece : enabled=%s".format(enabled));
}
}
}
if( unknownEncoding ) {
writeln("instruction - <unknown encoding>");
}
}
}
+/
// we do search for configurations of some parameters of the SLIM RNN via levin search
// as described in schmidhurs SLIM RNN paper
final class SlimRnnLevinProblem : LevinProblem {
static struct TestSetElement {
bool input[2];
bool expectedResult;
static TestSetElement make(bool input[2], bool expectedResult) {
TestSetElement result;
result.input = input;
result.expectedResult = expectedResult;
return result;
}
}
TestSetElement[] testset;
final this(SlimRnn slimRnn) {
this.slimRnn = slimRnn;
workingSlimRnn = slimRnn.cloneUnderCowAsRoot();
}
private SlimRnn slimRnn, workingSlimRnn;
private SlimRnnStackBasedInterpretationContext slimRnnStackBasedInterpretationContext;
final override void executeProgram(LevinProgram program, uint maxNumberOfStepsToExecute, out bool hasHalted) {
hasHalted = false;
// "fast" copy, we don't allocate the class, we don't allocate all arrays
workingSlimRnn.flushOpaquePieces();
uint[] levinProgram = program.instructions;
// (1) decode levin program instructions to SlimRnn instructions
// (2) execute/interpret instructions on SLIM-RNN
if(true){
bool invalidEncoding;
StackAllocator!(8, SlimRnnStackBasedManipulationInstruction) stackBasedInstructionsStack;
translateLevinProgramInstructionsToStackBasedInstructions(levinProgram, stackBasedInstructionsStack, /*out*/ invalidEncoding);
// overwrite stack based instruction with our program which solves the problem
if( invalidEncoding ) {
return; // we immediatly return because the encoding is invalid, this is not an hard error
}
bool interpretationSuccess;
SlimRnnStackBasedInterpreter.interpret(slimRnnStackBasedInterpretationContext, stackBasedInstructionsStack, workingSlimRnn, /*out*/ interpretationSuccess);
if( !interpretationSuccess ) {
return; // it is an hard error if we can't interpret the instructions
}
}
// debugging : print levin program, instructions and resulting SLIM-RNN
if(false) {
import std.stdio;
writeln("levinProgram=", levinProgram);
// debug instructions
writeln("instructions:");
bool invalidEncoding;
StackAllocator!(8, SlimRnnStackBasedManipulationInstruction) stackBasedInstructionsStack;
translateLevinProgramInstructionsToStackBasedInstructions(levinProgram, stackBasedInstructionsStack, /*out*/ invalidEncoding);
if( invalidEncoding ) {
writeln("<invalid encoding>");
}
else {
foreach(i;0..stackBasedInstructionsStack.length) {
SlimRnnStackBasedManipulationInstruction iterationInstruction = stackBasedInstructionsStack.getAtIndex(i);
writeln(iterationInstruction.humanReadableDescription());
}
}
writeln("=> SLIM-RNN:");
writeln(workingSlimRnn.humanReadableDescriptionOfPieces());
}
/*
{
workingSlimRnn.pieces[0].type = Piece.EnumType.XOR;
workingSlimRnn.pieces[0].inputs =
[
CoordinateWithValue.make(CoordinateType.make(0), 0.5f),
CoordinateWithValue.make(CoordinateType.make(1), 0.5f)
];
workingSlimRnn.pieces[0].output = CoordinateWithValue.make(CoordinateType.make(2), 0.5f);
workingSlimRnn.pieces[0].enabled = true;
}
*/
// (3) prepare SLIM-RNN
bool isValidNetwork;
workingSlimRnn.compile(/*out*/ isValidNetwork);
if( !isValidNetwork ) { // check for compilation error because of an invalid network structure
return;
}
// (4) execute SLIM-RNN
// we check the network for the testset
foreach( testsetElement; testset ) {
// called before returning in case of failiure
void innerFnReportFailure() {
return;
import std.stdio;
writeln("DEBUG innerFnReportFailure()");
throw new Exception("X");
}
uint maxIterations = maxNumberOfStepsToExecute;
uint iterations;
bool wasTerminated, executionError;
// init start state
workingSlimRnn.resetMap();
workingSlimRnn.map.arr[0] = testsetElement.input[0] ? 1.0f : 0.0f;
workingSlimRnn.map.arr[1] = testsetElement.input[1] ? 1.0f : 0.0f;
workingSlimRnn.run(maxIterations, /*out*/iterations, /*out*/wasTerminated, /*out*/executionError);
if( executionError ) {
// is an hard error if an execution error happend
innerFnReportFailure();
return;
}
if( !wasTerminated ) {
// if the SLIM-RNN didn't terminate we just have to continue the search
innerFnReportFailure();
return;
}
// DEBUG
///import std.stdio;
///writeln("DEBUG executeProgram() networkResult=", workingSlimRnn.map.arr[2]);
// read out result
bool networkResult = workingSlimRnn.outputValues[0] > 0.5f;
if( networkResult != testsetElement.expectedResult ) {
// result is wrong
innerFnReportFailure();
return; // continue the search
}
}
// if we are here the network does what is requested
// debug found program
import std.stdio;
bool invalidEncoding;
StackAllocator!(8, SlimRnnStackBasedManipulationInstruction) stackBasedInstructionsStack;
translateLevinProgramInstructionsToStackBasedInstructions(levinProgram, stackBasedInstructionsStack, /*out*/ invalidEncoding);
writeln("levin program=", levinProgram, ", translated to VLIW1 instruction-set:");
foreach( instructionIndex; 0..stackBasedInstructionsStack.length ) {
auto iterationInstruction = stackBasedInstructionsStack.getAtIndex(instructionIndex);
writeln("\t" ~ iterationInstruction.humanReadableDescription());
}
hasHalted = true;
}
}
// some rules are not used because we don't have enough space for them
static const uint[] CARULES = [
254, // implements the OR function
204, // identity
// the usual extremly useful rules
30, 62, 90, 102, 110, 126, 150, 158,
//2, not used because it can be used for memory, but the implementation will use stateless CA's
//4, the same as above
//6, the same as above
//9, the same as above
//20, the same as above
//24, the same as above
//14, redundant
//47, redundant
18, 22, 25, 26, 28, 37, 41,
45,
57, 61, 86, 89, 107, 121,
// followed by the more chaotic ones
60, // see animation http://mathworld.wolfram.com/Rule60.html
90, // see animation http://mathworld.wolfram.com/Rule90.html
102, // see animation http://mathworld.wolfram.com/Rule102.html
150, // see animation http://mathworld.wolfram.com/Rule150.html
]; // rules for the celular automata
static const uint TRESHOLDQUANTISATION = 8;
static const uint BITSFORCARULES = 5;
// we add CASTART because the table has the Piece/Neuron rules followed by the CA rules
static assert((1 << BITSFORCARULES) + Piece.EnumType._CASTART >= CARULES.length);
uint max(uint[] values) {
uint maxValue = values[0];
foreach(v; values) {
if( v > maxValue ) {
maxValue = v;
}
}
return maxValue;
}
void main() {
LevinSearch levinSearch = new LevinSearch();
import core.time;
uint reportingTriedProgramCounter = 0; // used to measure how many programs get tried per second
uint reportingNoTimecheckSinceTriedPrograms = 0;
uint reportingNumberOfTriedPrograms = 0;
MonoTime timeOfLastReport = MonoTime.currTime;
levinSearch.reportProgramExecution = (LevinProgram currentProgram) {
import std.stdio : writeln;
reportingTriedProgramCounter++;
reportingNoTimecheckSinceTriedPrograms++;
reportingNumberOfTriedPrograms++;
if( reportingNoTimecheckSinceTriedPrograms >= 10000 ) {
import std.conv : to;
TickDuration durationSinceLastReport = (MonoTime.currTime - timeOfLastReport).to!TickDuration; // TickDuration is deprecated but we don't care
if( durationSinceLastReport.msecs >= 5000 ) {
double programsTriedPerSec = cast(double)reportingTriedProgramCounter / (cast(double)durationSinceLastReport.usecs / 1000000.0);
writeln("[debug]main : programs/sec = ", programsTriedPerSec, " tried since last report ", reportingTriedProgramCounter, " programs, ##=", reportingNumberOfTriedPrograms);
reportingTriedProgramCounter = 0;
timeOfLastReport = MonoTime.currTime;
}
reportingNoTimecheckSinceTriedPrograms = 0;
}
// report program
/// uncommented because it results in too much output
///bool invalidEncoding;
///SlimRnnStackBasedManipulationInstruction[] stackBasedInstructions = translateLevinProgramInstructionsToStackBasedInstructions(currentProgram.instructions, /*out*/ invalidEncoding);
///writeln("levin program=", currentProgram.instructions, ", translated to VLIW1 instruction-set:");
///foreach( SlimRnnStackBasedManipulationInstruction iterationInstruction; stackBasedInstructions ) {
/// writeln("\t" ~ iterationInstruction.humanReadableDescription());
///}
};
// not correct number just for testing
levinSearch.numberOfInstructions = 1 << 12; // 12 bit because we use LVIW1 levin-instruction encoding
levinSearch.c = 0.1;
levinSearch.maxIterations = 50; // not a lot because the function is simple
uint programLength = 2;//DEBUG 2; // equivalent to 24 bit, is enougth to find the program to acomplish the XOR problem
levinSearch.instructionPropabilityMatrix.length = programLength;
foreach( ref iterationArray; levinSearch.instructionPropabilityMatrix ) {
iterationArray.length = levinSearch.numberOfInstructions;
}
// set initial propaility matrix
foreach( ref iterationArray; levinSearch.instructionPropabilityMatrix ) {
foreach( i; 0..iterationArray.length ) {
iterationArray[i] = 1.0f;
}
}
uint numberOfPieces = 1 << 5;
SlimRnnCtorParameters ctorParameters;
ctorParameters.mapSize[0] = 10;
ctorParameters.numberOfPieces = numberOfPieces;
ctorParameters.numberOfOutputs = 1;
SlimRnn slimRnn = SlimRnn.makeRoot(ctorParameters);
slimRnn.resetPiecesToTypeByCount(numberOfPieces, Piece.EnumType.CLASSICNEURON_MULTIPLICATIVE);
slimRnn.terminal.coordinate.x = ctorParameters.mapSize[0]-cast(size_t)1; // last map element is the terminal
slimRnn.terminal.value = 0.1f;
slimRnn.defaultInputSwitchboardIndex = ctorParameters.mapSize[0]-cast(size_t)2; // switchboard element before the last elements which is the terminal, is not zero because the programs should generalize better
// position length-3 is used as a delay for the termination signal
// add an neuron which sends the termination after an delay
slimRnn.pieceAccessors[numberOfPieces-2].type = Piece.EnumType.CLASSICNEURON_MULTIPLICATIVE;
slimRnn.pieceAccessors[numberOfPieces-2].inputs =
[
];
slimRnn.pieceAccessors[numberOfPieces-2].output = CoordinateWithValue.make(CoordinateType.make(ctorParameters.mapSize[0]-3), 0.5f);
slimRnn.pieceAccessors[numberOfPieces-2].enabled = true;
slimRnn.pieceAccessors[numberOfPieces-1].type = Piece.EnumType.CLASSICNEURON_MULTIPLICATIVE;
slimRnn.pieceAccessors[numberOfPieces-1].inputs =
[
CoordinateWithValue.make(CoordinateType.make(ctorParameters.mapSize[0]-cast(size_t)3), 0.3f)
];
slimRnn.pieceAccessors[numberOfPieces-1].output = CoordinateWithValue.make(CoordinateType.make(ctorParameters.mapSize[0]-1), 0.2f);
slimRnn.pieceAccessors[numberOfPieces-1].enabled = true;
SlimRnnLevinProblem slimRnnLevinProblem = new SlimRnnLevinProblem(slimRnn);
slimRnnLevinProblem.testset = [
SlimRnnLevinProblem.TestSetElement.make([false, false], false),
SlimRnnLevinProblem.TestSetElement.make([false, true], true),
SlimRnnLevinProblem.TestSetElement.make([true, false], true),
SlimRnnLevinProblem.TestSetElement.make([true, true], false),
];
LevinProblem levinProblem = slimRnnLevinProblem;
uint numberOfIterations = programLength;
bool done;
Solution solution = levinSearch.iterate(levinProblem, numberOfIterations, /*out*/ done);
if( done ) {
import std.stdio;
writeln("done=", done);
// debug program
foreach( iterationInstruction; solution.program.instructions ) {
// TODO< >
// uncommented because its the old code InstructionEncoding.debugInstructionToConsole(iterationInstruction);
}
}
import std.stdio;
writeln("done=", done);
writeln("##=", reportingNumberOfTriedPrograms);
}
// uses the VLIW1 encoding scheme for decoding
private void translateLevinProgramInstructionsToStackBasedInstructions(uint[] instructions, ref StackAllocator!(8, SlimRnnStackBasedManipulationInstruction) resultInstructionStack, out bool invalidEncoding) {
invalidEncoding = false;
uint translateCellularAutomataIndexToCellularAutomataRule(uint index) {
if(index < CARULES.length) {
return CARULES[index];
}
else { // else we default to the rule 110 because its the most useful
return 110;
}
}
// this converts from the index of the type (to be set for the neuron/piece) to the value which gets emitted as the instruction
uint translateTypeIndexOfPieceToType(uint type) {
if( type < Piece.EnumType._CASTART ) { // if it is not an CA type then we just take the raw value
return type;
}
else {
return translateCellularAutomataIndexToCellularAutomataRule(type - Piece.EnumType._CASTART);
}
}
foreach( uint iterationInstruction; instructions ) {
.slimRnn.programEncoding.Vliw2.vliw2emitInstructions(iterationInstruction, &translateTypeIndexOfPieceToType, resultInstructionStack, /*out*/ invalidEncoding);
if( invalidEncoding ) {
return;
}
}
return;
}
| D |
module main;
/**
Generates a formatted dstring[], code range pairing table,
filtering the xml character codes, according to the attribute values passed
Example arguments.
--input ucd.all.flat.xml --output numberConnects.d gc=Mn gc=Mc gc=Nd gc=Pc
The input file for this is ucd.all.flat.xml, found in http://www.unicode.org/Public/6.1.0/ucdxml/ucd.all.flat.zip
Authors: Michael Rynn
Date: Mar 2012
*/
import std.stdio, std.xml2, std.string, std.stream, std.conv;
import std.xmlp.charinput;
import alt.buffer;
import std.datetime;
import core.memory;
import std.xmlp.tagvisitor;
version(GC_STATS)
{
import alt.gcstats;
}
void showUsage()
{
writefln(r"unicodedb --input <unicodedb.xml> [--output file] [attr=xx]"
"output unicode characters as a single pair range table, if they match any of the attribute values (no quotes)");
}
string inputFile;
string outputFile;
string[][string] gEnv;
void process()
{
auto fstream = new BufferedFile(inputFile);
auto sf = new XmlStreamFiller(fstream);
auto p = new XmlParser(sf);
auto v = new TagVisitor(p);
TagHandlerSet tags;
struct PairRange {
dchar first_;
dchar last_;
}
Buffer!PairRange set;
PairRange next = PairRange(0,0);
bool hasPair = false; // has a pair in progress
void addCodePoint(string cp)
{
immutable validChar = to!uint(cp,16);
if (next.first_ == 0) // very first time
{
next = PairRange(validChar,validChar);
hasPair = true; // always true now
}
else if (next.last_ == (validChar-1))
{
next.last_ = validChar;
}
else {
// must have skipped. Save range and start new range
set.put(next);
next = PairRange(validChar,validChar);
}
}
// This element should be always empty, with just attributes?
tags["char",XmlResult.TAG_EMPTY] = (XmlReturn ret) {
foreach(n,v ; gEnv)
{
auto value = ret.attr[n];
foreach(s ; v)
{
if (value==s)
{
addCodePoint(ret.attr["cp"]);
return;
}
}
}
};
v.handlerSet = tags;
writeln("Waiting for parse of ",inputFile);
StopWatch sw;
sw.start();
v.parseDocument(0);
sw.stop();
double ms = sw.peek.msecs()/ 1000.0;
if (hasPair)
set.put(next); // complete last.
auto pairs = set.toConstArray();
BufferedFile outFile;
if (outputFile.length > 0)
{
outFile = new BufferedFile(outputFile,FileMode.OutNew);
}
Buffer!char outbuf;
auto pct = 0;
foreach(r ; pairs)
{
pct++;
auto s = format("0x%x, 0x%x, ",r.first_, r.last_);
outbuf.put(s);
if (pct==3)
{
pct=0;
outbuf.put('\n');
auto temp = outbuf.toConstArray();
write(temp);
if (outFile)
outFile.writeString(temp);
outbuf.length = 0;
}
}
if (outbuf.length > 0)
{
outbuf.put('\n');
auto temp = outbuf.toConstArray();
write(temp);
if (outFile)
outFile.writeString(temp);
}
if (outFile)
outFile.close();
writeln("Parse Time (secs) : ", ms);
}
void main(string[] args)
{
if (args.length <= 1)
{
showUsage();
return;
}
uintptr_t aix = 1;
while(aix < args.length)
{
auto arg = args[aix];
aix++;
switch(arg)
{
case "--input":
case "-i":
if (aix < args.length)
{
inputFile = args[aix];
aix++;
}
break;
case "--output":
case "-o":
if (aix < args.length)
{
outputFile = args[aix];
aix++;
}
break;
default:
auto vix = arg.indexOf("=");
if (vix >= 0)
{
if (vix==0)
{
writeln("Error command line: need name=value ", arg);
showUsage();
return;
}
auto atrName = arg[0..vix];
auto atrValue = arg[vix+1..$];
string[] list = gEnv.get(atrName,null);
// no check for repeated values
list ~= atrValue;
gEnv[atrName] = list;
}
break;
}
}
process();
version(GC_STATS)
{
GC.collect();
GCStatsSum.AllStats();
}
writeln("Enter to exit");
getchar();
}
| D |
module cpuid;
extern (C):
/// Check if RDTSC is available
/// Returns: Non-zero if RDTSC is supported
uint cpuid_rdtsc() {
/*version (GNU) asm {
"mov $1, %%eax\n"~
"cpuid\n"~
"and $16, %%edx\n"~
"mov %%edx, %%eax\n"~
"ret"
} else */
asm { naked;
mov EAX, 1;
cpuid;
and EDX, 16; // EDX[4]
mov EAX, EDX;
ret;
}
}
/// Check if RDRAND is available
/// Returns: Non-zero if RDRAND is supported
uint cpuid_rdrand() {
asm { naked;
mov EAX, 1;
cpuid;
and ECX, 0x40000000; // EDX[30]
mov EAX, ECX;
ret;
}
} | D |
/**
* Exception structure and helpers.
*
* The ExceptionType enumeration has its own unique values because taking the
* native exception OS values would make transmitting the information outside
* of the debugger difficult for the client program (e.g. client would have
* to distinguish an exception type of Fault as EXCEPTION_ACCESS_VIOLATION
* (0xC00000005) AND SIGSEGV. That'd be hell!). So a "translater" (see function
* `codetype`) converts those codes to the enumeration.
*
* License: BSD 3-clause
*/
module adbg.debugger.exception;
version (Windows) {
import core.sys.windows.windows;
import adbg.sys.windows.wow64;
enum { // missing D bindings (NTSTATUS, winbase.h)
STATUS_WX86_UNSIMULATE = 0x4000001C, /// WOW64 exception code
STATUS_WX86_CONTINUE = 0x4000001D, /// WOW64 exception code
STATUS_WX86_SINGLE_STEP = 0x4000001E, /// WOW64 exception code
STATUS_WX86_BREAKPOINT = 0x4000001F, /// WOW64 exception code
STATUS_WX86_EXCEPTION_CONTINUE = 0x40000020, /// WOW64 exception code
STATUS_WX86_EXCEPTION_LASTCHANCE = 0x40000021, /// WOW64 exception code
STATUS_WX86_EXCEPTION_CHAIN = 0x40000022, /// WOW64 exception code
// See https://devblogs.microsoft.com/oldnewthing/20190108-00/?p=100655
// tl;dr: Soft stack overflow (with a cookie on stack) within MSCRT,
// for prevention measures. Implies /GS (MSVC)
STATUS_STACK_BUFFER_OVERRUN = 0xc0000409, /// Soft stack overflow
}
} else
version (Posix) {
import adbg.sys.linux.user;
import core.sys.posix.signal;
}
version (X86)
version = X86_ANY;
else version (X86_64)
version = X86_ANY;
extern (C):
version (X86) {
enum EX_REG_COUNT = 10; /// Number of registers for platform
} else version (X86_64) {
enum EX_REG_COUNT = 18; /// Number of registers for platform
}
/// Register size
enum RegisterType {
u8, u16, u32, u64, f32, f64
}
/// Unhandled exception type of process/program
enum ExceptionType {
Unknown, /// Unknown type
Exit, /// Program terminated (Windows) CTRL+C (linux) SIGINT, SIGTSTP, SIGQUIT
Breakpoint, /// (x86) INT 3
Step, /// Single step
Fault, /// Access violations and segmentation faults
BoundExceeded, /// Array bounds exceeded
Misalignment, /// Data type misaligned
Illegal, /// Illegal opcode
DivZero, /// Integer divide by zero
PageError, /// In-page error
IntOverflow, /// Integer overflow
StackOverflow, /// Stack overflow
PrivilegedOpcode, /// Priviled instruction
// FPU
FPUDenormal, /// Denormal value too small to represent a FP, e.g. operand
FPUDivZero, /// Floating/Decimal divide by zero
FPUInexact, /// Inexact value/result is not exact in decimal
FPUIllegal, /// Invalid operation
FPUOverflow, /// Overflow in FPU operation
FPUUnderflow, /// FPU's stack overflow
FPUStackOverflow, /// FPU's stack overflowed
// OS specific-ish
Disposition, /// OS reports invalid disposition to exception handler
NoContinue, /// Debugger tried to continue on after non-continuable error
}
//TODO: Severity levels depending on exception type
// Essentially it'll be for a "can or cannot continue"
// This would also allow the removal of Disposition/NoContinue
// OR
// Focus on providing "Exit" translations, which debugger should rely upon
/// Represents an exception. Upon creation, these are populated depending on
/// the platform with their respective function.
struct exception_t {
/// Exception type, see the ExceptionType enumeration.
ExceptionType type;
/// Available features
uint features;
/// Original OS code (exception or signal value).
uint oscode;
/// Process ID.
uint pid;
/// Thread ID, if available; Otherwise zero.
uint tid;
union {
/// Memory address pointer for next instruction.
/// Typically the Instruction Pointer or Program Counter.
void *nextaddr;
/// Memory address value for next instruction.
/// Typically the Instruction Pointer or Program Counter.
size_t nextaddrv;
}
union {
/// Memory address pointer for fault. Otherwise null.
void *faultaddr;
/// Memory address value for fault. Otherwise null.
size_t faultaddrv;
}
/// Register count in registers field, populated by
/// adbg_ex_reg_init.
uint regcount;
/// Register population, this may depends by platform.
register_t [EX_REG_COUNT]registers;
}
/// Register structure, designs a single register for UI ends to understand
struct register_t {
RegisterType type; /// Register type (size)
union {
ubyte u8; /// Register data: ubyte (u8)
ushort u16; /// Register data: ushort (u16)
uint u32; /// Register data: uint (u32)
ulong u64; /// Register data: ulong (u64)
float f32; /// Register data: float (f32)
double f64; /// Register data: double (f64)
}
const(char) *name; /// Register name from adbg_ex_reg_init
}
// Windows: Mostly covered in winbase.h or winnt.h
// - Include\shared\winnt.h (at least for x86, amd64)
// - Include\shared\ntstatus.h (winnt: #ifndef WIN32_NO_STATUS || UMDF_USING_NTSTATUS)
// - Include\shared\ksarm.h (ARM: ARMv6, ARMv7)
// - Include\shared\ksarm64.h (ARM64: ARMv8)
// Linux: see sigaction(2)
/**
* (Internal) Translate an oscode to an ExceptionType enum value.
* - Windows: `DEBUG_INFO.Exception.ExceptionRecord.ExceptionCode` and
* `cast(uint)de.Exception.ExceptionRecord.ExceptionInformation[0]` in certain
* cases.
* - Posix: Signal number (`si_signo`) and its code `si_code` in certain cases.
* Params:
* code = OS code
* subcode = OS sub-code
* Returns: ExceptionType enum value
*/
ExceptionType adbg_ex_oscode(uint code, uint subcode = 0) {
version (Windows) {
//NOTE: Prefer STATUS_ over EXCEPION_ names when possible
with (ExceptionType)
switch (code) {
case STATUS_ACCESS_VIOLATION:
/*switch (subcode) {
case 0: // Read access error
return Fault;
case 1: // Write access error
return Fault;
case 8: // DEP violation
return Fault;
default: return Unknown;
}*/
return Fault;
case STATUS_ARRAY_BOUNDS_EXCEEDED: return BoundExceeded;
case STATUS_BREAKPOINT, STATUS_WX86_BREAKPOINT:
return Breakpoint;
// NOTE: A step may also indicate a trace operation
case STATUS_SINGLE_STEP, STATUS_WX86_SINGLE_STEP:
return Step;
case STATUS_DATATYPE_MISALIGNMENT: return Misalignment;
case STATUS_ILLEGAL_INSTRUCTION: return Illegal;
case STATUS_IN_PAGE_ERROR:
/*switch (subcode) {
case 0: // Read access error
return PageError;
case 1: // Write access error
return PageError;
case 8: // DEP violation
return PageError;
default: return PageError;
}*/
return PageError;
case EXCEPTION_INT_DIVIDE_BY_ZERO: return DivZero;
case EXCEPTION_INT_OVERFLOW: return IntOverflow;
case STATUS_INVALID_DISPOSITION: return Disposition;
case EXCEPTION_PRIV_INSTRUCTION: return PrivilegedOpcode;
case STATUS_STACK_OVERFLOW, STATUS_STACK_BUFFER_OVERRUN:
return StackOverflow;
// FPU
case EXCEPTION_FLT_DENORMAL_OPERAND: return FPUDenormal;
case EXCEPTION_FLT_DIVIDE_BY_ZERO: return FPUDivZero;
case EXCEPTION_FLT_INEXACT_RESULT: return FPUInexact;
case EXCEPTION_FLT_INVALID_OPERATION: return FPUIllegal;
case EXCEPTION_FLT_OVERFLOW: return FPUOverflow;
case EXCEPTION_FLT_STACK_CHECK: return FPUStackOverflow;
case EXCEPTION_FLT_UNDERFLOW: return FPUUnderflow;
case STATUS_NONCONTINUABLE_EXCEPTION: return NoContinue;
default: return Unknown;
}
} else {
with (ExceptionType)
switch (code) {
case SIGILL:
/*
switch (subcode) {
case ILL_ILLOPC: opcode
case ILL_ILLOPN: operand
case ILL_ILLADR: address mode
case ILL_ILLTRP: trap
case ILL_PRVOPC: priv code
case ILL_PRVREG: priv register
case ILL_COPROC: co-processor error
case ILL_BADSTK: internal stack error.
}*/
return Illegal;
case SIGFPE:
switch (subcode) {
case FPE_INTDIV: return FPUDivZero;
case FPE_INTOVF: return FPUOverflow;
case FPE_FLTDIV: return FPUDivZero;
case FPE_FLTOVF: return FPUOverflow;
case FPE_FLTUND: return FPUUnderflow;
case FPE_FLTRES: return FPUInexact;
case FPE_FLTINV: return FPUIllegal;
case FPE_FLTSUB: return FPUDenormal;
default: return FPUIllegal;
}
case SIGSEGV:
switch (subcode) {
case SEGV_MAPERR: return Fault;
case SEGV_ACCERR: return Fault;
//case SEGV_BNDERR: return BoundExceeded;
//case SEGV_PKUERR: return
default: return Fault;
}
case SIGBUS:
switch (subcode) {
case BUS_ADRALN: return Misalignment;
case BUS_ADRERR: return Unknown;
case BUS_OBJERR: return Unknown;
//case BUS_MCEERR_AR:
//case BUS_MCEERR_AO:
default: return Unknown;
}
case SIGTRAP:
/*switch (subcode) {
case TRAP_BRKPT: return Breakpoint;
case TRAP_TRACE:
case TRAP_DTRACE:
case TRAP_RWATCH:
case TRAP_WWATCH:
case TRAP_XWATCH:
default: return Breakpoint;
}*/
return Breakpoint;
case SIGCHLD:
switch (subcode) {
case CLD_EXITED: return Exit;
case CLD_KILLED: return Exit;
case CLD_DUMPED: return Unknown;
case CLD_TRAPPED: return Breakpoint;
case CLD_STOPPED: return Unknown;
case CLD_CONTINUED: return Unknown;
default: return Unknown;
}
case /*SIGIO, */SIGPOLL:
switch (subcode) {
case POLL_IN: return Unknown;
case POLL_OUT: return Unknown;
case POLL_MSG: return Unknown;
case POLL_ERR: return Unknown;
case POLL_PRI: return Unknown;
case POLL_HUP: return Unknown;
default: return Unknown;
}
case SIGSTOP: return Breakpoint;
case SIGSYS: return Unknown; // SYS_SECCOMP
//TODO: case SIGKILL:
default: return Unknown;
}
}
}
/// Get a very short descriptive string for a ExceptionType value in all
/// uppercase. UI or client may want to lowercase if they want, but I'm keeping
/// the uppercase.
/// Params: code = ExceptionType
/// Returns: String
const(char) *adbg_ex_typestr(ExceptionType code) {
with (ExceptionType)
final switch (code) {
case Unknown: return "UNKNOWN";
case Exit: return "TERMINATED";
case Breakpoint: return "BREAKPOINT";
case Step: return "SINGLE STEP";
case Fault:
version (Windows) return "ACCESS VIOLATION";
else return "SEGMENTATION FAULT";
case BoundExceeded: return "OUT OF BOUNDS";
case Misalignment: return "MISALIGNMENT";
case Illegal: return "ILLEGAL INSTRUCTION";
case DivZero: return "ZERO DIVISION";
case PageError: return "PAGE ERROR";
case IntOverflow: return "INTEGER OVERFLOW";
case StackOverflow: return "STACK OVERFLOW";
case PrivilegedOpcode: return "PRIVILEGED INSTRUCTION";
case FPUDenormal: return "FPU: DEFORMAL";
case FPUDivZero: return "FPU: ZERO DIVISION";
case FPUInexact: return "FPU: INEXACT";
case FPUIllegal: return "FPU: ILLEGAL";
case FPUOverflow: return "FPU: OVERFLOW";
case FPUUnderflow: return "FPU: UNDERFLOW";
case FPUStackOverflow: return "FPU: STACK OVERFLOW";
case Disposition: return "OS: DISPOSITION";
case NoContinue: return "OS: COULD NOT CONTINUE";
}
}
/// Format a register depending on their type as a zero-padded number.
/// Params: reg = register_t structure
/// Returns: Formatted hexadecimal value
const(char) *adbg_ex_reg_fhex(register_t *reg) {
import adbg.utils.str : adbg_util_strf;
with (RegisterType)
final switch (reg.type) {
case u8: return adbg_util_strf("%02x", reg.u8);
case u16: return adbg_util_strf("%04x", reg.u16);
case u32, f32: return adbg_util_strf("%08x", reg.u32);
case u64, f64: return adbg_util_strf("%016llx", reg.u64);
}
}
/*
const(char) *exception_reg_fval(register_t *reg) {
import utils.str : adbg_util_strf;
}*/
/// (Internal) Initiate register fields with their names and sizes.
/// Params: e = Exception structure
void adbg_ex_ctx_init(exception_t *e) {
version (X86) {
adbg_ex_ctx_init_x86(e);
} else version (X86_64) {
version (Win64) {
import adbg.debugger.debugger : processWOW64;
if (processWOW64)
adbg_ex_ctx_init_x86(e);
else
adbg_ex_ctx_init_x86_64(e);
} else
adbg_ex_ctx_init_x86_64(e);
}
}
version (X86_ANY)
private void adbg_ex_ctx_init_x86(exception_t *e) {
e.regcount = 10;
e.registers[0].name = "EIP";
e.registers[0].type = RegisterType.u32;
e.registers[1].name = "EFLAGS";
e.registers[1].type = RegisterType.u32;
e.registers[2].name = "EAX";
e.registers[2].type = RegisterType.u32;
e.registers[3].name = "EBX";
e.registers[3].type = RegisterType.u32;
e.registers[4].name = "ECX";
e.registers[4].type = RegisterType.u32;
e.registers[5].name = "EDX";
e.registers[5].type = RegisterType.u32;
e.registers[6].name = "ESP";
e.registers[6].type = RegisterType.u32;
e.registers[7].name = "EBP";
e.registers[7].type = RegisterType.u32;
e.registers[8].name = "ESI";
e.registers[8].type = RegisterType.u32;
e.registers[9].name = "EDI";
e.registers[9].type = RegisterType.u32;
}
version (X86_64)
private void adbg_ex_ctx_init_x86_64(exception_t *e) {
e.regcount = 18;
e.registers[0].name = "RIP";
e.registers[0].type = RegisterType.u64;
e.registers[1].name = "RFLAGS";
e.registers[1].type = RegisterType.u64;
e.registers[2].name = "RAX";
e.registers[2].type = RegisterType.u64;
e.registers[3].name = "RBX";
e.registers[3].type = RegisterType.u64;
e.registers[4].name = "RCX";
e.registers[4].type = RegisterType.u64;
e.registers[5].name = "RDX";
e.registers[5].type = RegisterType.u64;
e.registers[6].name = "RSP";
e.registers[6].type = RegisterType.u64;
e.registers[7].name = "RBP";
e.registers[7].type = RegisterType.u64;
e.registers[8].name = "RSI";
e.registers[8].type = RegisterType.u64;
e.registers[9].name = "RDI";
e.registers[9].type = RegisterType.u64;
e.registers[10].name = "R8";
e.registers[10].type = RegisterType.u64;
e.registers[11].name = "R9";
e.registers[11].type = RegisterType.u64;
e.registers[12].name = "R10";
e.registers[12].type = RegisterType.u64;
e.registers[13].name = "R11";
e.registers[13].type = RegisterType.u64;
e.registers[14].name = "R12";
e.registers[14].type = RegisterType.u64;
e.registers[15].name = "R13";
e.registers[15].type = RegisterType.u64;
e.registers[16].name = "R14";
e.registers[16].type = RegisterType.u64;
e.registers[17].name = "R15";
e.registers[17].type = RegisterType.u64;
}
version (Windows) {
//
// ANCHOR Windows functions
//
package void adbg_ex_dbg(exception_t *e, DEBUG_EVENT *de) {
e.pid = de.dwProcessId;
e.tid = de.dwThreadId;
e.faultaddr = de.Exception.ExceptionRecord.ExceptionAddress;
e.oscode = de.Exception.ExceptionRecord.ExceptionCode;
switch (e.oscode) {
case EXCEPTION_IN_PAGE_ERROR:
case EXCEPTION_ACCESS_VIOLATION:
e.type = adbg_ex_oscode(e.oscode,
cast(uint)de.Exception.ExceptionRecord.ExceptionInformation[0]);
break;
default:
e.type = adbg_ex_oscode(e.oscode);
}
}
// Populate exception_t.registers array from Windows' CONTEXT
void adbg_ex_ctx(exception_t *e, CONTEXT *c) {
version (X86) {
e.nextaddrv = c.Eip;
e.registers[0].u32 = c.Eip;
e.registers[1].u32 = c.EFlags;
e.registers[2].u32 = c.Eax;
e.registers[3].u32 = c.Ebx;
e.registers[4].u32 = c.Ecx;
e.registers[5].u32 = c.Edx;
e.registers[6].u32 = c.Esp;
e.registers[7].u32 = c.Ebp;
e.registers[8].u32 = c.Esi;
e.registers[9].u32 = c.Edi;
} else
version (X86_64) {
e.nextaddrv = c.Rip;
e.registers[0].u64 = c.Rip;
e.registers[1].u64 = c.EFlags;
e.registers[2].u64 = c.Rax;
e.registers[3].u64 = c.Rbx;
e.registers[4].u64 = c.Rcx;
e.registers[5].u64 = c.Rdx;
e.registers[6].u64 = c.Rsp;
e.registers[7].u64 = c.Rbp;
e.registers[8].u64 = c.Rsi;
e.registers[9].u64 = c.Rdi;
e.registers[10].u64 = c.R8;
e.registers[11].u64 = c.R9;
e.registers[12].u64 = c.R10;
e.registers[13].u64 = c.R11;
e.registers[14].u64 = c.R12;
e.registers[15].u64 = c.R13;
e.registers[16].u64 = c.R14;
e.registers[17].u64 = c.R15;
}
}
version (Win64)
package void adbg_ex_ctx_win_wow64(exception_t *e, WOW64_CONTEXT *c) {
e.nextaddrv = c.Eip;
e.registers[0].u32 = c.Eip;
e.registers[1].u32 = c.EFlags;
e.registers[2].u32 = c.Eax;
e.registers[3].u32 = c.Ebx;
e.registers[4].u32 = c.Ecx;
e.registers[5].u32 = c.Edx;
e.registers[6].u32 = c.Esp;
e.registers[7].u32 = c.Ebp;
e.registers[8].u32 = c.Esi;
e.registers[9].u32 = c.Edi;
}
} else version (Posix) {
//
// ANCHOR Posix functions
//
void adbg_ex_dbg(exception_t *e, int pid, int signo) {
e.pid = pid;
e.tid = 0;
e.oscode = signo;
e.type = adbg_ex_oscode(signo);
}
/// Populate exception_t.registers array from user_regs_struct
void adbg_ex_ctx(exception_t *e, user_regs_struct *u) {
version (X86) {
e.nextaddrv = u.eip;
e.registers[0].u32 = u.eip;
e.registers[1].u32 = u.eflags;
e.registers[2].u32 = u.eax;
e.registers[3].u32 = u.ebx;
e.registers[4].u32 = u.ecx;
e.registers[5].u32 = u.edx;
e.registers[6].u32 = u.esp;
e.registers[7].u32 = u.ebp;
e.registers[8].u32 = u.esi;
e.registers[9].u32 = u.edi;
} else
version (X86_64) {
e.nextaddrv = u.rip;
e.registers[0].u64 = u.rip;
e.registers[1].u64 = u.eflags;
e.registers[2].u64 = u.rax;
e.registers[3].u64 = u.rbx;
e.registers[4].u64 = u.rcx;
e.registers[5].u64 = u.rdx;
e.registers[6].u64 = u.rsp;
e.registers[7].u64 = u.rbp;
e.registers[8].u64 = u.rsi;
e.registers[9].u64 = u.rdi;
e.registers[10].u64 = u.r8;
e.registers[11].u64 = u.r9;
e.registers[12].u64 = u.r10;
e.registers[13].u64 = u.r11;
e.registers[14].u64 = u.r12;
e.registers[15].u64 = u.r13;
e.registers[16].u64 = u.r14;
e.registers[17].u64 = u.r15;
}
}
} // version Posix | D |
/** DGui project file.
Copyright: Trogu Antonio Davide 2011-2013
License: $(HTTP boost.org/LICENSE_1_0.txt, Boost License 1.0).
Authors: Trogu Antonio Davide
*/
module dgui.layout.panel;
public import dgui.layout.layoutcontrol;
class Panel: LayoutControl
{
protected override void createControlParams(ref CreateControlParams ccp)
{
ccp.className = WC_DPANEL;
ccp.defaultCursor = SystemCursors.arrow;
super.createControlParams(ccp);
}
}
| D |
/Users/sapientisat/Projects/Supplements/Supplements/XcodeBuild/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SnapKit.build/Objects-normal/x86_64/ConstraintLayoutGuideDSL.o : /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintLayoutGuideDSL.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintDSL.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintLayoutSupportDSL.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintViewDSL.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintLayoutGuide.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintMakerExtendable.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintMakerRelatable.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintMakerEditable.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintMakerFinalizable.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintMakerPriortizable.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintConfig.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/Debugging.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintItem.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/LayoutConstraintItem.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintRelation.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintDescription.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintMaker.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/Typealiases.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintAttributes.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintLayoutGuide+Extensions.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/UILayoutSupport+Extensions.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintView+Extensions.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintDirectionalInsets.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintInsets.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintRelatableTarget.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintMultiplierTarget.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintOffsetTarget.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintDirectionalInsetTarget.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintInsetTarget.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintConstantTarget.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintPriorityTarget.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/Constraint.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/LayoutConstraint.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintLayoutSupport.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintView.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintPriority.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/ObjectiveC.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreImage.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/QuartzCore.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Dispatch.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Metal.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Darwin.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Foundation.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreFoundation.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreGraphics.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Swift.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/UIKit.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Users/sapientisat/Projects/Supplements/Supplements/Pods/Target\ Support\ Files/SnapKit/SnapKit-umbrella.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/mach-o/dyld.modulemap /Users/sapientisat/Projects/Supplements/Supplements/XcodeBuild/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SnapKit.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/mach-o/compact_unwind_encoding.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/sapientisat/Projects/Supplements/Supplements/XcodeBuild/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SnapKit.build/Objects-normal/x86_64/ConstraintLayoutGuideDSL~partial.swiftmodule : /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintLayoutGuideDSL.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintDSL.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintLayoutSupportDSL.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintViewDSL.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintLayoutGuide.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintMakerExtendable.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintMakerRelatable.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintMakerEditable.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintMakerFinalizable.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintMakerPriortizable.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintConfig.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/Debugging.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintItem.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/LayoutConstraintItem.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintRelation.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintDescription.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintMaker.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/Typealiases.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintAttributes.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintLayoutGuide+Extensions.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/UILayoutSupport+Extensions.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintView+Extensions.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintDirectionalInsets.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintInsets.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintRelatableTarget.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintMultiplierTarget.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintOffsetTarget.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintDirectionalInsetTarget.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintInsetTarget.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintConstantTarget.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintPriorityTarget.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/Constraint.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/LayoutConstraint.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintLayoutSupport.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintView.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintPriority.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/ObjectiveC.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreImage.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/QuartzCore.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Dispatch.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Metal.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Darwin.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Foundation.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreFoundation.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreGraphics.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Swift.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/UIKit.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Users/sapientisat/Projects/Supplements/Supplements/Pods/Target\ Support\ Files/SnapKit/SnapKit-umbrella.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/mach-o/dyld.modulemap /Users/sapientisat/Projects/Supplements/Supplements/XcodeBuild/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SnapKit.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/mach-o/compact_unwind_encoding.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/sapientisat/Projects/Supplements/Supplements/XcodeBuild/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SnapKit.build/Objects-normal/x86_64/ConstraintLayoutGuideDSL~partial.swiftdoc : /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintLayoutGuideDSL.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintDSL.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintLayoutSupportDSL.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintViewDSL.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintLayoutGuide.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintMakerExtendable.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintMakerRelatable.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintMakerEditable.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintMakerFinalizable.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintMakerPriortizable.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintConfig.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/Debugging.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintItem.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/LayoutConstraintItem.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintRelation.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintDescription.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintMaker.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/Typealiases.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintAttributes.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintLayoutGuide+Extensions.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/UILayoutSupport+Extensions.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintView+Extensions.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintDirectionalInsets.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintInsets.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintRelatableTarget.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintMultiplierTarget.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintOffsetTarget.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintDirectionalInsetTarget.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintInsetTarget.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintConstantTarget.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintPriorityTarget.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/Constraint.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/LayoutConstraint.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintLayoutSupport.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintView.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintPriority.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/ObjectiveC.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreImage.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/QuartzCore.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Dispatch.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Metal.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Darwin.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Foundation.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreFoundation.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreGraphics.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Swift.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/UIKit.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Users/sapientisat/Projects/Supplements/Supplements/Pods/Target\ Support\ Files/SnapKit/SnapKit-umbrella.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/mach-o/dyld.modulemap /Users/sapientisat/Projects/Supplements/Supplements/XcodeBuild/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SnapKit.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/mach-o/compact_unwind_encoding.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
/Users/sapientisat/Projects/Supplements/Supplements/XcodeBuild/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SnapKit.build/Objects-normal/x86_64/ConstraintLayoutGuideDSL~partial.swiftsourceinfo : /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintLayoutGuideDSL.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintDSL.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintLayoutSupportDSL.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintViewDSL.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintLayoutGuide.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintMakerExtendable.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintMakerRelatable.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintMakerEditable.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintMakerFinalizable.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintMakerPriortizable.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintConfig.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/Debugging.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintItem.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/LayoutConstraintItem.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintRelation.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintDescription.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintMaker.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/Typealiases.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintAttributes.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintLayoutGuide+Extensions.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/UILayoutSupport+Extensions.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintView+Extensions.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintDirectionalInsets.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintInsets.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintRelatableTarget.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintMultiplierTarget.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintOffsetTarget.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintDirectionalInsetTarget.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintInsetTarget.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintConstantTarget.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintPriorityTarget.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/Constraint.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/LayoutConstraint.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintLayoutSupport.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintView.swift /Users/sapientisat/Projects/Supplements/Supplements/Pods/SnapKit/Source/ConstraintPriority.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/ObjectiveC.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreImage.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Combine.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/QuartzCore.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Dispatch.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Metal.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Darwin.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Foundation.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreFoundation.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/CoreGraphics.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/Swift.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/UIKit.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/prebuilt-modules/SwiftOnoneSupport.swiftmodule/x86_64-apple-ios-simulator.swiftmodule /Users/sapientisat/Projects/Supplements/Supplements/Pods/Target\ Support\ Files/SnapKit/SnapKit-umbrella.h /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/mach-o/dyld.modulemap /Users/sapientisat/Projects/Supplements/Supplements/XcodeBuild/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SnapKit.build/unextended-module.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/mach-o/compact_unwind_encoding.modulemap /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/objc/ObjectiveC.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/OpenGLES.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.apinotes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/apinotes/Dispatch.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/Darwin.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.apinotes /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Security.framework/Headers/Security.apinotes
| D |
module ogre.scene.scenequery;
import std.algorithm;
import std.array;
import ogre.math.plane;
import ogre.compat;
import ogre.math.ray;
import ogre.math.sphere;
import ogre.math.axisalignedbox;
import ogre.math.vector;
import ogre.rendersystem.renderoperation;
import ogre.scene.scenemanager;
import ogre.scene.movableobject;
import ogre.exception;
/** A class for performing queries on a scene.
@remarks
This is an abstract class for performing a query on a scene, i.e. to retrieve
a list of objects and/or world geometry sections which are potentially intersecting a
given region. Note the use of the word 'potentially': the results of a scene query
are generated based on bounding volumes, and as such are not correct at a triangle
level; the user of the SceneQuery is expected to filter the results further if
greater accuracy is required.
@par
Different SceneManagers will implement these queries in different ways to
exploit their particular scene organisation, and thus will provide their own
concrete subclasses. In fact, these subclasses will be derived from subclasses
of this class rather than directly because there will be region-type classes
in between.
@par
These queries could have just been implemented as methods on the SceneManager,
however, they are wrapped up as objects to allow 'compilation' of queries
if deemed appropriate by the implementation; i.e. each concrete subclass may
precalculate information (such as fixed scene partitions involved in the query)
to speed up the repeated use of the query.
@par
You should never try to create a SceneQuery object yourself, they should be created
using the SceneManager interfaces for the type of query required, e.g.
SceneManager::createSphereSceneQuery.
*/
class SceneQuery //: public SceneMgtAlloc
{
public:
/** This type can be used by collaborating applications & SceneManagers to
agree on the type of world geometry to be returned from queries. Not all
these types will be supported by all SceneManagers; once the application
has decided which SceneManager specialisation to use, it is expected that
it will know which type of world geometry abstraction is available to it.
*/
enum WorldFragmentType {
/// Return no world geometry hits at all
WFT_NONE,
/// Return pointers to convex plane-bounded regions
WFT_PLANE_BOUNDED_REGION,
/// Return a single intersection point (typically RaySceneQuery only)
WFT_SINGLE_INTERSECTION,
/// Custom geometry as defined by the SceneManager
WFT_CUSTOM_GEOMETRY,
/// General RenderOperation structure
WFT_RENDER_OPERATION
}
/** Represents part of the world geometry that is a result of a SceneQuery.
@remarks
Since world geometry is normally vast and sprawling, we need a way of
retrieving parts of it based on a query. That is what this struct is for;
note there are potentially as many data structures for world geometry as there
are SceneManagers, however this structure includes a few common abstractions as
well as a more general format.
@par
The type of world fragment that is returned from a query depends on the
SceneManager, and the option set using SceneQuery::setWorldFragmentType.
You can see what fragment types are supported on the query in question by
calling SceneQuery::getSupportedWorldFragmentTypes().
*/
struct WorldFragment {
/// The type of this world fragment
WorldFragmentType fragmentType;
/// Single intersection point, only applicable for WFT_SINGLE_INTERSECTION
Vector3 singleIntersection;
/// Planes bounding a convex region, only applicable for WFT_PLANE_BOUNDED_REGION
//list<Plane>::type* planes;
Plane[] planes;
/// Custom geometry block, only applicable for WFT_CUSTOM_GEOMETRY
void* geometry;
/// General render operation structure, fallback if nothing else is available
RenderOperation renderOp;
}
protected:
SceneManager mParentSceneMgr;
uint mQueryMask;
uint mQueryTypeMask;
//set<WorldFragmentType>::type mSupportedWorldFragments;
WorldFragmentType[] mSupportedWorldFragments;
WorldFragmentType mWorldFragmentType;
public:
/** Standard constructor, should be called by SceneManager. */
this(SceneManager mgr)
{
mParentSceneMgr = mgr;
mQueryMask = 0xFFFFFFFF;
mWorldFragmentType = WorldFragmentType.WFT_NONE;
// default type mask to everything except lights & fx (previous behaviour)
mQueryTypeMask = (0xFFFFFFFF & ~SceneManager.FX_TYPE_MASK)
& ~SceneManager.LIGHT_TYPE_MASK;
}
~this() {}
/** Sets the mask for results of this query.
@remarks
This method allows you to set a 'mask' to limit the results of this
query to certain types of result. The actual meaning of this value is
up to the application; basically MovableObject instances will only be returned
from this query if a bitwise AND operation between this mask value and the
MovableObject::getQueryFlags value is non-zero. The application will
have to decide what each of the bits means.
*/
void setQueryMask(uint mask)
{
mQueryMask = mask;
}
/** Returns the current mask for this query. */
uint getQueryMask()
{
return mQueryMask;
}
/** Sets the type mask for results of this query.
@remarks
This method allows you to set a 'type mask' to limit the results of this
query to certain types of objects. Whilst setQueryMask deals with flags
set per instance of object, this method deals with setting a mask on
flags set per type of object. Both may exclude an object from query
results.
*/
void setQueryTypeMask(uint mask)
{
mQueryTypeMask = mask;
}
/** Returns the current mask for this query. */
uint getQueryTypeMask()
{
return mQueryTypeMask;
}
/** Tells the query what kind of world geometry to return from queries;
often the full renderable geometry is not what is needed.
@remarks
The application receiving the world geometry is expected to know
what to do with it; inevitably this means that the application must
have knowledge of at least some of the structures
used by the custom SceneManager.
@par
The default setting is WFT_NONE.
*/
void setWorldFragmentType(WorldFragmentType wft)
{
// Check supported
if (mSupportedWorldFragments.find(wft).empty)
{
throw new InvalidParamsError("This world fragment type is not supported.",
"SceneQuery.setWorldFragmentType");
}
mWorldFragmentType = wft;
}
/** Gets the current world fragment types to be returned from the query. */
WorldFragmentType getWorldFragmentType()
{
return mWorldFragmentType;
}
/** Returns the types of world fragments this query supports. */
//set<WorldFragmentType>::type*
WorldFragmentType[] getSupportedWorldFragmentTypes()
{
return mSupportedWorldFragments;
}
}
/** This optional class allows you to receive per-result callbacks from
SceneQuery executions instead of a single set of consolidated results.
@remarks
You should override this with your own subclass. Note that certain query
classes may refine this listener interface.
*/
interface SceneQueryListener
{
/** Called when a MovableObject is returned by a query.
@remarks
The implementor should return 'true' to continue returning objects,
or 'false' to abandon any further results from this query.
*/
bool queryResult(MovableObject object);
/** Called when a WorldFragment is returned by a query.
@remarks
The implementor should return 'true' to continue returning objects,
or 'false' to abandon any further results from this query.
*/
bool queryResult(SceneQuery.WorldFragment fragment);
}
//typedef list<MovableObject*>::type SceneQueryResultMovableList;
//typedef list<SceneQuery::WorldFragment*>::type SceneQueryResultWorldFragmentList;
alias MovableObject[] SceneQueryResultMovableList;
alias SceneQuery.WorldFragment[] SceneQueryResultWorldFragmentList;
/** Holds the results of a scene query. */
struct SceneQueryResult //: public SceneMgtAlloc
{
/// List of movable objects in the query (entities, particle systems etc)
SceneQueryResultMovableList movables;
/// List of world fragments
SceneQueryResultWorldFragmentList worldFragments;
}
/** Abstract class defining a query which returns single results from a region.
@remarks
This class is simply a generalisation of the subtypes of query that return
a set of individual results in a region. See the SceneQuery class for abstract
information, and subclasses for the detail of each query type.
*/
class RegionSceneQuery : SceneQuery, SceneQueryListener
{
protected:
SceneQueryResult *mLastResult;
public:
/** Standard constructor, should be called by SceneManager. */
this(SceneManager mgr)
{
super(mgr);
}
~this()
{
clearResults();
}
/** Executes the query, returning the results back in one list.
@remarks
This method executes the scene query as configured, gathers the results
into one structure and returns a reference to that structure. These
results will also persist in this query object until the next query is
executed, or clearResults() is called. An more lightweight version of
this method that returns results through a listener is also available.
*/
SceneQueryResult* execute()
{
clearResults();
mLastResult = new SceneQueryResult();
// Call callback version with self as listener
execute(this);
return mLastResult;
}
/** Executes the query and returns each match through a listener interface.
@remarks
Note that this method does not store the results of the query internally
so does not update the 'last result' value. This means that this version of
execute is more lightweight and therefore more efficient than the version
which returns the results as a collection.
*/
abstract void execute(SceneQueryListener listener);
/** Gets the results of the last query that was run using this object, provided
the query was executed using the collection-returning version of execute.
*/
SceneQueryResult* getLastResults()
{
assert(mLastResult);
return mLastResult;
}
/** Clears the results of the last query execution.
@remarks
You only need to call this if you specifically want to free up the memory
used by this object to hold the last query results. This object clears the
results itself when executing and when destroying itself.
*/
void clearResults()
{
if (mLastResult)
{
destroy(mLastResult);
}
mLastResult = null;
}
/** Self-callback in order to deal with execute which returns collection. */
bool queryResult(MovableObject obj)
{
// Add to internal list
mLastResult.movables.insert(obj);
// Continue
return true;
}
/** Self-callback in order to deal with execute which returns collection. */
bool queryResult(SceneQuery.WorldFragment fragment)
{
// Add to internal list
mLastResult.worldFragments.insert(fragment);
// Continue
return true;
}
}
/** Specialises the SceneQuery class for querying within an axis aligned box. */
class AxisAlignedBoxSceneQuery : RegionSceneQuery
{
protected:
AxisAlignedBox mAABB;
public:
this(SceneManager mgr)
{
super(mgr);
}
~this() {}
/** Sets the size of the box you wish to query. */
void setBox(AxisAlignedBox box)
{
mAABB = box;
}
/** Gets the box which is being used for this query. */
AxisAlignedBox getBox()
{
return mAABB;
}
}
/** Specialises the SceneQuery class for querying within a sphere. */
class SphereSceneQuery : RegionSceneQuery
{
protected:
Sphere mSphere;
public:
this(SceneManager mgr)
{
super(mgr);
}
~this(){}
/** Sets the sphere which is to be used for this query. */
void setSphere(Sphere sphere)
{
mSphere = sphere;
}
/** Gets the sphere which is being used for this query. */
Sphere getSphere()
{
return mSphere;
}
}
/** Specialises the SceneQuery class for querying within a plane-bounded volume.
*/
//TODO PlaneBoundedVolumeListSceneQuery ref or not?
class PlaneBoundedVolumeListSceneQuery : RegionSceneQuery
{
protected:
PlaneBoundedVolumeList mVolumes;
public:
this(SceneManager mgr)
{
super(mgr);
}
~this(){}
/** Sets the volume which is to be used for this query. */
void setVolumes(PlaneBoundedVolumeList volumes)
{
mVolumes = volumes;
}
/** Gets the volume which is being used for this query. */
PlaneBoundedVolumeList getVolumes()
{
return mVolumes;
}
}
/*
/// Specialises the SceneQuery class for querying within a pyramid.
class _OgreExport PyramidSceneQuery : public RegionSceneQuery
{
public:
PyramidSceneQuery(SceneManager* mgr);
~PyramidSceneQuery();
};
*/
/** Alternative listener class for dealing with RaySceneQuery.
@remarks
Because the RaySceneQuery returns results in an extra bit of information, namely
distance, the listener interface must be customised from the standard SceneQueryListener.
*/
interface RaySceneQueryListener
{
/** Called when a movable objects intersects the ray.
@remarks
As with SceneQueryListener, the implementor of this method should return 'true'
if further results are required, or 'false' to abandon any further results from
the current query.
*/
bool queryResult(MovableObject obj, Real distance);
/** Called when a world fragment is intersected by the ray.
@remarks
As with SceneQueryListener, the implementor of this method should return 'true'
if further results are required, or 'false' to abandon any further results from
the current query.
*/
bool queryResult(SceneQuery.WorldFragment fragment, Real distance);
}
/** This struct allows a single comparison of result data no matter what the type */
struct RaySceneQueryResultEntry
{
/// Distance along the ray
Real distance;
/// The movable, or NULL if this is not a movable result
MovableObject movable;
/// The world fragment, or NULL if this is not a fragment result
SceneQuery.WorldFragment* worldFragment;
/// Comparison operator for sorting
//bool operator < (RaySceneQueryResultEntry& rhs)
//TODO operator <
Real opCmp (RaySceneQueryResultEntry rhs)
{
return distance - rhs.distance;
}
}
//typedef vector<RaySceneQueryResultEntry>::type RaySceneQueryResult;
alias RaySceneQueryResultEntry[] RaySceneQueryResult;
/** Specialises the SceneQuery class for querying along a ray. */
class RaySceneQuery : SceneQuery, RaySceneQueryListener
{
protected:
Ray mRay;
bool mSortByDistance;
ushort mMaxResults;
RaySceneQueryResult mResult;
public:
this(SceneManager mgr)
{
super(mgr);
mSortByDistance = false;
mMaxResults = 0;
}
~this(){}
/** Sets the ray which is to be used for this query. */
void setRay(Ray ray)
{
mRay = ray;
}
/** Gets the ray which is to be used for this query. */
Ray getRay()
{
return mRay;
}
/** Sets whether the results of this query will be sorted by distance along the ray.
@remarks
Often you want to know what was the first object a ray intersected with, and this
method allows you to ask the query to sort the results so that the nearest results
are listed first.
@par
Note that because the query returns results based on bounding volumes, the ray may not
actually intersect the detail of the objects returned from the query, just their
bounding volumes. For this reason the caller is advised to use more detailed
intersection tests on the results if a more accurate result is required; OGRE uses
bounds checking in order to give the most speedy results since not all applications
need extreme accuracy.
@param sort If true, results will be sorted.
@param maxresults If sorting is enabled, this value can be used torain the maximum number
of results that are returned. Please note (as above) that the use of bounding volumes mean that
accuracy is not guaranteed; if in doubt, allow more results and filter them in more detail.
0 means unlimited results.
*/
void setSortByDistance(bool sort, ushort maxresults = 0)
{
mSortByDistance = sort;
mMaxResults = maxresults;
}
/** Gets whether the results are sorted by distance. */
bool getSortByDistance()
{
return mSortByDistance;
}
/** Gets the maximum number of results returned from the query (only relevant if
results are being sorted) */
ushort getMaxResults()
{
return mMaxResults;
}
/** Executes the query, returning the results back in one list.
@remarks
This method executes the scene query as configured, gathers the results
into one structure and returns a reference to that structure. These
results will also persist in this query object until the next query is
executed, or clearResults() is called. An more lightweight version of
this method that returns results through a listener is also available.
*/
RaySceneQueryResult execute()
{
// Clear without freeing the vector buffer
mResult.clear();
// Call callback version with self as listener
this.execute(this);
if (mSortByDistance)
{
if (mMaxResults != 0 && mMaxResults < mResult.length)
{
// Partially sort the N smallest elements, discard others
//std::partial_sort(mResult.begin(), mResult.begin()+mMaxResults, mResult.end());
//std.algorithm.partialSort(mResult[], mMaxResults); //FIXME Some errors
//std.algorithm.sort(mResult[].mMaxResults)); // ) won't give out-of-range error
std.algorithm.sort(mResult[0..mMaxResults]); // but we already did range checks
mResult.length = mMaxResults;
}
else
{
// Sort entire result array
//std::sort(mResult.begin(), mResult.end());
std.algorithm.sort(mResult);//TODO Specify SortStrategy?
}
}
return mResult;
}
/** Executes the query and returns each match through a listener interface.
@remarks
Note that this method does not store the results of the query internally
so does not update the 'last result' value. This means that this version of
execute is more lightweight and therefore more efficient than the version
which returns the results as a collection.
*/
abstract void execute(RaySceneQueryListener listener);
/** Gets the results of the last query that was run using this object, provided
the query was executed using the collection-returning version of execute.
*/
RaySceneQueryResult getLastResults()
{
return mResult;
}
/** Clears the results of the last query execution.
@remarks
You only need to call this if you specifically want to free up the memory
used by this object to hold the last query results. This object clears the
results itself when executing and when destroying itself.
*/
void clearResults()
{
// C++ idiom to free vector buffer: swap with empty vector
//RaySceneQueryResult().swap(mResult);
mResult.clear();
}
/** Self-callback in order to deal with execute which returns collection. */
bool queryResult(MovableObject obj, Real distance)
{
// Add to internal list
RaySceneQueryResultEntry dets;
dets.distance = distance;
dets.movable = obj;
dets.worldFragment = null;
mResult.insert(dets);
// Continue
return true;
}
/** Self-callback in order to deal with execute which returns collection. */
bool queryResult(SceneQuery.WorldFragment fragment, Real distance)
{
// Add to internal list
RaySceneQueryResultEntry dets;
dets.distance = distance;
dets.movable = null;
dets.worldFragment = &fragment;
mResult.insert(dets);
// Continue
return true;
}
}
/** Alternative listener class for dealing with IntersectionSceneQuery.
@remarks
Because the IntersectionSceneQuery returns results in pairs, rather than singularly,
the listener interface must be customised from the standard SceneQueryListener.
*/
interface IntersectionSceneQueryListener
{
/** Called when 2 movable objects intersect one another.
@remarks
As with SceneQueryListener, the implementor of this method should return 'true'
if further results are required, or 'false' to abandon any further results from
the current query.
*/
bool queryResult(MovableObject first, MovableObject second);
/** Called when a movable intersects a world fragment.
@remarks
As with SceneQueryListener, the implementor of this method should return 'true'
if further results are required, or 'false' to abandon any further results from
the current query.
*/
bool queryResult(MovableObject movable, SceneQuery.WorldFragment fragment);
/* NB there are no results for world fragments intersecting other world fragments;
it is assumed that world geometry is either static or at least that self-intersections
are irrelevant or dealt with elsewhere (such as the custom scene manager) */
}
//typedef std::pair<MovableObject*, MovableObject*> SceneQueryMovableObjectPair;
//typedef std::pair<MovableObject*, SceneQuery::WorldFragment*> SceneQueryMovableObjectWorldFragmentPair;
//typedef list<SceneQueryMovableObjectPair>::type SceneQueryMovableIntersectionList;
//typedef list<SceneQueryMovableObjectWorldFragmentPair>::type SceneQueryMovableWorldFragmentIntersectionList;
alias pair!(MovableObject, MovableObject) SceneQueryMovableObjectPair;
alias pair!(MovableObject, SceneQuery.WorldFragment) SceneQueryMovableObjectWorldFragmentPair;
alias SceneQueryMovableObjectPair[] SceneQueryMovableIntersectionList;
alias SceneQueryMovableObjectWorldFragmentPair[] SceneQueryMovableWorldFragmentIntersectionList;
/** Holds the results of an intersection scene query (pair values). */
struct IntersectionSceneQueryResult //: public SceneMgtAlloc
{
/// List of movable / movable intersections (entities, particle systems etc)
SceneQueryMovableIntersectionList movables2movables;
/// List of movable / world intersections
SceneQueryMovableWorldFragmentIntersectionList movables2world;
}
/** Separate SceneQuery class to query for pairs of objects which are
possibly intersecting one another.
@remarks
This SceneQuery subclass considers the whole world and returns pairs of objects
which are close enough to each other that they may be intersecting. Because of
this slightly different focus, the return types and listener interface are
different for this class.
*/
class IntersectionSceneQuery : SceneQuery, IntersectionSceneQueryListener
{
protected:
IntersectionSceneQueryResult* mLastResult;
public:
this(SceneManager mgr)
{
super(mgr);
}
~this()
{
clearResults();
}
/** Executes the query, returning the results back in one list.
@remarks
This method executes the scene query as configured, gathers the results
into one structure and returns a reference to that structure. These
results will also persist in this query object until the next query is
executed, or clearResults() is called. An more lightweight version of
this method that returns results through a listener is also available.
*/
IntersectionSceneQueryResult* execute()
{
clearResults();
mLastResult = new IntersectionSceneQueryResult();
// Call callback version with self as listener
execute(this);
return mLastResult;
}
/** Executes the query and returns each match through a listener interface.
@remarks
Note that this method does not store the results of the query internally
so does not update the 'last result' value. This means that this version of
execute is more lightweight and therefore more efficient than the version
which returns the results as a collection.
*/
abstract void execute(IntersectionSceneQueryListener listener);
/** Gets the results of the last query that was run using this object, provided
the query was executed using the collection-returning version of execute.
*/
IntersectionSceneQueryResult* getLastResults()
{
assert(mLastResult);
return mLastResult;
}
/** Clears the results of the last query execution.
@remarks
You only need to call this if you specifically want to free up the memory
used by this object to hold the last query results. This object clears the
results itself when executing and when destroying itself.
*/
void clearResults()
{
if (mLastResult)
{
destroy(mLastResult);
}
mLastResult = null;
}
/** Self-callback in order to deal with execute which returns collection. */
bool queryResult(MovableObject first, MovableObject second)
{
// Add to internal list
mLastResult.movables2movables.insert(
SceneQueryMovableObjectPair(first, second)
);
// Continue
return true;
}
/** Self-callback in order to deal with execute which returns collection. */
bool queryResult(MovableObject movable, SceneQuery.WorldFragment fragment)
{
// Add to internal list
mLastResult.movables2world.insert(
SceneQueryMovableObjectWorldFragmentPair(movable, fragment)
);
// Continue
return true;
}
}
| D |
/Users/glutton/projects/rust-practice/thread/target/rls/debug/deps/4-ac4eb94c036b920c.rmeta: src/4.rs
/Users/glutton/projects/rust-practice/thread/target/rls/debug/deps/4-ac4eb94c036b920c.d: src/4.rs
src/4.rs:
| D |
a score in baseball made by a runner touching all four bases safely
a bill for an amount due
the act of counting
be compatible, similar or consistent
gain points in a game
keep score, as in games
determine the sum of
| D |
extensive tract of level open land
a basic knitting stitch
express complaints, discontent, displeasure, or unhappiness
clearly revealed to the mind or the senses or judgment
not elaborate or elaborated
lacking patterns especially in color
not mixed with extraneous elements
free from any effort to soften to disguise
lacking embellishment or ornamentation
lacking in physical beauty or proportion
unmistakably (`plain' is often used informally for `plainly'
| D |
module android.java.java.util.function_.IntConsumer_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.function_.IntConsumer_d_interface;
final class IntConsumer : IJavaObject {
static immutable string[] _d_canCastTo = [
];
@Import void accept(int);
@Import import0.IntConsumer andThen(import0.IntConsumer);
@Import import1.Class getClass();
@Import int hashCode();
@Import bool equals(IJavaObject);
@Import @JavaName("toString") string toString_();
override string toString() { return arsd.jni.javaObjectToString(this); }
@Import void notify();
@Import void notifyAll();
@Import void wait(long);
@Import void wait(long, int);
@Import void wait();
mixin IJavaObjectImplementation!(false);
public static immutable string _javaParameterString = "Ljava/util/function/IntConsumer;";
}
| D |
module dau.system;
import dau.input;
abstract class System(SceneType) {
this(SceneType scene) {
_scene = scene;
}
@property {
bool active() { return _active; }
void active(bool val) {
if (!active && val) {
start();
}
else if (active && !val) {
stop();
}
_active = val;
}
auto scene() { return _scene; }
}
void update(float time, InputManager input);
void start();
void stop();
private bool _active;
private SceneType _scene;
}
| D |
: C B L A S _ C T B M V EXAMPLE PROGRAM DATA
4 2 :Values of N, K
1 :Values of INCX
122 111 131 101 :Values of UPLO, TRANS, DIAG, ORDER
(1.0, 0.0) (2.0, 0.0) (3.0, 0.0) (4.0, 0.0) :Values of vector X
( 1.0, 0.0)
( 2.0, 0.0) ( 6.0, 0.0)
(3.0, 0.0) ( 7.0, 0.0) (11.0, 0.0)
(8.0, 0.0) (12.0, 0.0) (16.0, 0.0) :Values of array A
| D |
import sassed.console : SassConsole;
import std.stdio : writeln;
import std.c.stdlib : exit;
void main( string[] args )
{
try
{
auto sassConsole = new SassConsole( args );
sassConsole.run();
}
catch( Exception e )
{
writeln( e.msg );
exit( -1 );
}
} | D |
a small native range horse
| D |
instance DJG_7080_KURGAN(Npc_Default)
{
name[0] = "Kurgan";
guild = GIL_OUT;
id = 7080;
voice = 1;
flags = 0;
npcType = npctype_main;
aivar[AIV_DropDeadAndKill] = TRUE;
B_SetAttributesToChapter(self,6);
fight_tactic = FAI_HUMAN_MASTER;
EquipItem(self,itmw_kurgansword);
EquipItem(self,ItRw_Crossbow_M_01);
CreateInvItems(self,ItRw_Bolt,10);
B_CreateAmbientInv(self);
B_SetNpcVisual(self,MALE,"Hum_Head_FatBald",Face_N_ImportantGrey,BodyTex_N,itar_djg_h_NPC);
Mdl_SetModelFatness(self,2);
Mdl_ApplyOverlayMds(self,"Humans_Militia.mds");
B_GiveNpcTalents(self);
B_SetFightSkills(self,80);
daily_routine = rtn_prestart_7080;
};
func void rtn_prestart_7080()
{
TA_Stand_Guarding(8,0,21,0,"NW_ENTERVALLEY_DJG_01");
TA_Stand_Guarding(21,0,8,0,"NW_ENTERVALLEY_DJG_01");
};
func void rtn_start_7080()
{
TA_Stand_Guarding(8,0,21,0,"NW_BIGFARM_KURGAN");
TA_Stand_Guarding(21,0,8,0,"NW_BIGFARM_KURGAN");
};
func void rtn_tot_7080()
{
TA_Stand_Guarding(8,0,23,0,"TOT");
TA_Stand_Guarding(23,0,8,0,"TOT");
};
func void rtn_inbattle_7080()
{
ta_bigfight(8,0,22,0,"NW_BIGFIGHT_8760");
ta_bigfight(22,0,8,0,"NW_BIGFIGHT_8760");
};
| D |
go or come back to place, condition, or activity where one has been before
give back
go back to a previous state
go back to something earlier
bring back to the point of departure
return in kind
make a return
answer back
be restored
pay back
pass down
elect again
be inherited by
return to a previous position
give or supply
submit (a report, etc.) to someone in authority
| D |
module UnrealScript.UnrealEd.ModelExporterT3D;
import ScriptClasses;
import UnrealScript.Helpers;
import UnrealScript.Core.Exporter;
extern(C++) interface ModelExporterT3D : Exporter
{
public extern(D):
private static __gshared ScriptClass mStaticClass;
@property final static ScriptClass StaticClass() { mixin(MGSCC("Class UnrealEd.ModelExporterT3D")); }
private static __gshared ModelExporterT3D mDefaultProperties;
@property final static ModelExporterT3D DefaultProperties() { mixin(MGDPC("ModelExporterT3D", "ModelExporterT3D UnrealEd.Default__ModelExporterT3D")); }
}
| D |
a ceremony at which a dead person is buried or cremated
| D |
/**
Copyright 2019 Mark Fisher
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
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 AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
**/
module dxx.alg.container;
import dxx.alg.lambda;
import std.traits,
std.algorithm,
std.typetuple;
version(unittest) {
import std.stdio,
std.conv;
import core.stdc.stdarg;
}
template Map(alias Func,args...) {
static if (args.length > 1)
alias Map = TypeTuple!(Apply!(Func,args[0]),Map!(Func,args[1..$]));
else
alias Map = Apply!(Func,args[0]);
}
unittest {
static void test(int x,int y,int z) {
assert(x==4 && y==5 && z==6);
}
static int add2(int a) { return a+2; }
int a=2,b=3,c=4;
test(Map!(add2,a,b,c));
test(Map!(add2,2,3,4));
alias x = Map!(add2,2,3,4);
test(x);
}
unittest {
static int square(int arg)
{
return arg * arg;
}
static int refSquare(ref int arg)
{
arg *= arg;
return arg;
}
static ref int refRetSquare(ref int arg)
{
arg *= arg;
return arg;
}
static void test(int a, int b)
{
assert(a == 4);
assert(b == 16);
}
static void testRef(ref int a, ref int b)
{
assert(a++ == 16);
assert(b++ == 256);
}
static int a = 2;
static int b = 4;
test(Map!(square, a, b));
test(Map!(refSquare, a, b));
assert(a == 4);
assert(b == 16);
testRef(Map!(refRetSquare, a, b));
assert(a == 17);
assert(b == 257);
}
//template Reduce(alias Func,alias Param,args...) {
//static if (args.length > 1)
// alias Reduce = Apply!(Func,args[0],Reduce!(Func,args[1..$]));
//else
// alias Reduce = Apply!(Func,args[0],Param);
//}
//
template removeElement(T,alias V) {
auto ref removeElement(ref T t) { return t.remove(a => a is V); }
}
| D |
/**
* Compiler implementation of the
* $(LINK2 http://www.dlang.org, D programming language).
*
* Copyright: Copyright (C) 1996-1998 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/drtlsym.d, backend/drtlsym.d)
*/
module dmd.backend.drtlsym;
version (SCPP)
version = COMPILE;
version (MARS)
version = COMPILE;
version (HTOD)
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.code;
import dmd.backend.code_x86;
import dmd.backend.global;
import dmd.backend.rtlsym;
import dmd.backend.symtab;
import dmd.backend.ty;
import dmd.backend.type;
extern (C++):
nothrow:
version (HTOD)
__gshared uint ALLREGS;
private __gshared Symbol*[RTLSYM_MAX] rtlsym;
version (MARS)
// This varies depending on C ABI
alias FREGSAVED = fregsaved;
else
enum FREGSAVED = (mBP | mBX | mSI | mDI);
/******************************************
* Get Symbol corresponding to Dwarf "personality" function.
* Returns:
* Personality function
*/
Symbol* getRtlsymPersonality() { return getRtlsym(RTLSYM_PERSONALITY); }
/******************************************
* Get Symbol corresponding to i.
* Params:
* i = RTLSYM_xxxx
* Returns:
* runtime library Symbol
*/
Symbol *getRtlsym(int i)
{
Symbol** ps = &rtlsym[i];
if (*ps)
return *ps;
__gshared type* t;
__gshared type* tv;
if (!t)
{
t = type_fake(TYnfunc);
t.Tmangle = mTYman_c;
t.Tcount++;
// Variadic function
tv = type_fake(TYnfunc);
tv.Tmangle = mTYman_c;
tv.Tcount++;
}
// Only used by dmd1 for RTLSYM_THROW
type *tw = null;
// Lazilly initialize only what we use
switch (i)
{
case RTLSYM_THROW: symbolz(ps,FLfunc,(mES | mBP),"_d_throw@4", SFLexit, tw); break;
case RTLSYM_THROWC: symbolz(ps,FLfunc,(mES | mBP),"_d_throwc", SFLexit, t); break;
case RTLSYM_THROWDWARF: symbolz(ps,FLfunc,(mES | mBP),"_d_throwdwarf", SFLexit, t); break;
case RTLSYM_MONITOR_HANDLER: symbolz(ps,FLfunc,FREGSAVED,"_d_monitor_handler", 0, tsclib); break;
case RTLSYM_MONITOR_PROLOG: symbolz(ps,FLfunc,FREGSAVED,"_d_monitor_prolog",0,t); break;
case RTLSYM_MONITOR_EPILOG: symbolz(ps,FLfunc,FREGSAVED,"_d_monitor_epilog",0,t); break;
case RTLSYM_DCOVER: symbolz(ps,FLfunc,FREGSAVED,"_d_cover_register", 0, t); break;
case RTLSYM_DCOVER2: symbolz(ps,FLfunc,FREGSAVED,"_d_cover_register2", 0, t); break;
case RTLSYM_DASSERT: symbolz(ps,FLfunc,FREGSAVED,"_d_assert", SFLexit, t); break;
case RTLSYM_DASSERTP: symbolz(ps,FLfunc,FREGSAVED,"_d_assertp", SFLexit, t); break;
case RTLSYM_DASSERT_MSG: symbolz(ps,FLfunc,FREGSAVED,"_d_assert_msg", SFLexit, t); break;
case RTLSYM_DUNITTEST: symbolz(ps,FLfunc,FREGSAVED,"_d_unittest", 0, t); break;
case RTLSYM_DUNITTESTP: symbolz(ps,FLfunc,FREGSAVED,"_d_unittestp", 0, t); break;
case RTLSYM_DUNITTEST_MSG: symbolz(ps,FLfunc,FREGSAVED,"_d_unittest_msg", 0, t); break;
case RTLSYM_DARRAY: symbolz(ps,FLfunc,FREGSAVED,"_d_arraybounds", SFLexit, t); break;
case RTLSYM_DARRAYP: symbolz(ps,FLfunc,FREGSAVED,"_d_arrayboundsp", SFLexit, t); break;
case RTLSYM_DARRAY_SLICEP: symbolz(ps,FLfunc,FREGSAVED,"_d_arraybounds_slicep", SFLexit, t); break;
case RTLSYM_DARRAY_INDEXP: symbolz(ps,FLfunc,FREGSAVED,"_d_arraybounds_indexp", SFLexit, t); break;
case RTLSYM_DINVARIANT: symbolz(ps,FLfunc,FREGSAVED,"_D9invariant12_d_invariantFC6ObjectZv", 0, tsdlib); break;
case RTLSYM_MEMCPY: symbolz(ps,FLfunc,FREGSAVED,"memcpy", 0, t); break;
case RTLSYM_MEMSET8: symbolz(ps,FLfunc,FREGSAVED,"memset", 0, t); break;
case RTLSYM_MEMSET16: symbolz(ps,FLfunc,FREGSAVED,"_memset16", 0, t); break;
case RTLSYM_MEMSET32: symbolz(ps,FLfunc,FREGSAVED,"_memset32", 0, t); break;
case RTLSYM_MEMSET64: symbolz(ps,FLfunc,FREGSAVED,"_memset64", 0, t); break;
case RTLSYM_MEMSET128: symbolz(ps,FLfunc,FREGSAVED,"_memset128",0, t); break;
case RTLSYM_MEMSET128ii: symbolz(ps,FLfunc,FREGSAVED,"_memset128ii",0, t); break;
case RTLSYM_MEMSET80: symbolz(ps,FLfunc,FREGSAVED,"_memset80", 0, t); break;
case RTLSYM_MEMSET160: symbolz(ps,FLfunc,FREGSAVED,"_memset160",0, t); break;
case RTLSYM_MEMSETFLOAT: symbolz(ps,FLfunc,FREGSAVED,"_memsetFloat", 0, t); break;
case RTLSYM_MEMSETDOUBLE: symbolz(ps,FLfunc,FREGSAVED,"_memsetDouble", 0, t); break;
case RTLSYM_MEMSETSIMD: symbolz(ps,FLfunc,FREGSAVED,"_memsetSIMD",0, t); break;
case RTLSYM_MEMSETN: symbolz(ps,FLfunc,FREGSAVED,"_memsetn", 0, t); break;
case RTLSYM_MODULO: symbolz(ps,FLfunc,FREGSAVED,"_modulo", 0, t); break;
case RTLSYM_MONITORENTER: symbolz(ps,FLfunc,FREGSAVED,"_d_monitorenter",0, t); break;
case RTLSYM_MONITOREXIT: symbolz(ps,FLfunc,FREGSAVED,"_d_monitorexit",0, t); break;
case RTLSYM_CRITICALENTER: symbolz(ps,FLfunc,FREGSAVED,"_d_criticalenter",0, t); break;
case RTLSYM_CRITICALEXIT: symbolz(ps,FLfunc,FREGSAVED,"_d_criticalexit",0, t); break;
case RTLSYM_DSWITCHERR: symbolz(ps,FLfunc,FREGSAVED,"_d_switch_error", SFLexit, t); break;
case RTLSYM_DHIDDENFUNC: symbolz(ps,FLfunc,FREGSAVED,"_d_hidden_func", 0, t); break;
case RTLSYM_NEWCLASS: symbolz(ps,FLfunc,FREGSAVED,"_d_newclass", 0, t); break;
case RTLSYM_NEWTHROW: symbolz(ps,FLfunc,FREGSAVED,"_d_newThrowable", 0, t); break;
case RTLSYM_NEWARRAYT: symbolz(ps,FLfunc,FREGSAVED,"_d_newarrayT", 0, t); break;
case RTLSYM_NEWARRAYIT: symbolz(ps,FLfunc,FREGSAVED,"_d_newarrayiT", 0, t); break;
case RTLSYM_NEWITEMT: symbolz(ps,FLfunc,FREGSAVED,"_d_newitemT", 0, t); break;
case RTLSYM_NEWITEMIT: symbolz(ps,FLfunc,FREGSAVED,"_d_newitemiT", 0, t); break;
case RTLSYM_NEWARRAYMTX: symbolz(ps,FLfunc,FREGSAVED,"_d_newarraymTX", 0, t); break;
case RTLSYM_NEWARRAYMITX: symbolz(ps,FLfunc,FREGSAVED,"_d_newarraymiTX", 0, t); break;
case RTLSYM_ARRAYLITERALTX: symbolz(ps,FLfunc,FREGSAVED,"_d_arrayliteralTX", 0, t); break;
case RTLSYM_ASSOCARRAYLITERALTX: symbolz(ps,FLfunc,FREGSAVED,"_d_assocarrayliteralTX", 0, t); break;
case RTLSYM_CALLFINALIZER: symbolz(ps,FLfunc,FREGSAVED,"_d_callfinalizer", 0, t); break;
case RTLSYM_CALLINTERFACEFINALIZER: symbolz(ps,FLfunc,FREGSAVED,"_d_callinterfacefinalizer", 0, t); break;
case RTLSYM_DELCLASS: symbolz(ps,FLfunc,FREGSAVED,"_d_delclass", 0, t); break;
case RTLSYM_DELINTERFACE: symbolz(ps,FLfunc,FREGSAVED,"_d_delinterface", 0, t); break;
case RTLSYM_DELSTRUCT: symbolz(ps,FLfunc,FREGSAVED,"_d_delstruct", 0, t); break;
case RTLSYM_ALLOCMEMORY: symbolz(ps,FLfunc,FREGSAVED,"_d_allocmemory", 0, t); break;
case RTLSYM_DELARRAYT: symbolz(ps,FLfunc,FREGSAVED,"_d_delarray_t", 0, t); break;
case RTLSYM_DELMEMORY: symbolz(ps,FLfunc,FREGSAVED,"_d_delmemory", 0, t); break;
case RTLSYM_INTERFACE: symbolz(ps,FLfunc,FREGSAVED,"_d_interface_vtbl", 0, t); break;
case RTLSYM_DYNAMIC_CAST: symbolz(ps,FLfunc,FREGSAVED,"_d_dynamic_cast", 0, t); break;
case RTLSYM_INTERFACE_CAST: symbolz(ps,FLfunc,FREGSAVED,"_d_interface_cast", 0, t); break;
case RTLSYM_FATEXIT: symbolz(ps,FLfunc,FREGSAVED,"_fatexit", 0, t); break;
case RTLSYM_ARRAYCATT: symbolz(ps,FLfunc,FREGSAVED,"_d_arraycatT", 0, t); break;
case RTLSYM_ARRAYCATNTX: symbolz(ps,FLfunc,FREGSAVED,"_d_arraycatnTX", 0, t); break;
case RTLSYM_ARRAYAPPENDT: symbolz(ps,FLfunc,FREGSAVED,"_d_arrayappendT", 0, t); break;
case RTLSYM_ARRAYAPPENDCTX: symbolz(ps,FLfunc,FREGSAVED,"_d_arrayappendcTX", 0, t); break;
case RTLSYM_ARRAYAPPENDCD: symbolz(ps,FLfunc,FREGSAVED,"_d_arrayappendcd", 0, t); break;
case RTLSYM_ARRAYAPPENDWD: symbolz(ps,FLfunc,FREGSAVED,"_d_arrayappendwd", 0, t); break;
case RTLSYM_ARRAYSETLENGTHT: symbolz(ps,FLfunc,FREGSAVED,"_d_arraysetlengthT", 0, t); break;
case RTLSYM_ARRAYSETLENGTHIT: symbolz(ps,FLfunc,FREGSAVED,"_d_arraysetlengthiT", 0, t); break;
case RTLSYM_ARRAYCOPY: symbolz(ps,FLfunc,FREGSAVED,"_d_arraycopy", 0, t); break;
case RTLSYM_ARRAYASSIGN: symbolz(ps,FLfunc,FREGSAVED,"_d_arrayassign", 0, t); break;
case RTLSYM_ARRAYASSIGN_R: symbolz(ps,FLfunc,FREGSAVED,"_d_arrayassign_r", 0, t); break;
case RTLSYM_ARRAYASSIGN_L: symbolz(ps,FLfunc,FREGSAVED,"_d_arrayassign_l", 0, t); break;
case RTLSYM_ARRAYCTOR: symbolz(ps,FLfunc,FREGSAVED,"_d_arrayctor", 0, t); break;
case RTLSYM_ARRAYSETASSIGN: symbolz(ps,FLfunc,FREGSAVED,"_d_arraysetassign", 0, t); break;
case RTLSYM_ARRAYSETCTOR: symbolz(ps,FLfunc,FREGSAVED,"_d_arraysetctor", 0, t); break;
case RTLSYM_ARRAYEQ2: symbolz(ps,FLfunc,FREGSAVED,"_adEq2", 0, t); break;
case RTLSYM_ARRAYCMPCHAR: symbolz(ps,FLfunc,FREGSAVED,"_adCmpChar", 0, t); break;
case RTLSYM_EXCEPT_HANDLER2: symbolz(ps,FLfunc,fregsaved,"_except_handler2", 0, tsclib); break;
case RTLSYM_EXCEPT_HANDLER3: symbolz(ps,FLfunc,fregsaved,"_except_handler3", 0, tsclib); break;
case RTLSYM_CPP_HANDLER: symbolz(ps,FLfunc,FREGSAVED,"_cpp_framehandler", 0, tsclib); break;
case RTLSYM_D_HANDLER: symbolz(ps,FLfunc,FREGSAVED,"_d_framehandler", 0, tsclib); break;
case RTLSYM_D_LOCAL_UNWIND2: symbolz(ps,FLfunc,FREGSAVED,"_d_local_unwind2", 0, tsclib); break;
case RTLSYM_LOCAL_UNWIND2: symbolz(ps,FLfunc,FREGSAVED,"_local_unwind2", 0, tsclib); break;
case RTLSYM_UNWIND_RESUME: symbolz(ps,FLfunc,FREGSAVED,"_Unwind_Resume", SFLexit, t); break;
case RTLSYM_PERSONALITY: symbolz(ps,FLfunc,FREGSAVED,"__dmd_personality_v0", 0, t); break;
case RTLSYM_BEGIN_CATCH: symbolz(ps,FLfunc,FREGSAVED,"__dmd_begin_catch", 0, t); break;
case RTLSYM_CXA_BEGIN_CATCH: symbolz(ps,FLfunc,FREGSAVED,"__cxa_begin_catch", 0, t); break;
case RTLSYM_CXA_END_CATCH: symbolz(ps,FLfunc,FREGSAVED,"__cxa_end_catch", 0, t); break;
case RTLSYM_TLS_INDEX: symbolz(ps,FLextern,0,"_tls_index",0,tstypes[TYint]); break;
case RTLSYM_TLS_ARRAY: symbolz(ps,FLextern,0,"_tls_array",0,tspvoid); break;
case RTLSYM_AHSHIFT: symbolz(ps,FLfunc,0,"_AHSHIFT",0,tstrace); break;
case RTLSYM_HDIFFN: symbolz(ps,FLfunc,mBX|mCX|mSI|mDI|mBP|mES,"_aNahdiff", 0, tsclib); break;
case RTLSYM_HDIFFF: symbolz(ps,FLfunc,mBX|mCX|mSI|mDI|mBP|mES,"_aFahdiff", 0, tsclib); break;
case RTLSYM_INTONLY: symbolz(ps,FLfunc,mSI|mDI,"_intonly", 0, tsclib); break;
case RTLSYM_EXCEPT_LIST: symbolz(ps,FLextern,0,"_except_list",0,tstypes[TYint]); break;
case RTLSYM_SETJMP3: symbolz(ps,FLfunc,FREGSAVED,"_setjmp3", 0, tsclib); break;
case RTLSYM_LONGJMP: symbolz(ps,FLfunc,FREGSAVED,"_seh_longjmp_unwind@4", 0, tsclib); break;
case RTLSYM_ALLOCA: symbolz(ps,FLfunc,fregsaved,"__alloca", 0, tsclib); break;
case RTLSYM_CPP_LONGJMP: symbolz(ps,FLfunc,FREGSAVED,"_cpp_longjmp_unwind@4", 0, tsclib); break;
case RTLSYM_PTRCHK: symbolz(ps,FLfunc,fregsaved,"_ptrchk", 0, tsclib); break;
case RTLSYM_CHKSTK: symbolz(ps,FLfunc,fregsaved,"_chkstk", 0, tsclib); break;
case RTLSYM_TRACE_PRO_N: symbolz(ps,FLfunc,ALLREGS|mBP|mES,"_trace_pro_n",0,tstrace); break;
case RTLSYM_TRACE_PRO_F: symbolz(ps,FLfunc,ALLREGS|mBP|mES,"_trace_pro_f",0,tstrace); break;
case RTLSYM_TRACE_EPI_N: symbolz(ps,FLfunc,ALLREGS|mBP|mES,"_trace_epi_n",0,tstrace); break;
case RTLSYM_TRACE_EPI_F: symbolz(ps,FLfunc,ALLREGS|mBP|mES,"_trace_epi_f",0,tstrace); break;
case RTLSYM_TRACE_CPRO: symbolz(ps,FLfunc,FREGSAVED,"_c_trace_pro",0,t); break;
case RTLSYM_TRACE_CEPI: symbolz(ps,FLfunc,FREGSAVED,"_c_trace_epi",0,t); break;
case RTLSYM_TRACENEWCLASS: symbolz(ps,FLfunc,FREGSAVED,"_d_newclassTrace", 0, t); break;
case RTLSYM_TRACENEWARRAYT: symbolz(ps,FLfunc,FREGSAVED,"_d_newarrayTTrace", 0, t); break;
case RTLSYM_TRACENEWARRAYIT: symbolz(ps,FLfunc,FREGSAVED,"_d_newarrayiTTrace", 0, t); break;
case RTLSYM_TRACENEWARRAYMTX: symbolz(ps,FLfunc,FREGSAVED,"_d_newarraymTXTrace", 0, t); break;
case RTLSYM_TRACENEWARRAYMITX: symbolz(ps,FLfunc,FREGSAVED,"_d_newarraymiTXTrace", 0, t); break;
case RTLSYM_TRACENEWITEMT: symbolz(ps,FLfunc,FREGSAVED,"_d_newitemTTrace", 0, t); break;
case RTLSYM_TRACENEWITEMIT: symbolz(ps,FLfunc,FREGSAVED,"_d_newitemiTTrace", 0, t); break;
case RTLSYM_TRACECALLFINALIZER: symbolz(ps,FLfunc,FREGSAVED,"_d_callfinalizerTrace", 0, t); break;
case RTLSYM_TRACECALLINTERFACEFINALIZER: symbolz(ps,FLfunc,FREGSAVED,"_d_callinterfacefinalizerTrace", 0, t); break;
case RTLSYM_TRACEDELCLASS: symbolz(ps,FLfunc,FREGSAVED,"_d_delclassTrace", 0, t); break;
case RTLSYM_TRACEDELINTERFACE: symbolz(ps,FLfunc,FREGSAVED,"_d_delinterfaceTrace", 0, t); break;
case RTLSYM_TRACEDELSTRUCT: symbolz(ps,FLfunc,FREGSAVED,"_d_delstructTrace", 0, t); break;
case RTLSYM_TRACEDELARRAYT: symbolz(ps,FLfunc,FREGSAVED,"_d_delarray_tTrace", 0, t); break;
case RTLSYM_TRACEDELMEMORY: symbolz(ps,FLfunc,FREGSAVED,"_d_delmemoryTrace", 0, t); break;
case RTLSYM_TRACEARRAYLITERALTX: symbolz(ps,FLfunc,FREGSAVED,"_d_arrayliteralTXTrace", 0, t); break;
case RTLSYM_TRACEASSOCARRAYLITERALTX: symbolz(ps,FLfunc,FREGSAVED,"_d_assocarrayliteralTXTrace", 0, t); break;
case RTLSYM_TRACEARRAYCATT: symbolz(ps,FLfunc,FREGSAVED,"_d_arraycatTTrace", 0, t); break;
case RTLSYM_TRACEARRAYCATNTX: symbolz(ps,FLfunc,FREGSAVED,"_d_arraycatnTXTrace", 0, t); break;
case RTLSYM_TRACEARRAYAPPENDT: symbolz(ps,FLfunc,FREGSAVED,"_d_arrayappendTTrace", 0, t); break;
case RTLSYM_TRACEARRAYAPPENDCTX: symbolz(ps,FLfunc,FREGSAVED,"_d_arrayappendcTXTrace", 0, t); break;
case RTLSYM_TRACEARRAYAPPENDCD: symbolz(ps,FLfunc,FREGSAVED,"_d_arrayappendcdTrace", 0, t); break;
case RTLSYM_TRACEARRAYAPPENDWD: symbolz(ps,FLfunc,FREGSAVED,"_d_arrayappendwdTrace", 0, t); break;
case RTLSYM_TRACEARRAYSETLENGTHT: symbolz(ps,FLfunc,FREGSAVED,"_d_arraysetlengthTTrace", 0, t); break;
case RTLSYM_TRACEARRAYSETLENGTHIT: symbolz(ps,FLfunc,FREGSAVED,"_d_arraysetlengthiTTrace", 0, t); break;
case RTLSYM_TRACEALLOCMEMORY: symbolz(ps,FLfunc,FREGSAVED,"_d_allocmemoryTrace", 0, t); break;
case RTLSYM_C_ASSERT: symbolz(ps,FLfunc,FREGSAVED,"_assert", SFLexit, t); break;
case RTLSYM_C__ASSERT: symbolz(ps,FLfunc,FREGSAVED,"__assert", SFLexit, t); break;
case RTLSYM_C__ASSERT_FAIL: symbolz(ps,FLfunc,FREGSAVED,"__assert_fail", SFLexit, t); break;
case RTLSYM_C__ASSERT_RTN: symbolz(ps,FLfunc,FREGSAVED,"__assert_rtn", SFLexit, t); break;
default:
assert(0);
}
return *ps;
}
/******************************************
* Create and initialize Symbol for runtime function.
* Params:
* ps = where to store initialized Symbol pointer
* f = FLxxx
* regsaved = registers not altered by function
* name = name of function
* flags = value for Sflags
* t = type of function
*/
private void symbolz(Symbol** ps, int fl, regm_t regsaved, const(char)* name, SYMFLGS flags, type *t)
{
Symbol *s = symbol_calloc(name);
s.Stype = t;
s.Ssymnum = SYMIDX.max;
s.Sclass = SCextern;
s.Sfl = cast(char)fl;
s.Sregsaved = regsaved;
s.Sflags = flags;
*ps = s;
}
/******************************************
* Initialize rtl symbols.
*/
void rtlsym_init()
{
}
/*******************************
* Reset the symbols for the case when we are generating multiple
* .OBJ files from one compile.
*/
version (MARS)
{
void rtlsym_reset()
{
clib_inited = 0; // reset CLIB symbols, too
for (size_t i = 0; i < RTLSYM_MAX; i++)
{
if (rtlsym[i])
{
rtlsym[i].Sxtrnnum = 0;
rtlsym[i].Stypidx = 0;
}
}
}
}
/*******************************
*/
void rtlsym_term()
{
}
}
| D |
/home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/NIO.build/Selectable.swift.o : /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/IO.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/NonBlockingFileIO.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/IOData.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/Codec.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/Thread.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/Embedded.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/Selectable.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/FileHandle.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/ChannelPipeline.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/AddressedEnvelope.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/ByteBuffer-core.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/PriorityQueue.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/Channel.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/DeadChannel.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/SocketChannel.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/BaseSocketChannel.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/MulticastChannel.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/BlockingIOThreadPool.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/System.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/FileRegion.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/ContiguousCollection.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/ChannelOption.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/Heap.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/Bootstrap.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/SocketOptionProvider.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/CircularBuffer.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/MarkedCircularBuffer.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/PendingWritesManager.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/PendingDatagramWritesManager.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/ChannelInvoker.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/ChannelHandler.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/TypeAssistedChannelHandler.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/Resolver.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/GetaddrinfoResolver.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/CompositeError.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/RecvByteBufferAllocator.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/Selector.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/FileDescriptor.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/Interfaces.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/Utilities.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/IntegerTypes.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/SocketAddresses.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/HappyEyeballs.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/ChannelHandlers.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/ByteBuffer-views.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/LinuxCPUSet.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/Socket.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/BaseSocket.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/ServerSocket.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/ByteBuffer-int.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/ByteBuffer-aux.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/Linux.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/NIOAny.swift /usr/share/swift/usr/lib/swift/linux/x86_64/Glibc.swiftmodule /usr/share/swift/usr/lib/swift/linux/x86_64/Dispatch.swiftmodule /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/NIOConcurrencyHelpers.swiftmodule /usr/share/swift/usr/lib/swift/linux/x86_64/Swift.swiftmodule /usr/share/swift/usr/lib/swift/linux/x86_64/SwiftOnoneSupport.swiftmodule /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/cpp_magic.h /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/CNIOLinux/include/ifaddrs-android.h /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.h /usr/share/swift/usr/lib/swift/linux/x86_64/glibc.modulemap /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/CNIOSHA1.build/module.modulemap /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/CNIOOpenSSL.build/module.modulemap /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/CCryptoOpenSSL.build/module.modulemap /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/CNIOZlib.build/module.modulemap /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/CNIODarwin.build/module.modulemap /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/CNIOHTTPParser.build/module.modulemap /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/CNIOAtomics.build/module.modulemap /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/CNIOLinux.build/module.modulemap /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio-zlib-support/module.modulemap
/home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/NIO.build/Selectable~partial.swiftmodule : /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/IO.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/NonBlockingFileIO.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/IOData.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/Codec.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/Thread.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/Embedded.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/Selectable.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/FileHandle.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/ChannelPipeline.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/AddressedEnvelope.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/ByteBuffer-core.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/PriorityQueue.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/Channel.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/DeadChannel.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/SocketChannel.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/BaseSocketChannel.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/MulticastChannel.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/BlockingIOThreadPool.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/System.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/FileRegion.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/ContiguousCollection.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/ChannelOption.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/Heap.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/Bootstrap.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/SocketOptionProvider.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/CircularBuffer.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/MarkedCircularBuffer.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/PendingWritesManager.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/PendingDatagramWritesManager.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/ChannelInvoker.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/ChannelHandler.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/TypeAssistedChannelHandler.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/Resolver.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/GetaddrinfoResolver.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/CompositeError.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/RecvByteBufferAllocator.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/Selector.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/FileDescriptor.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/Interfaces.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/Utilities.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/IntegerTypes.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/SocketAddresses.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/HappyEyeballs.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/ChannelHandlers.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/ByteBuffer-views.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/LinuxCPUSet.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/Socket.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/BaseSocket.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/ServerSocket.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/ByteBuffer-int.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/ByteBuffer-aux.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/Linux.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/NIOAny.swift /usr/share/swift/usr/lib/swift/linux/x86_64/Glibc.swiftmodule /usr/share/swift/usr/lib/swift/linux/x86_64/Dispatch.swiftmodule /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/NIOConcurrencyHelpers.swiftmodule /usr/share/swift/usr/lib/swift/linux/x86_64/Swift.swiftmodule /usr/share/swift/usr/lib/swift/linux/x86_64/SwiftOnoneSupport.swiftmodule /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/cpp_magic.h /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/CNIOLinux/include/ifaddrs-android.h /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.h /usr/share/swift/usr/lib/swift/linux/x86_64/glibc.modulemap /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/CNIOSHA1.build/module.modulemap /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/CNIOOpenSSL.build/module.modulemap /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/CCryptoOpenSSL.build/module.modulemap /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/CNIOZlib.build/module.modulemap /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/CNIODarwin.build/module.modulemap /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/CNIOHTTPParser.build/module.modulemap /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/CNIOAtomics.build/module.modulemap /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/CNIOLinux.build/module.modulemap /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio-zlib-support/module.modulemap
/home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/NIO.build/Selectable~partial.swiftdoc : /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/IO.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/NonBlockingFileIO.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/IOData.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/Codec.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/Thread.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/Embedded.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/Selectable.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/FileHandle.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/ChannelPipeline.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/AddressedEnvelope.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/ByteBuffer-core.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/PriorityQueue.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/Channel.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/DeadChannel.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/SocketChannel.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/BaseSocketChannel.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/MulticastChannel.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/BlockingIOThreadPool.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/System.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/FileRegion.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/ContiguousCollection.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/ChannelOption.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/Heap.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/Bootstrap.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/SocketOptionProvider.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/CircularBuffer.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/MarkedCircularBuffer.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/PendingWritesManager.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/PendingDatagramWritesManager.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/ChannelInvoker.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/ChannelHandler.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/TypeAssistedChannelHandler.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/Resolver.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/GetaddrinfoResolver.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/CompositeError.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/RecvByteBufferAllocator.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/Selector.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/FileDescriptor.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/Interfaces.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/Utilities.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/IntegerTypes.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/SocketAddresses.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/HappyEyeballs.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/ChannelHandlers.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/ByteBuffer-views.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/LinuxCPUSet.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/Socket.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/BaseSocket.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/ServerSocket.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/ByteBuffer-int.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/ByteBuffer-aux.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/Linux.swift /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/NIO/NIOAny.swift /usr/share/swift/usr/lib/swift/linux/x86_64/Glibc.swiftmodule /usr/share/swift/usr/lib/swift/linux/x86_64/Dispatch.swiftmodule /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/NIOConcurrencyHelpers.swiftmodule /usr/share/swift/usr/lib/swift/linux/x86_64/Swift.swiftmodule /usr/share/swift/usr/lib/swift/linux/x86_64/SwiftOnoneSupport.swiftmodule /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/cpp_magic.h /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/CNIOLinux/include/ifaddrs-android.h /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/CNIOAtomics/include/CNIOAtomics.h /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio/Sources/CNIOLinux/include/CNIOLinux.h /usr/share/swift/usr/lib/swift/linux/x86_64/glibc.modulemap /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/CNIOSHA1.build/module.modulemap /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/CNIOOpenSSL.build/module.modulemap /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/CCryptoOpenSSL.build/module.modulemap /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/CNIOZlib.build/module.modulemap /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/CNIODarwin.build/module.modulemap /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/CNIOHTTPParser.build/module.modulemap /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/CNIOAtomics.build/module.modulemap /home/juliobrz/Git/PixelCanvas/.build/x86_64-unknown-linux/debug/CNIOLinux.build/module.modulemap /home/juliobrz/Git/PixelCanvas/.build/checkouts/swift-nio-zlib-support/module.modulemap
| D |
/*
* Licensed under the GNU Lesser General Public License Version 3
*
* This library is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the license, or
* (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
// generated automatically - do not change
module gio.FileAttributeInfoList;
private import gi.gio;
public import gi.giotypes;
private import glib.ConstructionException;
private import glib.Str;
private import gobject.ObjectG;
/**
* Acts as a lightweight registry for possible valid file attributes.
* The registry stores Key-Value pair formats as #GFileAttributeInfos.
*/
public class FileAttributeInfoList
{
/** the main GObject struct */
protected GFileAttributeInfoList* gFileAttributeInfoList;
/** Get the main GObject struct */
public GFileAttributeInfoList* getFileAttributeInfoListStruct()
{
return gFileAttributeInfoList;
}
/** the main GObject struct as a void* */
protected void* getStruct()
{
return cast(void*)gFileAttributeInfoList;
}
/**
* Sets our main struct and passes it to the parent class.
*/
public this (GFileAttributeInfoList* gFileAttributeInfoList)
{
this.gFileAttributeInfoList = gFileAttributeInfoList;
}
/** */
public static GType getType()
{
return g_file_attribute_info_list_get_type();
}
/**
* Creates a new file attribute info list.
*
* Return: a #GFileAttributeInfoList.
*
* Throws: ConstructionException Failure to create GObject.
*/
public this()
{
auto p = g_file_attribute_info_list_new();
if(p is null)
{
throw new ConstructionException("null returned by new");
}
this(cast(GFileAttributeInfoList*) p);
}
/**
* Adds a new attribute with @name to the @list, setting
* its @type and @flags.
*
* Params:
* name = the name of the attribute to add.
* type = the #GFileAttributeType for the attribute.
* flags = #GFileAttributeInfoFlags for the attribute.
*/
public void add(string name, GFileAttributeType type, GFileAttributeInfoFlags flags)
{
g_file_attribute_info_list_add(gFileAttributeInfoList, Str.toStringz(name), type, flags);
}
/**
* Makes a duplicate of a file attribute info list.
*
* Return: a copy of the given @list.
*/
public FileAttributeInfoList dup()
{
auto p = g_file_attribute_info_list_dup(gFileAttributeInfoList);
if(p is null)
{
return null;
}
return ObjectG.getDObject!(FileAttributeInfoList)(cast(GFileAttributeInfoList*) p);
}
/**
* Gets the file attribute with the name @name from @list.
*
* Params:
* name = the name of the attribute to lookup.
*
* Return: a #GFileAttributeInfo for the @name, or %NULL if an
* attribute isn't found.
*/
public GFileAttributeInfo* lookup(string name)
{
return g_file_attribute_info_list_lookup(gFileAttributeInfoList, Str.toStringz(name));
}
/**
* References a file attribute info list.
*
* Return: #GFileAttributeInfoList or %NULL on error.
*/
public FileAttributeInfoList doref()
{
auto p = g_file_attribute_info_list_ref(gFileAttributeInfoList);
if(p is null)
{
return null;
}
return ObjectG.getDObject!(FileAttributeInfoList)(cast(GFileAttributeInfoList*) p);
}
/**
* Removes a reference from the given @list. If the reference count
* falls to zero, the @list is deleted.
*/
public void unref()
{
g_file_attribute_info_list_unref(gFileAttributeInfoList);
}
}
| D |
/* TEST_OUTPUT:
---
fail_compilation/fail17491.d(22): Error: `(S17491).init` is not an lvalue and cannot be modified
fail_compilation/fail17491.d(23): Error: `S17491(0)` is not an lvalue and cannot be modified
fail_compilation/fail17491.d(25): Error: `S17491(0).field` is not an lvalue and cannot be modified
fail_compilation/fail17491.d(26): Error: `S17491(0).field` is not an lvalue and cannot be modified
fail_compilation/fail17491.d(31): Error: `S17491(0)` is not an lvalue and cannot be modified
fail_compilation/fail17491.d(32): Error: `S17491(0)` is not an lvalue and cannot be modified
fail_compilation/fail17491.d(34): Error: `S17491(0).field` is not an lvalue and cannot be modified
fail_compilation/fail17491.d(35): Error: `S17491(0).field` is not an lvalue and cannot be modified
---
*/
// https://issues.dlang.org/show_bug.cgi?id=17491
struct S17491
{
int field;
static int var;
}
void test17491()
{
S17491.init = S17491(42); // NG
*&S17491.init = S17491(42); // NG
S17491.init.field = 42; // NG
*&S17491.init.field = 42; // NG
S17491.init.var = 42; // OK
*&S17491.init.var = 42; // OK
S17491(0) = S17491(42); // NG
*&S17491(0) = S17491(42); // NG
S17491(0).field = 42; // NG
*&S17491(0).field = 42; // NG
S17491(0).var = 42; // OK
*&S17491(0).var = 42; // OK
}
| D |
/*******************************************************************************
* Copyright (c) 2006, 2007 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Chris Gross (schtoo@schtoo.com) - initial API and implementation for bug 16179
* IBM Corporation - revisions to initial contribution
* Port to the D programming language:
* Frank Benoit <benoit@tionex.de>
*******************************************************************************/
module dwtx.jface.dialogs.IPageChangingListener;
import dwtx.jface.dialogs.PageChangingEvent;
import dwt.dwthelper.utils;
/**
* A listener which is notified when the current page of a multi-page dialog is
* changing. Use this listener to perform long-running work that should only be
* executed once, when the page is in the process of changing, rather then
* during validation of page controls.
*
* @see PageChangingEvent
* @since 3.3
*/
public interface IPageChangingListener {
/**
* Handle the an <code>IDialogPage</code> changing.
*
* The <code>doit</code> field of the <code>PageChangingEvent</code>
* must be set to false to prevent the page from changing.
*
* @param event
* event object describing the change
*/
public void handlePageChanging(PageChangingEvent event);
}
| D |
/**
* Copyright 2017 Cut Through Recordings
* License: MIT License
* Author(s): Ethan Reker
*/
module ddsp.effect.compressor;
import ddsp.util.functions;
import ddsp.util.envelope;
import ddsp.effect.dynamics;
import dplug.core.nogc;
import std.algorithm;
import std.math;
/// Basic compressor
class Compressor(T) : DynamicsProcessor!T
{
public:
nothrow:
@nogc:
override T getNextSample(const T input)
{
detector.detect(input * 4);
float detectorValue;
if(linkedDetector !is null)
{
float thisDetector = detector.getEnvelope();
float otherDetector = linkedDetector.getEnvelope();
detectorValue = floatToDecibel((thisDetector + otherDetector) * 0.5);
}
else
detectorValue = floatToDecibel(detector.getEnvelope());
return input * calcCompressorGain(detectorValue, _threshold, _ratio, _kneeWidth);
}
protected:
/// If set to true, ratio will become infinite and result in limiting
bool _limit;
/// This is the function that does most of the work with calculating compression
float calcCompressorGain(float detectorValue, float threshold, float ratio, float kneeWidth)
{
float CS = 1.0f - 1.0f / ratio;
if(_limit)
CS = 1.0f;
if(kneeWidth > 0 && detectorValue > (threshold - kneeWidth / 2.0f) &&
detectorValue < threshold + kneeWidth / 2.0f)
{
x[0] = threshold - kneeWidth / 2.0f;
x[1] = threshold + kneeWidth / 2.0f;
x[1] = clamp(x[1], -96.0f, 0.0f);
y[0] = 0;
y[1] = CS;
CS = lagrpol(x, y, 2, detectorValue);
}
float yG = CS * (threshold - detectorValue);
yG = clamp(yG, -96.0, 0);
return pow(10.0f, yG / 20.0f);
}
}
unittest
{
Compressor!float compressor = new Compressor!float();
}
/// Basic look-ahead limiter that is based on the compressor from before.
class Limiter(T) : Compressor!T
{
private import ddsp.util.buffer;
private import dplug.core.nogc;
nothrow:
@nogc:
public:
/// maxLookAhead is 300 by default. If you intend to use a longer look-ahead
/// time then it is best to specify it here so that no reallocation is needed
/// later.
this(int maxLookAhead = 300)
{
_lookAheadAmount = msToSamples(maxLookAhead, _sampleRate);
_buffer = mallocNew!(Buffer!float)(cast(size_t)_lookAheadAmount);
_ratio = float.infinity;
_limit = true;
}
override T getNextSample(const T input)
{
_buffer.write(input);
float lookAheadOutput = _buffer.read();
detector.detect(input);
float detectorValue = floatToDecibel(detector.getEnvelope());
return lookAheadOutput * calcCompressorGain(detectorValue, _threshold, _ratio, _kneeWidth);
}
///
void setLookAhead(int msLookAhead)
{
_lookAheadAmount = msToSamples(msLookAhead, _sampleRate);
_buffer.setSize(cast(size_t)_lookAheadAmount);
}
private:
/// Circular buffer that holds delay elements for look-ahead feature
Buffer!float _buffer;
/// Current amount of lookahead being used in samples.
float _lookAheadAmount;
}
unittest
{
Limiter!float limiter = new Limiter!float();
}
| D |
import std.stdio;
import std.typecons;
int main() {
writeln("Hello World!");
return 0;
}
| D |
module android.java.android.service.notification.NotificationListenerService_d_interface;
import arsd.jni : IJavaObjectImplementation, JavaPackageId, JavaName, IJavaObject, ImportExportImpl, JavaInterfaceMembers;
static import arsd.jni;
import import19 = android.java.android.content.res.Resources_Theme_d_interface;
import import9 = android.java.android.app.Application_d_interface;
import import8 = android.java.android.content.ComponentName_d_interface;
import import38 = android.java.java.lang.Class_d_interface;
import import43 = android.java.android.content.res.ColorStateList_d_interface;
import import11 = android.java.android.app.Notification_d_interface;
import import2 = android.java.android.os.UserHandle_d_interface;
import import1 = android.java.android.service.notification.NotificationListenerService_RankingMap_d_interface;
import import7 = android.java.android.content.Intent_d_interface;
import import24 = android.java.java.io.FileOutputStream_d_interface;
import import35 = android.java.android.os.Handler_d_interface;
import import37 = android.java.android.content.ServiceConnection_d_interface;
import import13 = android.java.android.content.res.AssetManager_d_interface;
import import45 = android.java.android.util.AttributeSet_d_interface;
import import29 = android.java.android.graphics.drawable.Drawable_d_interface;
import import41 = android.java.android.content.ComponentCallbacks_d_interface;
import import32 = android.java.android.os.Bundle_d_interface;
import import18 = android.java.java.util.concurrent.Executor_d_interface;
import import28 = android.java.android.database.DatabaseErrorHandler_d_interface;
import import6 = android.java.android.os.IBinder_d_interface;
import import16 = android.java.android.content.ContentResolver_d_interface;
import import17 = android.java.android.os.Looper_d_interface;
import import25 = android.java.java.io.File_d_interface;
import import33 = android.java.android.content.IntentSender_d_interface;
import import36 = android.java.android.content.IntentFilter_d_interface;
import import31 = android.java.java.io.InputStream_d_interface;
import import20 = android.java.java.lang.ClassLoader_d_interface;
import import26 = android.java.android.database.sqlite.SQLiteDatabase_d_interface;
import import15 = android.java.android.content.pm.PackageManager_d_interface;
import import10 = android.java.android.content.res.Configuration_d_interface;
import import34 = android.java.android.content.BroadcastReceiver_d_interface;
import import23 = android.java.java.io.FileInputStream_d_interface;
import import30 = android.java.android.graphics.Bitmap_d_interface;
import import27 = android.java.android.database.sqlite.SQLiteDatabase_CursorFactory_d_interface;
import import42 = android.java.java.lang.CharSequence_d_interface;
import import39 = android.java.android.net.Uri_d_interface;
import import14 = android.java.android.content.res.Resources_d_interface;
import import22 = android.java.android.content.SharedPreferences_d_interface;
import import4 = android.java.android.app.NotificationChannelGroup_d_interface;
import import0 = android.java.android.service.notification.StatusBarNotification_d_interface;
import import3 = android.java.android.app.NotificationChannel_d_interface;
import import40 = android.java.android.view.Display_d_interface;
import import44 = android.java.android.content.res.TypedArray_d_interface;
import import5 = android.java.java.util.List_d_interface;
import import21 = android.java.android.content.pm.ApplicationInfo_d_interface;
import import12 = android.java.android.content.Context_d_interface;
final class NotificationListenerService : IJavaObject {
static immutable string[] _d_canCastTo = [
];
@Import this(arsd.jni.Default);
@Import void onNotificationPosted(import0.StatusBarNotification);
@Import void onNotificationPosted(import0.StatusBarNotification, import1.NotificationListenerService_RankingMap);
@Import void onNotificationRemoved(import0.StatusBarNotification);
@Import void onNotificationRemoved(import0.StatusBarNotification, import1.NotificationListenerService_RankingMap);
@Import void onNotificationRemoved(import0.StatusBarNotification, import1.NotificationListenerService_RankingMap, int);
@Import void onListenerConnected();
@Import void onListenerDisconnected();
@Import void onNotificationRankingUpdate(import1.NotificationListenerService_RankingMap);
@Import void onListenerHintsChanged(int);
@Import void onSilentStatusBarIconsVisibilityChanged(bool);
@Import void onNotificationChannelModified(string, import2.UserHandle, import3.NotificationChannel, int);
@Import void onNotificationChannelGroupModified(string, import2.UserHandle, import4.NotificationChannelGroup, int);
@Import void onInterruptionFilterChanged(int);
@Import void cancelNotification(string, string, int);
@Import void cancelNotification(string);
@Import void cancelAllNotifications();
@Import void cancelNotifications(string[]);
@Import void snoozeNotification(string, long);
@Import void setNotificationsShown(string[]);
@Import void updateNotificationChannel(string, import2.UserHandle, import3.NotificationChannel);
@Import import5.List getNotificationChannels(string, import2.UserHandle);
@Import import5.List getNotificationChannelGroups(string, import2.UserHandle);
@Import import0.StatusBarNotification[] getActiveNotifications();
@Import import0.StatusBarNotification[] getSnoozedNotifications();
@Import import0.StatusBarNotification[] getActiveNotifications(string[]);
@Import int getCurrentListenerHints();
@Import int getCurrentInterruptionFilter();
@Import void clearRequestedListenerHints();
@Import void requestListenerHints(int);
@Import void requestInterruptionFilter(int);
@Import import1.NotificationListenerService_RankingMap getCurrentRanking();
@Import import6.IBinder onBind(import7.Intent);
@Import void onDestroy();
@Import static void requestRebind(import8.ComponentName);
@Import void requestUnbind();
@Import import9.Application getApplication();
@Import void onCreate();
@Import void onStart(import7.Intent, int);
@Import int onStartCommand(import7.Intent, int, int);
@Import void onConfigurationChanged(import10.Configuration);
@Import void onLowMemory();
@Import void onTrimMemory(int);
@Import bool onUnbind(import7.Intent);
@Import void onRebind(import7.Intent);
@Import void onTaskRemoved(import7.Intent);
@Import void stopSelf();
@Import void stopSelf(int);
@Import bool stopSelfResult(int);
@Import void startForeground(int, import11.Notification);
@Import void startForeground(int, import11.Notification, int);
@Import void stopForeground(bool);
@Import void stopForeground(int);
@Import int getForegroundServiceType();
@Import import12.Context getBaseContext();
@Import import13.AssetManager getAssets();
@Import import14.Resources getResources();
@Import import15.PackageManager getPackageManager();
@Import import16.ContentResolver getContentResolver();
@Import import17.Looper getMainLooper();
@Import import18.Executor getMainExecutor();
@Import import12.Context getApplicationContext();
@Import void setTheme(int);
@Import import19.Resources_Theme getTheme();
@Import import20.ClassLoader getClassLoader();
@Import string getPackageName();
@Import string getOpPackageName();
@Import import21.ApplicationInfo getApplicationInfo();
@Import string getPackageResourcePath();
@Import string getPackageCodePath();
@Import import22.SharedPreferences getSharedPreferences(string, int);
@Import bool moveSharedPreferencesFrom(import12.Context, string);
@Import bool deleteSharedPreferences(string);
@Import import23.FileInputStream openFileInput(string);
@Import import24.FileOutputStream openFileOutput(string, int);
@Import bool deleteFile(string);
@Import import25.File getFileStreamPath(string);
@Import string[] fileList();
@Import import25.File getDataDir();
@Import import25.File getFilesDir();
@Import import25.File getNoBackupFilesDir();
@Import import25.File getExternalFilesDir(string);
@Import import25.File[] getExternalFilesDirs(string);
@Import import25.File getObbDir();
@Import import25.File[] getObbDirs();
@Import import25.File getCacheDir();
@Import import25.File getCodeCacheDir();
@Import import25.File getExternalCacheDir();
@Import import25.File[] getExternalCacheDirs();
@Import import25.File[] getExternalMediaDirs();
@Import import25.File getDir(string, int);
@Import import26.SQLiteDatabase openOrCreateDatabase(string, int, import27.SQLiteDatabase_CursorFactory);
@Import import26.SQLiteDatabase openOrCreateDatabase(string, int, import27.SQLiteDatabase_CursorFactory, import28.DatabaseErrorHandler);
@Import bool moveDatabaseFrom(import12.Context, string);
@Import bool deleteDatabase(string);
@Import import25.File getDatabasePath(string);
@Import string[] databaseList();
@Import import29.Drawable getWallpaper();
@Import import29.Drawable peekWallpaper();
@Import int getWallpaperDesiredMinimumWidth();
@Import int getWallpaperDesiredMinimumHeight();
@Import void setWallpaper(import30.Bitmap);
@Import void setWallpaper(import31.InputStream);
@Import void clearWallpaper();
@Import void startActivity(import7.Intent);
@Import void startActivity(import7.Intent, import32.Bundle);
@Import void startActivities(import7.Intent[]);
@Import void startActivities(import7.Intent, import32.Bundle[]);
@Import void startIntentSender(import33.IntentSender, import7.Intent, int, int, int);
@Import void startIntentSender(import33.IntentSender, import7.Intent, int, int, int, import32.Bundle);
@Import void sendBroadcast(import7.Intent);
@Import void sendBroadcast(import7.Intent, string);
@Import void sendOrderedBroadcast(import7.Intent, string);
@Import void sendOrderedBroadcast(import7.Intent, string, import34.BroadcastReceiver, import35.Handler, int, string, import32.Bundle);
@Import void sendBroadcastAsUser(import7.Intent, import2.UserHandle);
@Import void sendBroadcastAsUser(import7.Intent, import2.UserHandle, string);
@Import void sendOrderedBroadcastAsUser(import7.Intent, import2.UserHandle, string, import34.BroadcastReceiver, import35.Handler, int, string, import32.Bundle);
@Import void sendStickyBroadcast(import7.Intent);
@Import void sendStickyOrderedBroadcast(import7.Intent, import34.BroadcastReceiver, import35.Handler, int, string, import32.Bundle);
@Import void removeStickyBroadcast(import7.Intent);
@Import void sendStickyBroadcastAsUser(import7.Intent, import2.UserHandle);
@Import void sendStickyOrderedBroadcastAsUser(import7.Intent, import2.UserHandle, import34.BroadcastReceiver, import35.Handler, int, string, import32.Bundle);
@Import void removeStickyBroadcastAsUser(import7.Intent, import2.UserHandle);
@Import import7.Intent registerReceiver(import34.BroadcastReceiver, import36.IntentFilter);
@Import import7.Intent registerReceiver(import34.BroadcastReceiver, import36.IntentFilter, int);
@Import import7.Intent registerReceiver(import34.BroadcastReceiver, import36.IntentFilter, string, import35.Handler);
@Import import7.Intent registerReceiver(import34.BroadcastReceiver, import36.IntentFilter, string, import35.Handler, int);
@Import void unregisterReceiver(import34.BroadcastReceiver);
@Import import8.ComponentName startService(import7.Intent);
@Import import8.ComponentName startForegroundService(import7.Intent);
@Import bool stopService(import7.Intent);
@Import bool bindService(import7.Intent, import37.ServiceConnection, int);
@Import bool bindService(import7.Intent, int, import18.Executor, import37.ServiceConnection);
@Import bool bindIsolatedService(import7.Intent, int, string, import18.Executor, import37.ServiceConnection);
@Import void updateServiceGroup(import37.ServiceConnection, int, int);
@Import void unbindService(import37.ServiceConnection);
@Import bool startInstrumentation(import8.ComponentName, string, import32.Bundle);
@Import IJavaObject getSystemService(string);
@Import string getSystemServiceName(import38.Class);
@Import int checkPermission(string, int, int);
@Import int checkCallingPermission(string);
@Import int checkCallingOrSelfPermission(string);
@Import int checkSelfPermission(string);
@Import void enforcePermission(string, int, int, string);
@Import void enforceCallingPermission(string, string);
@Import void enforceCallingOrSelfPermission(string, string);
@Import void grantUriPermission(string, import39.Uri, int);
@Import void revokeUriPermission(import39.Uri, int);
@Import void revokeUriPermission(string, import39.Uri, int);
@Import int checkUriPermission(import39.Uri, int, int, int);
@Import int checkCallingUriPermission(import39.Uri, int);
@Import int checkCallingOrSelfUriPermission(import39.Uri, int);
@Import int checkUriPermission(import39.Uri, string, string, int, int, int);
@Import void enforceUriPermission(import39.Uri, int, int, int, string);
@Import void enforceCallingUriPermission(import39.Uri, int, string);
@Import void enforceCallingOrSelfUriPermission(import39.Uri, int, string);
@Import void enforceUriPermission(import39.Uri, string, string, int, int, int, string);
@Import import12.Context createPackageContext(string, int);
@Import import12.Context createContextForSplit(string);
@Import import12.Context createConfigurationContext(import10.Configuration);
@Import import12.Context createDisplayContext(import40.Display);
@Import bool isRestricted();
@Import import12.Context createDeviceProtectedStorageContext();
@Import bool isDeviceProtectedStorage();
@Import void registerComponentCallbacks(import41.ComponentCallbacks);
@Import void unregisterComponentCallbacks(import41.ComponentCallbacks);
@Import import42.CharSequence getText(int);
@Import string getString(int);
@Import string getString(int, IJavaObject[]);
@Import int getColor(int);
@Import import29.Drawable getDrawable(int);
@Import import43.ColorStateList getColorStateList(int);
@Import import44.TypedArray obtainStyledAttributes(int[]);
@Import import44.TypedArray obtainStyledAttributes(int, int[]);
@Import import44.TypedArray obtainStyledAttributes(import45.AttributeSet, int[]);
@Import import44.TypedArray obtainStyledAttributes(import45.AttributeSet, int, int, int[]);
@Import IJavaObject getSystemService(import38.Class);
@Import import38.Class getClass();
@Import int hashCode();
@Import bool equals(IJavaObject);
@Import @JavaName("toString") string toString_();
override string toString() { return arsd.jni.javaObjectToString(this); }
@Import void notify();
@Import void notifyAll();
@Import void wait(long);
@Import void wait(long, int);
@Import void wait();
mixin IJavaObjectImplementation!(false);
public static immutable string _javaParameterString = "Landroid/service/notification/NotificationListenerService;";
}
| D |
# FIXED
utils/cmdline.obj: C:/ti/tivaware_c_series_2_1_4_178/utils/cmdline.c
utils/cmdline.obj: C:/ti/ccs901/ccs/tools/compiler/ti-cgt-arm_18.12.1.LTS/include/stdint.h
utils/cmdline.obj: C:/ti/ccs901/ccs/tools/compiler/ti-cgt-arm_18.12.1.LTS/include/_stdint40.h
utils/cmdline.obj: C:/ti/ccs901/ccs/tools/compiler/ti-cgt-arm_18.12.1.LTS/include/sys/stdint.h
utils/cmdline.obj: C:/ti/ccs901/ccs/tools/compiler/ti-cgt-arm_18.12.1.LTS/include/sys/cdefs.h
utils/cmdline.obj: C:/ti/ccs901/ccs/tools/compiler/ti-cgt-arm_18.12.1.LTS/include/sys/_types.h
utils/cmdline.obj: C:/ti/ccs901/ccs/tools/compiler/ti-cgt-arm_18.12.1.LTS/include/machine/_types.h
utils/cmdline.obj: C:/ti/ccs901/ccs/tools/compiler/ti-cgt-arm_18.12.1.LTS/include/machine/_stdint.h
utils/cmdline.obj: C:/ti/ccs901/ccs/tools/compiler/ti-cgt-arm_18.12.1.LTS/include/sys/_stdint.h
utils/cmdline.obj: C:/ti/ccs901/ccs/tools/compiler/ti-cgt-arm_18.12.1.LTS/include/stdbool.h
utils/cmdline.obj: C:/ti/ccs901/ccs/tools/compiler/ti-cgt-arm_18.12.1.LTS/include/string.h
utils/cmdline.obj: C:/ti/ccs901/ccs/tools/compiler/ti-cgt-arm_18.12.1.LTS/include/_ti_config.h
utils/cmdline.obj: C:/ti/ccs901/ccs/tools/compiler/ti-cgt-arm_18.12.1.LTS/include/linkage.h
utils/cmdline.obj: C:/ti/tivaware_c_series_2_1_4_178/utils/cmdline.h
C:/ti/tivaware_c_series_2_1_4_178/utils/cmdline.c:
C:/ti/ccs901/ccs/tools/compiler/ti-cgt-arm_18.12.1.LTS/include/stdint.h:
C:/ti/ccs901/ccs/tools/compiler/ti-cgt-arm_18.12.1.LTS/include/_stdint40.h:
C:/ti/ccs901/ccs/tools/compiler/ti-cgt-arm_18.12.1.LTS/include/sys/stdint.h:
C:/ti/ccs901/ccs/tools/compiler/ti-cgt-arm_18.12.1.LTS/include/sys/cdefs.h:
C:/ti/ccs901/ccs/tools/compiler/ti-cgt-arm_18.12.1.LTS/include/sys/_types.h:
C:/ti/ccs901/ccs/tools/compiler/ti-cgt-arm_18.12.1.LTS/include/machine/_types.h:
C:/ti/ccs901/ccs/tools/compiler/ti-cgt-arm_18.12.1.LTS/include/machine/_stdint.h:
C:/ti/ccs901/ccs/tools/compiler/ti-cgt-arm_18.12.1.LTS/include/sys/_stdint.h:
C:/ti/ccs901/ccs/tools/compiler/ti-cgt-arm_18.12.1.LTS/include/stdbool.h:
C:/ti/ccs901/ccs/tools/compiler/ti-cgt-arm_18.12.1.LTS/include/string.h:
C:/ti/ccs901/ccs/tools/compiler/ti-cgt-arm_18.12.1.LTS/include/_ti_config.h:
C:/ti/ccs901/ccs/tools/compiler/ti-cgt-arm_18.12.1.LTS/include/linkage.h:
C:/ti/tivaware_c_series_2_1_4_178/utils/cmdline.h:
| D |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.