Giter VIP home page Giter VIP logo

cinc's Introduction

CinC

CinC is an experimental Clojure analyzer and compiler implemented in pure Clojure.

It started off as an extension of Aaron Cohen's CinC project but it has been mostly rewritten.

As CinC is still a work-in-progress and it's rapidly iterating, expect the doc to be slightly out-of-sync with the current implementation. More extensive documentation will be written once CinC is stable enough.

Features

CinC currently contains both an analyzer composed of multiple passes and an emitter.

Docs on how the compile process works are in compiler

Analyzer

The jvm analyzer (cinc.analyzer.jvm/analyze) returns an AST similar to the one returned by the clojurescript analyzer or by jvm.tools.analyzer. On top of the simple AST, multiple passes are run in order to transform/annotate the ast with information needed for the jvm bytecode emission.

The basic AST nodes are documented in analyzer while the passes are documented in passes.

Note that some passes remove or add new nodes to the AST.

Emitter

The bytecode emitter (cinc.compiler.jvm.bytecode/eval) takes in an expression, gets the AST from its analysis and emits the corresponing bytecode.

How this process works is documented in emit

What's not working

There may still be a couple of issues around primitive boxing/unboxing.

invokePrim is also not yet implemented.

License

Copyright © Nicola Mometto, Rich Hickey & contributors.

Licensed under the EPL (see the file epl.html).

cinc's People

Contributors

bronsa avatar remleduff avatar

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.