Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
add notes file
  • Loading branch information
Katelyn Martin committed Jun 22, 2020
commit b426267ab26756c46e5fcc28a091d8c38bdf20b2
74 changes: 74 additions & 0 deletions notes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
```
;; `threads.wat` fixture
;;
;; Built with `wat2wasm --enable-bulk-memory --enable-threads`
(module
(memory $0 1 1)
(data (i32.const 0) "")
(func $f (data.drop 0))
)
```

```
; wasm-objdump --headers twiggy/tests/all/fixtures/threads.wasm

threads.wasm: file format wasm 0x1

Sections:

Type start=0x0000000a end=0x0000000e (size=0x00000004) count: 1
Function start=0x00000010 end=0x00000012 (size=0x00000002) count: 1
Memory start=0x00000014 end=0x00000018 (size=0x00000004) count: 1
DataCount start=0x0000001a end=0x0000001b (size=0x00000001) count: 1
Code start=0x0000001d end=0x00000024 (size=0x00000007) count: 1
Data start=0x00000026 end=0x0000002c (size=0x00000006) count: 1
```

```
; wasm-objdump --full-contents twiggy/tests/all/fixtures/threads.wasm

threads.wasm: file format wasm 0x1

Contents of section Type:
000000a: 0160 0000 .`..

Contents of section Function:
0000010: 0100 ..

Contents of section Memory:
0000014: 0101 0101 ....

Contents of section DataCount:
000001a: 01 .

Contents of section Code:
000001d: 0105 00fc 0900 0b .......

Contents of section Data:
0000026: 0100 4100 0b00 ..A...
```

```
; target/debug/twiggy top twiggy/tests/all/fixtures/threads.wasm

Shallow Bytes β”‚ Shallow % β”‚ Item
───────────────┼───────────┼───────────────────────
8 β”Š 18.18% β”Š wasm magic bytes
7 β”Š 15.91% β”Š code[0]
6 β”Š 13.64% β”Š code section headers
5 β”Š 11.36% β”Š data[0]
3 β”Š 6.82% β”Š type[0]: () -> nil
3 β”Š 6.82% β”Š type section headers
3 β”Š 6.82% β”Š memory[0]
3 β”Š 6.82% β”Š memory section headers
3 β”Š 6.82% β”Š "data count" section
3 β”Š 6.82% β”Š data section headers
44 β”Š 100.00% β”Š Ξ£ [10 Total Rows]
```

```
; exa -l --header twiggy/tests/all/fixtures/threads.wasm

Permissions Size User Date Modified Name
.rw-rw-r-- 44 katelyn 21 Jun 23:07 twiggy/tests/all/fixtures/threads.wasm
```