Coder Social home page Coder Social logo

vscode-mir's Introduction

VSCode extension for MIR

The extension is intended for better development experience with MIR (the JIT compiler) textual format.

Features

Currently, syntax highlighting of the MIR textual format is supported.

Under Development

A debugger for MIR textual format is under development. Currently almost finished the first steps for a debugger -- Breakpoints. Stepping in/over/out. Stack trace. Interactively viewing variables in each stack frame. Hovering inspection of variables. Basic REPL (s var val for setting and p type val for printing variables).

Due to the MIR simplification process, currently breakpoints cannot be set on FMOV/DMOV/LDMOV instructions (and perhaps more) with constant operands. type in printing command can be any MIR type (but not currently BLK or RBLK), or str for printing a pointer as char* c-style string. Currently the debugger will not catch exceptions. For working on with the debugger, some verbose info, as well as stderr, is printed into mir-intp-dap.log under the VS Code installation folder.

The debugging support has not released yet. To run the debugger you currently need to pull down the plugin directory and the debugger repository.

For the plugin repository (this one), after pulling you need to run

yarn install
yarn build

then hit F5 in a host VS Code process to start a development VS Code process. Before you start debugging MIR, you need to pull the debugger repository from https://github.com/eliphatfs/mir/tree/dap-intp and build with the provided VS Code task or manually

gcc -g -Og mir.c ./dap/cJSON.c -o mir-intp-dap.exe -DMIR_DAP -DMIR_DIRECT_DISPATCH -I. -Lpthread

then paste the mir-intp-dap.exe into bin folder of the plugin directory (if the folder does not exist just create a new one). (For windows you have to use MinGW or cygwin. If you don't have one then I suggest installing Strawberry Perl which includes a stable and minimal MinGW distribution.)

Example video:

Requirements

No requirements yet.

Extension Settings

Nothing configurable yet.

Release Notes

See change logs.

Contributing

Currently the project is still in early alpha stage of developing. Contributions are welcome! If you any question about using the plugin feel free to start an issue.

vscode-mir's People

Contributors

eliphatfs avatar

Stargazers

 avatar hyrious avatar

Watchers

 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.