Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

CFG IR

NotificationsYou must be signed in to change notification settings

js-js/cfg-ir

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Usage

varir=require('cfg-ir');varcfg=ir.parse(function(){/*  block B1 -> B2, B3    arg1 = instr1 %literal1, %literal2    id2 = instr2 arg1  block B2    ret id2  block B3    ret arg1*/});console.log(cfg);/*[ { id: 'B1',    instructions:     [ { id: 'arg1',         type: 'instr1',         inputs: [ { type: 'js', value: 'literal1' }, { type: 'js', value: 42 } ] },       { id: 'id2',         type: 'instr2',         inputs: [ { type: 'instruction', id: 'arg1' } ] } ],    successors: [ 'B2', 'B3' ] },  { id: 'B2',    instructions:     [ { id: null,         type: 'ret',         inputs: [ { type: 'instruction', id: 'id2' } ] } ],    successors: [] },  { id: 'B3',    instructions:     [ { id: null,         type: 'ret',         inputs: [ { type: 'instruction', id: 'arg1' } ] } ],    successors: [] } ]*/console.log(ir.stringify(cfg));/*block B1 -> B2, B3  instr1 %"literal1", %42  instr2 arg1block B2  ret id2block B3  ret arg1*/

LICENSE

This software is licensed under the MIT License.

Copyright Fedor Indutny, 2014.

Permission is hereby granted, free of charge, to any person obtaining acopy of this software and associated documentation files (the"Software"), to deal in the Software without restriction, includingwithout limitation the rights to use, copy, modify, merge, publish,distribute, sublicense, and/or sell copies of the Software, and to permitpersons to whom the Software is furnished to do so, subject to thefollowing conditions:

The above copyright notice and this permission notice shall be includedin all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESSOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OFMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. INNO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OROTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THEUSE OR OTHER DEALINGS IN THE SOFTWARE.

About

CFG IR

Resources

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp