Repository navigation
Commit 807625f
Samuel Groß
Add a basic JavaScript-to-FuzzIL compiler
The new compiler:
- Is (mostly) written in Swift to ensure that changes to FuzzIL are
reflected in the compiler.
- Features an "end-to-end" testsuite that runs as part of `swift test`.
The testsuite consists of a number of JavaScript programs which are
compiled to FuzzIL, then lifted back to JavaScript and checked to
produce the same output as the original code.
- Uses a (fairly) stable protobuf-based AST format which is currently
produced by a node.js-based parser (since there seem to be no good
JavaScript parsers with swift integration), but could also be produced
by any other parser.
The compiler is still quite far away from being feature complete but it
should support the most important language features. Adding support for
more features is usually relatively simple: typically it involves adding
one or more tests to the testuite, adding the relevant AST nodes to
ast.proto, updating the parser script to emit these nodes, and updating
the compiler to handle them. However, some features may require changes
to FuzzIL, such as proper handling of loop headers.
The compiler is currently exposed through the FuzzILTool's --compile
option. In the future we may want to have a more sophisticated CLI
interface, for example to allow removing calls to certain functions
(such as assertX from tests) from the compiled code.1 parent c8b25c3 commit 807625f
156 files changed
Lines changed: 7815 additions & 10340 deletions
File tree
- Cloud
- Docker
- Corpus
- GCE
- Compiler
- bin
- src
- proto
- test
- Sources
- FuzzILTool
- FuzzilliCli
- Fuzzilli
- Base
- CodeGen
- Compiler
- Parser
- Environment
- FuzzIL
- Lifting
- Minimization
- Protobuf
- Util
- Tests/FuzzilliTests
- CompilerTests
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
26 | 29 | | |
27 | 30 | | |
28 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
168 | | - | |
| 168 | + | |
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
| |||
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
0 commit comments