appcelerator/hyperloop — pull request #211 by dawsontoth (2014-01-27 19:49:07+00:00)
Title: Fixes #185: Use Clang on Windows

For testing, I:
- Successfully ran npm test on Windows and Mac
- Successfully ran all Windows example.
- Ran all iOS examples. Failures were as follows:
- casting: `undefined for i386 symbol _HyperloopCastToNSString`
- chartfx: CHARTFX_HOME not set; presumably this is expected if you don't have the framework installed
- opengl: `Application 'app' (hl$) not loaded. Make sure that you have the appropriately built library`
- webgl: Same error as opengl.
But I am able to reproduce these failures on the current master (without my changes), so I don't think that I broke them.

There are some limitations to how we're using Clang on Windows at the moment (I don't think they're very high priority yet):
- It doesn't parse ref (C++/CX) classes or usages (so if you have a pure method that accepts a hat type, Clang will skip over it) (Issue #209).
- It doesn't pull in the API from parents of classes (Issue #210).

I've squashed the following commits in to this commit:
- Fix Visibility Changed Handler
- HyperloopToVoid and FxCompiles
- Import CXX Constructors and Methods
- Suffix "Wrapped" on Imported Classes
- Plus use void * as the ref to this when passing around Hyperloop. This lets us avoid colliding the namespaces from these class implementations with the rest of our generated code.
- Generate Imported Class Wrappers
- Cache Based on ILParser's Code Signature + className Consistency
- Fix Getter Type Parsing
- Fix Generic Lookup Guard
- Fix buttonAlert
- Fix Examples/Simple
- Template Arg Defaults and Pass Downs
- Qualify Structs and Casts
- Fix Extends Parent Binding when Fully Qualified
- Use Fully Qualified Return on Custom Class Methods
- Fix Property Return Type
- Mangle string as String
- Allow for Type Disambiguation
- Via @compiler "using_namespaces"
- and fully qualified @generic args.
- Fix Resolving valuetype
- Clean Up Namespace Trimming and Generic Usage Check
- Log.fatal --debug Shows Trace
- Fix convertToJSValueRef Mangling
- Remove Namespace from Mangled Names
- Allow Importing Classes
- Allow Disambiguation of Custom Class Extends and Returns
- Split BasicTimer to H and CPP
- Clang doesn't parse .h the same as it does .cpp.
- Clang C++ Classes Rough Start
- Pass MS Specific Params to Clang
- A Running Direct3D Example
- Support mixing in native .h and .cpp.
- Enhance the finder a bit.
- Support running clang async or sync on the supplied headers to speed dev, and ease debugging, respectively.
- Change to @compiler "manual_bootstrap: true" for disabling the automatic bootstrap.
- Add some additional guards to clangparser.
- Cache results of clang parsing, hashed by the args and clangparser's contents.
- Provide srcDir from paths module.
- Bootstrap Entirely in JS
- Guard Symbol Lookup in Imports
- Blacklist Methods
- Fix Bug in Converting to Usings
- Filter Falsy Headers
- Support Multiple Headers and Variadic Function Calls
- Well, mostly support variadic. In a rather manual way.
- BackgroundDownloader (doesn't work yet): Demonstrates returnType Generic Deficiency
- Extract Paths
- Handle Imported Symbols with Primitives
- Target math.h
- Clang Parsed to JSON AST via DI buildlib