Skip to content

Commit 7b5b6b3

Browse files
Fix Grammar and Links in Docs (boa-dev#2984)
* Fix grammar and improve flow in `debugging.md` * Fix architecture image's background * Update link to JavaScript shell * Readd original drawio diagram
1 parent 2fa9c65 commit 7b5b6b3

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

docs/debugging.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,14 @@ cargo run -- --dump-ast # AST dump format is Debug by default.
3737

3838
## Bytecode generation and Execution
3939

40-
Once the AST has been generated boa will compile it into bytecode.
41-
The bytecode is then executed by the vm.
40+
Once the AST has been generated, boa will compile it into bytecode, which is then executed by the VM.
4241
You can print the bytecode and the executed instructions with the command-line flag `--trace`.
4342

44-
For more detailed information about the vm and the trace output look [here](./vm.md).
43+
For more detailed information about the VM and the trace output look [here](./vm.md).
4544

4645
## Instruction flowgraph
4746

48-
We can to get the vm instructions flowgraph, which is a visual representation of the instruction flow.
47+
We can also get the VM instructions flowgraph, which is a visual representation of the instruction flow.
4948

5049
The `Start` (in green) and `End` (in red) node in the graph represents the start and end point of execution.
5150
They are not instructions, just markers.

docs/img/boa_architecture.png

49.1 KB
Loading

docs/vm.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Architecture
44

5-
![image](img/boa_architecture.drawio.png)
5+
![image](img/boa_architecture.png)
66

77
## Understanding the trace output
88

@@ -71,7 +71,7 @@ The above output contains the following information:
7171

7272
### Comparing ByteCode output
7373

74-
If you wanted another engine's bytecode output for the same JS, SpiderMonkey's bytecode output is the best to use. You can follow the setup [here](https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Introduction_to_the_JavaScript_shell). You will need to build from source because the pre-built binarys don't include the debugging utilities which we need.
74+
If you wanted another engine's bytecode output for the same JS, SpiderMonkey's bytecode output is the best to use. You can follow the setup [here](https://udn.realityripple.com/docs/Mozilla/Projects/SpiderMonkey/Introduction_to_the_JavaScript_shell). You will need to build from source because the pre-built binarys don't include the debugging utilities which we need.
7575

7676
I named the binary `js_shell` as `js` conflicts with NodeJS. Once up and running you should be able to use `js_shell -f tests/js/test.js`. You will get no output to begin with, this is because you need to run `dis()` or `dis([func])` in the code. Once you've done that you should get some output like so:
7777

0 commit comments

Comments
 (0)