[swift-dev] operator overloads

2015-12-17 Thread Rafkind, Jon via swift-dev
How does the Swift compiler determine which method or operator to call given a set of overloads at a given call site? This question may conflate two issues: method overloads and operator overloads, but it seems at least superficially that they are related. Somehow they end up using different rul

Re: [swift-dev] operator overloads

2015-12-17 Thread Rafkind, Jon via swift-dev
Ok I will. I just wanted to make sure it was buggy behavior before filing. On 12/17/2015 11:24 AM, Dmitri Gribenko wrote: On Thu, Dec 17, 2015 at 11:20 AM, Rafkind, Jon via swift-dev <mailto:swift-dev@swift.org> wrote: How does the Swift compiler determine which method or operator t

[swift-dev] tips for debugging the swift executable

2015-12-17 Thread Rafkind, Jon via swift-dev
I use gdb on linux to debug the swift binary. I find that gdb takes about 20 seconds just to read the symbols before I can even interact with gdb. I was wondering if anyone knew of a way to decrease the symbol load time, either by some gdb settings or by compiling swift/llvm/clang in such a way

[swift-dev] metatype of Int

2015-12-18 Thread Rafkind, Jon via swift-dev
Given a swift::MetaType how can I tell if it corresponds to the MetaType of the standard Int type? Is there a way to get a reference to the MetaType from the StdlibModule or TheBuiltinModule? For now I can convert the MetaType to a string and compare it to "Int.Type" but that is yucky. --

Re: [swift-dev] metatype of Int

2015-12-18 Thread Rafkind, Jon via swift-dev
Sorry I should have been more specific. I am working at the C++ level. I have a swift::MetaType* and want to compare it to something. On 12/18/2015 12:10 PM, Dave Abrahams wrote: On Dec 18, 2015, at 11:16 AM, Rafkind, Jon via swift-dev <mailto:swift-dev@swift.org> wrote: Given a

Re: [swift-dev] metatype of Int

2015-12-21 Thread Rafkind, Jon via swift-dev
2/18/2015 12:10 PM, Dave Abrahams wrote: On Dec 18, 2015, at 11:16 AM, Rafkind, Jon via swift-dev mailto:swift-dev@swift.org>><<mailto:swift-dev@swift.org>mailto:swift-dev@swift.org> wrote: Given a swift::MetaType how can I tell if it corresponds to the MetaType

[swift-dev] help with looking up Foundation.NSString

2016-03-20 Thread Rafkind, Jon via swift-dev
I am trying to retrieve the ValueDecl associated with an NSString using the swiftc code base. I can find the Foundation module, but I cannot seem to retrieve the NSString type out of it. swift::ModuleDecl * foundation = context->getLoadedModule(context->getIdentifier("Foundation")); // this i

[swift-dev] large dictionary literal overflows swiftc stack

2016-03-22 Thread Rafkind, Jon via swift-dev
Attached is a file from a project called PerfectLib that contains a dictionary literal with 816 entries in it. On my system with exactly 559 entries (meaning the last entry is "res") the file can be compiled, but with 560 or more it crashes. It looks like the crash is an infinite loop, I see man

Re: [swift-dev] large dictionary literal overflows swiftc stack

2016-03-22 Thread Rafkind, Jon via swift-dev
M, Rafkind, Jon via swift-dev <mailto:swift-dev@swift.org> wrote: Attached is a file from a project called PerfectLib that contains a dictionary literal with 816 entries in it. On my system with exactly 559 entries (meaning the last entry is "res") the file can be compiled, but w

Re: [swift-dev] large dictionary literal overflows swiftc stack

2016-03-22 Thread Rafkind, Jon via swift-dev
then I suppose it can be fixed, but if swift 3 has no issues then it looks like I have few options for remediation. On 03/22/2016 12:56 PM, Dmitri Gribenko wrote: On Tue, Mar 22, 2016 at 12:17 PM, Rafkind, Jon via swift-dev <mailto:swift-dev@swift.org> wrote: I have to support swift 2

Re: [swift-dev] large dictionary literal overflows swiftc stack

2016-03-22 Thread Rafkind, Jon via swift-dev
/2016 12:56 PM, Dmitri Gribenko wrote: On Tue, Mar 22, 2016 at 12:17 PM, Rafkind, Jon via swift-dev <mailto:swift-dev@swift.org> wrote: I have to support swift 2.2 for the time being because I have to support the current release of xcode. I will upgrade to swift 3 when it is released

Re: [swift-dev] large dictionary literal overflows swiftc stack

2016-03-22 Thread Rafkind, Jon via swift-dev
benko wrote: On Tue, Mar 22, 2016 at 12:17 PM, Rafkind, Jon via swift-dev <mailto:swift-dev@swift.org> wrote: I have to support swift 2.2 for the time being because I have to support the current release of xcode. I will upgrade to swift 3 when it is released. I understand your motiva

Re: [swift-dev] large dictionary literal overflows swiftc stack

2016-03-23 Thread Rafkind, Jon via swift-dev
iles using 3.0. -Kyle I was just using that file as a test case for my application that is based on the swiftc code base. My application is designed to consume arbitrary swift 2.2 code. If there is a problem with swift 3 then I suppose it can be fixed, but if swift 3 has no issues then it loo

[swift-dev] hmap files

2016-04-26 Thread Rafkind, Jon via swift-dev
What are hmap files and how do they relate to the swift compilation process? It seems that they are a clang thing, but I can't find any documentation on them. ___ swift-dev mailing list swift-dev@swift.org https://lists.swift.org/mailman/listinfo/swift-de

Re: [swift-dev] hmap files

2016-04-26 Thread Rafkind, Jon via swift-dev
he compiler with a mapping of textual include > names to actual file paths. > > What are you specifically looking into? > > - Daniel > >> On Apr 26, 2016, at 11:42 AM, Rafkind, Jon via swift-dev >> wrote: >> >> What are hmap files and how do they relate to