reizio / reiz.io

Structural Source Code Search Engine
Other
44 stars 4 forks source link

reiz.ir.optimizer: General #26

Closed isidentical closed 3 years ago

isidentical commented 3 years ago

This is something that I intend to do, both for speed and proper edgeql generation. Each comment will correspond to a single operation on the optimizer

isidentical commented 3 years ago

Logically connected (via OR-matcher) type check will generate the following code

SELECT ast::Expr FILTER .value IS ast::Constant OR .value is ast::Call

which can actually re-written as

SELECT ast::Expr FILTER .value IS ast::Constant | ast::Call