Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jun 09 2015 19:38

    bmeck on master

    update a little from call today (compare)

  • Jun 02 2015 22:07

    bmeck on master

    give sane doxygen link w/ viz g… (compare)

  • Jun 02 2015 21:57

    bmeck on master

    add hydrogren link to prior work (compare)

  • Jun 02 2015 19:17

    bmeck on master

    notes from call 2015-6-2 (compare)

  • Jun 02 2015 19:11

    bmeck on master

    move masquerading txt file to b… (compare)

  • May 28 2015 19:21

    bmeck on master

    refine api, looking closer to c… (compare)

  • May 26 2015 20:33

    bmeck on master

    add note about const frontiers … (compare)

  • May 26 2015 19:12
    bmeck closed #1
  • May 26 2015 19:11

    bmeck on master

    gitter link (compare)

  • May 26 2015 19:03
    gitter-badger opened #1
Charles Pick
@phpnode
yello, broadly interested in this. is the weekly meeting gitter based or an actual call?
Bradley Meck
@bmeck
video call + gitter
Charles Pick
@phpnode
ok cool, i'm mostly interested in having a robust api on which to build these kinds of transformations - http://codemix.com/blog/why-babel-matters#-arbitrary-function-inlining-http-en-wikipedia-org-wiki-inline_expansion-problems-
Bradley Meck
@bmeck
@phpnode we have stuff that can allow this already but the API is just terrible
so we need to gather the people who are interested to b*tch and moan about what a good API is, me and chris can probably write up the actual query engine
you can see some stuff in the prior work on the repo
the fine line for us is not getting so esoteric as a CFG, but not as complex as the AST T_T. Think jQuery for the AST, with plugins for things like scope analysis
Charles Pick
@phpnode
yeah i think @sebmck has been working on something very similar for babel, so you can select a specific node or list of nodes with tree.select("BlockStatement IfStatement * AssignmentExpression") or something like that. right now that stuff is super cumbersome
Bradley Meck
@bmeck
yes because the data structure is not right
but the API swung too far into the code analysis side, made it hard to use
Charles Pick
@phpnode
but that's not spidermonkey AST, right?
Bradley Meck
@bmeck
it consumes the AST, generates an out of band data structure
can still be used to mutate the AST, but painful to do so
Charles Pick
@phpnode
ah, k
Bradley Meck
@bmeck
npm i callbackhell uses an older vendored version
https://www.npmjs.com/package/estoc is chris' tool that uses a evaluation engine
with the 3 of us we can probably combine our approaches if we can agree on an api
Charles Pick
@phpnode
yes that would be awesome
Bradley Meck
@bmeck
if you or anyone else wants invite to the call lmk, otherwise you will just be listening guests
Charles Pick
@phpnode
will probably just listen to the first one :)
Patrick Mueller
@pmuellr

re: https://github.com/bmeck/StaticAnalysis/blob/master/API-ideas/spec.md - when I first looked at this, I thought - "why is this in C?". After seeing some of the samples with generator functions, I thought - hmm, maybe that was generators?

Maybe it was a mix. Wondering if there's any thought on a formal spec language. I know some folks have been using TypeScript for this - and I have as well. Reasonably happy having a side file who's only real use is to document an API.

Actually, speaking of TypeScript, any thoughts of taking advantage of TypeScript to get additional typing information? I know MS used to provide a TypeScript file defining node APIs, but I don't see that anymore. Guess I'm thinking this would be a nice optional thing - if someone DOES provide a TypeScript impl or even just API definition, would be nice to take advantage of it.
Bradley Meck
@bmeck
not a huge fan of typescript for things, but it is just napkin style stuff, I would go to webidl before typescript
in part because I want to avoid using declared static typing, rather than using type inference and constraints
if there is enough demand though we can choose a language
Bradley Meck
@bmeck
the more I sketch things out on paper the more I want a CFG style structure, but with scopes rather than raw blocks
going to use esprima to consume an AST is pretty trivial, but unsure how we are going to reverse if we go to CFG...
Bradley Meck
@bmeck
@chrisdickinson added better link to see hydrogen representation to priorwork
Bradley Meck
@bmeck
anyone on next call please take a small look at the IR hydrogen uses
similar vein but another AST
Bradley Meck
@bmeck
@chrisdickinson ^ another output format to keep in mind (CFG w/ intrinsics -> CFG -> JS | WebASM) ... things are getting complicated...
but we still have use for the CFG
Chris Dickinson
@chrisdickinson
sending my apologies for today — a bit swamped with first day stuff!
Bradley Meck
@bmeck
sure
Bradley Meck
@bmeck
finally read all of the WASM spec/design discussions @_@
took a while to get through but we could target that a bit (sans type annotation)
i think it doesn't differ with IRHydrogen too much, except names of things
it is an ast though so we would still need to unroll loops
Bradley Meck
@bmeck
@sebmck in good news WASM is much closer to what we want than I originally read
Bradley Meck
@bmeck
@chrisdickinson have you gotten through WASM fully yet?
Sebastian
@removed~kittens
@bmeck awesome
Bradley Meck
@bmeck
@sebmck so a SSA and unrolled WASM is a viable target
would still want to abbreviate things with intrinsics vs the fully compiled WASM
so one step lower, and one step higher... which feels strange but WASM is strange