Git Product home page Git Product logo

yabo's People

Contributors

8051enthusiast avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

yabo's Issues

make layout interner not leak memory

since there are btreemaps inside a bumpalo arena, they don't get deallocated.
this is not a problem right now, since we are still a batch compiler.

module system

something like

import foo

def for[u8] *> t = foo.bar

which then includes the file at foo.yb relatively to the current file

`if` adapters

right now, one has to do something like

{
  field: u16l
  let _ = field if 42
}

to backtrack on a field value, but ideally this should be

{
   field: u16l if 42
}

this requires extracting the mir of the if part of all expressions

size inference

for the mvp size inference, static size, data-independent size and arbitrary size should be implemented

from types should be optional

that way, one can define things like

def u8(val: int ~ 0..255) = val

to basically newtype a byte, but it is also useful for regular functions which do not operate on data

backtracking and panicking

calling functions and accessing optional fields with ? and ! should result in backtracking and errors. it should also give errors when a parser can backtrack, but is not marked with ?

check for recursive layouts

right now, when encountering recursive layouts (meaning that the underlying memory representation would take infinite memory on stack, not that they reference themselves), the compiler will enter an infinitely loop and exhaust memory.

as layouting is done by abstract interpretation, one could make an symbolic token with a path on it whenever one widens.
something like this:

struct SymbolicLayout {
  origin: Symbol,
  subpath: EliminatorPath,
}

when running eliminators on it, the same symbol is taken, but the eliminator path is extended.
constructors would embed the symbolic token into them.

on widening, whenever there is a MultiLayout with one variant being a symbolic layout and another one where the subpath subtracted from the constructors it is embedded in (if applicable) is a strict ancestor of the outer symbolic layout, we make an diagnostic.

this requires a separate abstract interpretation pass where function arguments to functions of the same type are merged per parser so we do not end up with infinite callsites (this in turn also requires there to be finitely many types which also has to be detected).

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.