Skip to content

Latest commit

 

History

History
143 lines (99 loc) · 3.51 KB

PROGRESS.md

File metadata and controls

143 lines (99 loc) · 3.51 KB

Please add feature request here.

Codes related to some implemented feature can be found by searching their number.

I.E. Want to find codes related to lexical scoping (the 4th one in the scoping section)? search "FEATURE #18", and you see the result.

basic language features

  • type aliases (#31)
  • no functions (see README)
  • foreign function interfaces

scoping

  • find variables in outer scopes (#3)
  • when new variables defined, a new scope starts (#4)
  • find all variables matches the name (#5)
  • lexical scoping (#18)

types

  • primitive types with name (#0) (tested)
  • function type, consisting of the parameters' types and the return type (#6)
  • types with multiple type parameter (#7)
  • infer function's return type from the return statements (#12) (tested)
  • infer variable's type by the assignment expression (#8) (tested)
  • resolve types defined in the context (unknown types) (#30) (tested)
  • nulltype can be assigned to variables with any type (#11) (tested)
  • an HM type system (extra)
  • pointers
  • raw arrays

contracting (extra)

  • traits or interfaces
  • generic with boundaries

generics

  • generic lambdas
  • generic structs
  • type inference

variables

  • initialize variable with null or given expression (#13)
  • check for mutability (#21)
  • check for assignment type (#14) (tested)
  • validate lhs (#20)
  • check if member exist (#29)
  • inline
  • overloading (#33)
  • remove unused local variables but keep the expression (#36)

inline

  • general inline
  • inline lambda parameters
  • inline when directly invoke a lambda expression (#44)
  • convert returns into assignment + goto (#45)
  • keep returning currect when inline (#46)
  • keep label return when inline (#47)

functions and lambdas

  • check for parameter type (#32)
  • the return type should be inferred, or nulltype (#19) (tested)
  • return statements' types should be same (#24) (tested)
  • return statement exhaustiveness check (extra)
  • defaultly no parameter (#22)
  • y-combinator-like recur (#37)
  • recur can invoke outside lambdas (#38) (tested)

main function

  • only nulltype and i32 returning are allowed (#35)
  • check for main function duplication (#40)

structs

  • mutual recursion detection (#34) (tested)
  • generic structs

if

  • check for condition type (#1)
  • optional else branch (#2)
  • when condition is constant value, delete redundant branch (#17)
  • if as expression (extra)
  • tenary operator

low-level stuffs

  • expression splitting (#42)
  • temporary variables are not added to the env (#43)
  • string pool (#38)

int

  • only 8, 16, 32, 64 are valid length (#26)
  • signed and unsigned (#27)
  • check value is valid

float

  • only 32, 64 are valid length (#41)
  • check value is valid

while

  • check for condition type (#16)
  • do while
  • jump statements (#25)

errors

  • when the declared/assignment type are mismatch (#9)
  • display line number/file name (#10)

debug

  • display compilation information (#15)
  • pretty print strings (#23)






LLVM Code Gen

  • types
  • expressions
  • declarations
  • statements






Features given up

Those features will never be available.

  • types with single type parameter