Git Product home page Git Product logo

echelonscript's People

Contributors

doom2fan avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

echelonscript's Issues

Move whatever tests are possible to unit tests

The WPF UI can only run on Windows, and it'd be better if we could run the tests on any platform.
The export and GC tests are an obvious case for moving to unit tests, since those don't need an UI or code editor.

Add some form of IR between the frontend and backend

As is, the backends consume a slightly modified AST that passed through the frontend.
The frontend could instead generate some form of simplified IR, for the benefit of both the backend and itself. Things like implicit casts could be made explicit, default args could be filled in, implicit args made explicit, etc.
It'd be a major refactoring, but it should make both the frontend and backend(s) much cleaner and simpler.

Use a compiler-local string pool

Right now, the usage of the shared string pool means those strings will never be released. That's quite wasteful, and it'd be better if they were only pooled relative to the compiler's lifetime.

Slices

With a dedicated slicing operator.

Whole-file namespaces

Basically, namespaces that span the whole file. This would be pretty useful for when the whole file uses only a single namespace. (i.e., most files)

Traits instead of interfaces?

We could have traits instead of interfaces, while still allowing "trait inheritance". This would mean classes and structs can explicitly implement a trait internally, while also allowing external "extension" of types with traits. e.g.

trait Iterator!(T, TState) {
    TState InitialState ();
    T? TryGetNext (ref TState state);
}

extends IList!(T) with Iteratable!(T, intN) {
    intN InitialState => 0;
    T? TryGetNext (ref intN index) => index < length ? this[index] : null;
}

class ClassWithIterator : Iterator<T, int32> {
    // [...]
}

Improve how IR is created

While the caching is nice for decreasing the amount of waste, it might be desirable to be able to get rid of the cached data.
Maybe make the cache local to the compiler object? We could also maybe make it cache pointers to make more nodes cacheable.
Line numbers could pose a problem for caching.
Maybe make it unmanaged? Shouldn't be too hard. Could then more easily restrict their lifetime to the compiler or environment.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.