Skip to content
Merged
Changes from all commits
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
30 changes: 15 additions & 15 deletions document/js-api/index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1933,7 +1933,7 @@ The <dfn abstract-op lt="CharCodeAt ">CharCodeAt(|string|, |index|)</dfn> abstra

<h4 id="js-string-cast">cast</h4>

The |funcType| of this builtin is `(func (param externref) (result externref))`.
The |funcType| of this builtin is `(rec (type (func (param externref) (result externref)))).0`.

<div algorithm="js-string-cast">
When this builtin is invoked with parameter |v|, the following steps must be run:
Expand All @@ -1944,7 +1944,7 @@ When this builtin is invoked with parameter |v|, the following steps must be run

<h4 id="js-string-test">test</h4>

The |funcType| of this builtin is `(func (param externref) (result i32))`.
The |funcType| of this builtin is `(rec (type (func (param externref) (result i32)))).0`.

<div algorithm="js-string-test">
When this builtin is invoked with parameter |v|, the following steps must be run:
Expand All @@ -1957,9 +1957,9 @@ When this builtin is invoked with parameter |v|, the following steps must be run

<h4 id="js-string-fromCharCodeArray">fromCharCodeArray</h4>

The |funcType| of this builtin is `(func (param (ref null (array (mut i16))) i32 i32) (result externref))`.
Let |arrayType| be `(rec (type (array (mut i16)))).0`.

Note: This function only takes a mutable i16 array defined in its own recursion group.
The |funcType| of this builtin is `(rec (type (func (param (ref null arrayType) i32 i32) (result externref)))).0`.

<div algorithm="js-string-fromCharCodeArray">
When this builtin is invoked with parameters |array|, |start|, and |end|, the following steps must be run:
Expand All @@ -1982,9 +1982,9 @@ When this builtin is invoked with parameters |array|, |start|, and |end|, the fo

<h4 id="js-string-intoCharCodeArray">intoCharCodeArray</h4>

The |funcType| of this builtin is `(func (param externref (ref null (array (mut i16))) i32) (result i32))`.
Let |arrayType| be `(rec (type (array (mut i16)))).0`.

Note: This function only takes a mutable i16 array defined in its own recursion group.
The |funcType| of this builtin is `(rec (type (func (param externref (ref null arrayType) i32) (result i32)))).0`.

<div algorithm="js-string-intoCharCodeArray">
When this builtin is invoked with parameters |string|, |array|, and |start|, the following steps must be run:
Expand All @@ -2008,7 +2008,7 @@ When this builtin is invoked with parameters |string|, |array|, and |start|, the

<h4 id="js-string-fromCharCode">fromCharCode</h4>

The |funcType| of this builtin is `(func (param i32) (result externref))`.
The |funcType| of this builtin is `(rec (type (func (param i32) (result externref)))).0`.

<div algorithm="js-string-fromCharCode">
When this builtin is invoked with parameter |v|, the following steps must be run:
Expand All @@ -2019,7 +2019,7 @@ When this builtin is invoked with parameter |v|, the following steps must be run

<h4 id="js-string-fromCodePoint">fromCodePoint</h4>

The |funcType| of this builtin is `(func (param i32) (result externref))`.
The |funcType| of this builtin is `(rec (type (func (param i32) (result externref)))).0`.

<div algorithm="js-string-fromCodePoint">
When this builtin is invoked with parameter |v|, the following steps must be run:
Expand All @@ -2032,7 +2032,7 @@ When this builtin is invoked with parameter |v|, the following steps must be run

<h4 id="js-string-charCodeAt">charCodeAt</h4>

The type of this function is `(func (param externref i32) (result i32))`.
The type of this function is `(rec (type (func (param externref i32) (result i32)))).0`.

<div algorithm="js-string-charCodeAt">
When this builtin is invoked with parameters |string| and |index|, the following steps must be run:
Expand All @@ -2047,7 +2047,7 @@ When this builtin is invoked with parameters |string| and |index|, the following

<h4 id="js-string-codePointAt">codePointAt</h4>

The type of this function is `(func (param externref i32) (result i32))`.
The type of this function is `(rec (type (func (param externref i32) (result i32)))).0`.

<div algorithm="js-string-codePointAt">
When this builtin is invoked with parameters |string| and |index|, the following steps must be run:
Expand All @@ -2062,7 +2062,7 @@ When this builtin is invoked with parameters |string| and |index|, the following

<h4 id="js-string-length">length</h4>

The |funcType| of this builtin is `(func (param externref) (result i32))`.
The |funcType| of this builtin is `(rec (type (func (param externref) (result i32)))).0`.

<div algorithm="js-string-length">
When this builtin is invoked with parameter |v|, the following steps must be run:
Expand All @@ -2074,7 +2074,7 @@ When this builtin is invoked with parameter |v|, the following steps must be run

<h4 id="js-string-concat">concat</h4>

The |funcType| of this builtin is `(func (param externref externref) (result externref))`.
The |funcType| of this builtin is `(rec (type (func (param externref externref) (result externref)))).0`.

<div algorithm="js-string-concat">
When this builtin is invoked with parameters |first| and |second|, the following steps must be run:
Expand All @@ -2087,7 +2087,7 @@ When this builtin is invoked with parameters |first| and |second|, the following

<h4 id="js-string-substring">substring</h4>

The |funcType| of this builtin is `(func (param externref i32 i32) (result externref))`.
The |funcType| of this builtin is `(rec (type (func (param externref i32 i32) (result externref)))).0`.

<div algorithm="js-string-substring">
When this builtin is invoked with parameters |string|, |start|, and |end|, the following steps must be run:
Expand All @@ -2102,7 +2102,7 @@ When this builtin is invoked with parameters |string|, |start|, and |end|, the f

<h4 id="js-string-equals">equals</h4>

The |funcType| of this builtin is `(func (param externref externref) (result i32))`.
The |funcType| of this builtin is `(rec (type (func (param externref externref) (result i32)))).0`.

Note: Explicitly allow null strings to be compared for equality as that is meaningful.

Expand All @@ -2122,7 +2122,7 @@ When this builtin is invoked with parameters |first| and |second|, the following

<h4 id="js-string-compare">compare</h4>

The |funcType| of this builtin is `(func (param externref externref) (result i32))`.
The |funcType| of this builtin is `(rec (type (func (param externref externref) (result i32)))).0`.

<div algorithm="js-string-compare">

Expand Down