Giter Club home page Giter Club logo

tailspin's Introduction

Tailspin

Tailspin is a fully reversible Javascript interpreter written in Javascript. It is almost fully standards-compliant and is written in continuation passing style which allows the interpretation of code to be paused and controlled.

Tailspin is based on the Narcissus Javascript interpreter.

It was built to provide the basis for interesting web-based programming explorations, visualisations and puzzles.

ES5.1 Compliance

Tailspin currently passes 99.9% of the ECMAScript Language test262 test suite.

Reversibility

Tailspin is able to run in a reversible mode, where state changes are recorded so that they can be undone, compared to the non-revsersible mode this is slightly slower and uses more memory.

In reversible mode almost all state changes can be undone. Some state changes such as Object.freeze() and Object.seal() are not reversible as Tailspin uses the host runtime's Javascript objects and the effect of these functions is permanent.

Sandboxing

Tailspin utilises the host's Javascript object implementations and thus polluting the host environment is possible. However when running in a browser, tailspin creates an isolated iframe to provide sandboxed object implementations.

Usage

Basic usage for creating an interpreter and running the string source:

var tailspin = new Tailspin.Interpreter();

// Create an evaluation context that describes the how the code is to be executed.
var x = tailspin.createExecutionContext();

// Run the code.
tailspin.evaluateInContext(source, "console", 0, x, function(result) {
    console.log(result);
}, function(result) {
    console.error(result);
}, null);

tailspin's People

Contributors

wthimbleby avatar

Watchers

 avatar  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.