Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Don't allow Number as an imported mutable global
Browse files Browse the repository at this point in the history
See issue #9.
  • Loading branch information
binji committed Apr 9, 2018
1 parent e08d3cc commit 76d8b92
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion document/js-api/index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,9 @@ A {{Module}} object represents a single WebAssembly module. Each {{Module}} obje
1. Let |externfunc| be the [=external value=] [=external value|π–Ώπ—Žπ—‡π–Ό=] |funcaddr|.
1. [=Append=] |externfunc| to |imports|.
1. If |externtype| is of the form [=π—€π—…π—ˆπ–»π–Ίπ—…=] |globaltype|,
1. If |globaltype| [=Type=](|v|) is [=Number=],
1. If [=Type=](|v|) is [=Number=],
1. If |globaltype| is [=π—‚πŸ¨πŸ¦=], throw a {{LinkError}} exception.
1. If |globaltype|.<em>[=global type|mut=]</em> is [=var=], throw a {{LinkError}} exception.
1. Let |value| be [=ToWebAssemblyValue=](|v|, |globaltype|.<em>[=global type|valtype=]</em>)
1. Let |store| be the current agent's [=associated store=].
1. Let (|store|, |globaladdr|) be [=alloc_global=](|store|, |globaltype|, |value|).
Expand Down

0 comments on commit 76d8b92

Please sign in to comment.