Re: [heycam/webidl] Refactor integer conversion in ES bindings. (#235)

tobie commented on this pull request.



> +    1.  If |x| is not <emu-val>NaN</emu-val> and the conversion to an IDL value is being performed due to any of the following:
+        *   |V| is being assigned to an [=attribute=] annotated with the [{{Clamp}}] [=extended attribute=],
+        *   |V| is being passed as an [=operation=] argument annotated with the [{{Clamp}}] extended attribute, or
+        *   |V| is being used as the value of a [=dictionary member=] annotated with the [{{Clamp}}] extended attribute,
+
+        then:
+
+        1.  Set |x| to [=min=]([=max=](|x|, |lowerBound|), |upperBound|).
+        1.  Round |x| to the nearest integer, choosing the even integer if it lies halfway between two,
+            and choosing +0 rather than −0.
+        1.  Return |x|.
+    1.  If |x| is <emu-val>NaN</emu-val>, +0, −0, +∞, or −∞,
+        then return 0.
+    1.  Set |x| to [=!=]<a abstract-op>IntegerPart</a>(|x|).
+    1.  Set |x| to |x| [=modulo=](2<sup>|bitLength|</sup>).
+    1.  If |type| is "unsigned" and |x| ≥ 2<sup>|bitLength| - 1</sup>,

Fixed. (Sorry.)

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/heycam/webidl/pull/235

Received on Friday, 11 November 2016 16:49:10 UTC