Skip to content

Latest commit

 

History

History
43 lines (36 loc) · 1.46 KB

File metadata and controls

43 lines (36 loc) · 1.46 KB

Mandatory features

  1. Binary operations: +, -, *, /, >, <, ==
  2. Unary operations: +, -
  3. Brackets (overwriting order of operations)
  4. Supported data types: char, int, float and pointers (e.g. float**)
  5. Special reserved words: const, if, else, while, for, break, continue, return and void
  6. Variables
    6.0. Local and global variables
    6.1. Declaration
    6.2. Definition
    6.3. Assignments
    6.4. Identifiers appearing in expressions 7.Pointer operations: *, &
  7. Comments: single-line, multi-line
  8. Printf and Scanf functions
  9. Scoping
  10. Functions
    11.1. Passing parameters by value and by reference (pointers)
  11. Optimizations: unreachable and dead code not implemented
  12. Arrays
  13. Import <stdio.h> (printf, scanf)

Optional features

  1. Constant folding
  2. Constant propagation: works with the reaching definition principle
  3. Modulo operation: %
  4. Comparison operations: <=, >=, !=
  5. Identifier operations: ++, --
  6. (Multiple variable declaration and/or initializations in one line, see benchmark prime.c for example)
  7. Efficient register retrieval
    7.1. Depending on register and address descriptors
    7.2. Storing and loading only registers that are used in function

Added since intermediate presentation

Lots of bug fixes and improvements. Benchmark now running as it should.

Features that were not yet implemented:

  1. Arrays and Global variables added
  2. Scanf