File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -449,9 +449,11 @@ be skipped over by an engine. The current list of valid `name_type` codes are:
449
449
450
450
| Name Type | Code | Description |
451
451
| --------- | ---- | ----------- |
452
+ | [ Module] ( #module-name ) | ` 0 ` | Assigns a name to the module |
452
453
| [ Function] ( #function-names ) | ` 1 ` | Assigns names to functions |
453
454
| [ Local] ( #local-names ) | ` 2 ` | Assigns names to locals in functions |
454
455
456
+
455
457
When present, name subsections must appear in this order and at most once. The
456
458
end of the last subsection must coincide with the last byte of the name
457
459
section to be a well-formed name section.
@@ -498,6 +500,16 @@ where a `local_name` is encoded as:
498
500
| index | ` varuint32 ` | the index of the function whose locals are being named |
499
501
| local_map | ` name_map ` | assignment of names to local indices |
500
502
503
+ #### Module name
504
+
505
+ The module name subsection assigns a name to the module itself. It simply
506
+ consists of a single string:
507
+
508
+ | Field | Type | Description |
509
+ | ----- | ---- | ----------- |
510
+ | name_len | ` varuint32 ` | length of ` name_str ` in bytes |
511
+ | name_str | ` bytes ` | UTF-8 encoding of the name |
512
+
501
513
# Function Bodies
502
514
503
515
Function bodies consist of a sequence of local variable declarations followed by
You can’t perform that action at this time.
0 commit comments