Skip to content

Long Term Repo Structure #3

Description

@TroyNeubauer

Assuming all goes well, I see this possibly being used as a teaching tool to show the stages of a compiler and how it works. We have discussed some nice optimizations would benefit performance if implemented (keeping AST nodes 64 bits, combining the parser and the verifier, using C enums with shared data in a struct, etc.) and I propose that we do implement these fun changes, but after finish a somewhat complete version of the compiler. Then, we will push this "pure" (slow but straightforward) version of the compiler to a branch that wont change. From there we can move full speed toward optimization. This will allow us to learn how to make a compiler as well as pin the final useful product once were done.

Also to clarify our goals, we are looking to be able to compile a hello world program by the end of this semester (May 2022 or so). As stepping stones for that we will also be able to compile a memcpy.c file which doesn't use the preprocessor and looks something like this:

void* memcpy (void* dest, const void* src, size_t len)
{
  char *d = dest;
  const char *s = src;
  while (len--)
    *d++ = *s++;
  return dest;
}

Long live SACC!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions