Giter VIP home page Giter VIP logo

tai-compiler's Introduction

A tiny compiler embedded within TSC tries to compile typescript code to C code, and then link the generated C code to a modified JS runtime like QuickJS. At last feed them to a C compiler, gcc or LLVM, we can get a static compiled typescript module.

In this compiler, I plan to emit ts to SSA IR, and based on it, some compiler optimizations will be implemented, like constant folding, propagation, copy propagation, LVN, GVN and function inline, even devirtualization etc. Hopefully it can get 3x-5x performance up than QuickJS interpretor.

My previous experiment, a singlepass compiler which only emits C code without any compiler optimization involved, shows C compiler and TSC type inference could bring 2X performance gain.

more optimization could generate better performance. for that and efforts I can take, I choose some cost effective optimizations.

tai-compiler's People

Contributors

ahejlsberg avatar sheetalkamat avatar mhegazy avatar danielrosenwasser avatar sandersn avatar rbuckton avatar weswigham avatar vladima avatar cyrusnajmabadi avatar csigs avatar ryancavanaugh avatar jsonfreeman avatar a-tarasyuk avatar typescript-bot avatar amcasey avatar zhengbli avatar andrewbranch avatar aozgaa avatar saschanaz avatar kingwl avatar ajafff avatar uniqueiniquity avatar jramsay avatar armanio123 avatar billti avatar riknoll avatar tinganho avatar elibarzilay avatar bigaru avatar danquirk avatar

Forkers

web-logs2

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.