[Webkit-unassigned] [Bug 201633] New: [JSC] Remove CheckAdd in JetStream2/async-fs's Math.random function
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Sep 9 23:18:37 PDT 2019
https://bugs.webkit.org/show_bug.cgi?id=201633
Bug ID: 201633
Summary: [JSC] Remove CheckAdd in JetStream2/async-fs's
Math.random function
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: JavaScriptCore
Assignee: webkit-unassigned at lists.webkit.org
Reporter: ysuzuki at apple.com
Math.random function implementation in async-fs repeatedly emits CheckAdd.
And this makes PutGlobalVariable un-sunkable, and bloats many code that is not inherently necessary.
35 return function() {
36 // Robert Jenkins' 32 bit integer hash function.
37 seed = ((seed + 0x7ed55d16) + (seed << 12)) & 0xffffffff;
38 seed = ((seed ^ 0xc761c23c) ^ (seed >>> 19)) & 0xffffffff;
39 seed = ((seed + 0x165667b1) + (seed << 5)) & 0xffffffff;
40 seed = ((seed + 0xd3a2646c) ^ (seed << 9)) & 0xffffffff;
41 seed = ((seed + 0xfd7046c5) + (seed << 3)) & 0xffffffff;
42 seed = ((seed ^ 0xb55a4f09) ^ (seed >>> 16)) & 0xffffffff;
43 return (seed & 0xfffffff) / 0x10000000;
44 };
But seems that `& 0xffffffff` is saying that we only care lower 32bit. I would like to check how to remove the above check-add and make this efficient.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190910/dd1db2b4/attachment-0001.html>
More information about the webkit-unassigned
mailing list