Skip to content

Latest commit

 

History

History
30 lines (20 loc) · 976 Bytes

notes.md

File metadata and controls

30 lines (20 loc) · 976 Bytes

Vince's Notes

Casting in Comparison Operators

inst/examples/ifAssign.R's foo (and my foo.alt which compiles at this state) illustrates a problem - the module will fail to build if Int32Type and DoubleTypes are compared. This is because there are type-specific comparison operators in LLVM, i.e. FCmp.

Documentation Needed

  • .functionInfo
  • .routineInfo
  • .compilerHandlers
  • .insertReturn internals - how this works, what nested is, etc.

Questions/Ideas:

  • getMathOpType current looks to see if types are common and if not, returns a DoubleType, the type that we should coerce to. Could this be made more generic such that it does the conversion for us?

  • fixIfAssign needs type checking - possible best done by scanning the body of the assignment first?

Stuff I broke or disabled intentionally

  • .InsertReturn is commented out and not TRUE by default in compileFunction because it's broken.
  • fixIfAssign is commented out because it's broken.