Skip to content

Commit

Permalink
[wast mode] Rename atomic.notify and *.atomic.wait
Browse files Browse the repository at this point in the history
  • Loading branch information
bmeurer authored and marijnh committed Jun 22, 2020
1 parent 41077c8 commit dfb497c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions mode/wast/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@
'[keyword f64.store] [keyword offset]=[number 4] [keyword align]=[number 4]');

MT('atomic-memory-instructions',
'[keyword atomic.notify] [keyword offset]=[number 32] [keyword align]=[number 4]',
'[keyword i32.atomic.wait] [keyword offset]=[number 32] [keyword align]=[number 4]',
'[keyword i64.atomic.wait] [keyword offset]=[number 32] [keyword align]=[number 4]',
'[keyword memory.atomic.notify] [keyword offset]=[number 32] [keyword align]=[number 4]',
'[keyword memory.atomic.wait32] [keyword offset]=[number 32] [keyword align]=[number 4]',
'[keyword memory.atomic.wait64] [keyword offset]=[number 32] [keyword align]=[number 4]',
'[keyword i32.atomic.load] [keyword offset]=[number 32] [keyword align]=[number 4]',
'[keyword i32.atomic.load8_u] [keyword offset]=[number 32] [keyword align]=[number 4]',
'[keyword i32.atomic.load16_u] [keyword offset]=[number 32] [keyword align]=[number 4]',
Expand Down
2 changes: 1 addition & 1 deletion mode/wast/wast.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
CodeMirror.defineSimpleMode('wast', {
start: [
{regex: /[+\-]?(?:nan(?::0x[0-9a-fA-F]+)?|infinity|inf|0x[0-9a-fA-F]+\.?[0-9a-fA-F]*p[+\/-]?\d+|\d+(?:\.\d*)?[eE][+\-]?\d*|\d+\.\d*|0x[0-9a-fA-F]+|\d+)/, token: "number"},
{regex: /mut|nop|block|if|then|else|loop|br_if|br_table|br|call(_indirect)?|drop|end|return(_call(_indirect)?)?|local\.(get|set|tee)|global\.(get|set)|i(32|64)\.(store(8|16)|(load(8|16)_[su]))|i64\.(load32_[su]|store32)|[fi](32|64)\.(const|load|store)|f(32|64)\.(abs|add|ceil|copysign|div|eq|floor|[gl][et]|max|min|mul|nearest|neg?|sqrt|sub|trunc)|i(32|64)\.(a[dn]d|c[lt]z|(div|rem)_[su]|eqz?|[gl][te]_[su]|mul|ne|popcnt|rot[lr]|sh(l|r_[su])|sub|x?or)|i64\.extend_[su]_i32|i32\.wrap_i64|i(32|64)\.trunc_f(32|64)_[su]|f(32|64)\.convert_i(32|64)_[su]|f64\.promote_f32|f32\.demote_f64|f32\.reinterpret_i32|i32\.reinterpret_f32|f64\.reinterpret_i64|i64\.reinterpret_f64|select|unreachable|current_memory|memory\.(size|grow)|type|func|param|result|local|global|module|table|memory|start|elem|data|align|offset|import|export|atomic\.notify|i64\.atomic\.(load32_u|store32|rmw32\.(a[dn]d|sub|x?or|(cmp)?xchg)_u)|i(32|64)\.atomic\.(wait|load((8|16)_u)?|store(8|16)?|rmw(\.(a[dn]d|sub|x?or|(cmp)?xchg)|(8|16)\.(a[dn]d|sub|x?or|(cmp)?xchg)_u))/, token: "keyword"},
{regex: /mut|nop|block|if|then|else|loop|br_if|br_table|br|call(_indirect)?|drop|end|return(_call(_indirect)?)?|local\.(get|set|tee)|global\.(get|set)|i(32|64)\.(store(8|16)|(load(8|16)_[su]))|i64\.(load32_[su]|store32)|[fi](32|64)\.(const|load|store)|f(32|64)\.(abs|add|ceil|copysign|div|eq|floor|[gl][et]|max|min|mul|nearest|neg?|sqrt|sub|trunc)|i(32|64)\.(a[dn]d|c[lt]z|(div|rem)_[su]|eqz?|[gl][te]_[su]|mul|ne|popcnt|rot[lr]|sh(l|r_[su])|sub|x?or)|i64\.extend_[su]_i32|i32\.wrap_i64|i(32|64)\.trunc_f(32|64)_[su]|f(32|64)\.convert_i(32|64)_[su]|f64\.promote_f32|f32\.demote_f64|f32\.reinterpret_i32|i32\.reinterpret_f32|f64\.reinterpret_i64|i64\.reinterpret_f64|select|unreachable|current_memory|memory(\.((atomic\.(notify|wait(32|64)))|grow|size))?|type|func|param|result|local|global|module|table|start|elem|data|align|offset|import|export|i64\.atomic\.(load32_u|store32|rmw32\.(a[dn]d|sub|x?or|(cmp)?xchg)_u)|i(32|64)\.atomic\.(load((8|16)_u)?|store(8|16)?|rmw(\.(a[dn]d|sub|x?or|(cmp)?xchg)|(8|16)\.(a[dn]d|sub|x?or|(cmp)?xchg)_u))/, token: "keyword"},
{regex: /\b(anyfunc|[fi](32|64))\b/, token: "atom"},
{regex: /\$([a-zA-Z0-9_`\+\-\*\/\\\^~=<>!\?@#$%&|:\.]+)/, token: "variable-2"},
{regex: /"(?:[^"\\\x00-\x1f\x7f]|\\[nt\\'"]|\\[0-9a-fA-F][0-9a-fA-F])*"/, token: "string"},
Expand Down

0 comments on commit dfb497c

Please sign in to comment.