Title: [219043] trunk/Source/_javascript_Core
Revision
219043
Author
[email protected]
Date
2017-06-30 22:24:30 -0700 (Fri, 30 Jun 2017)

Log Message

[JSC] Use AbstractMacroAssembler::random instead of holding WeakRandom in JIT
https://bugs.webkit.org/show_bug.cgi?id=174053

Reviewed by Geoffrey Garen.

We already have AbstractMacroAssembler::random() function. Use it instead.

* jit/JIT.cpp:
(JSC::JIT::JIT):
(JSC::JIT::compileWithoutLinking):
* jit/JIT.h:

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (219042 => 219043)


--- trunk/Source/_javascript_Core/ChangeLog	2017-07-01 05:09:40 UTC (rev 219042)
+++ trunk/Source/_javascript_Core/ChangeLog	2017-07-01 05:24:30 UTC (rev 219043)
@@ -1,5 +1,19 @@
 2017-06-30  Yusuke Suzuki  <[email protected]>
 
+        [JSC] Use AbstractMacroAssembler::random instead of holding WeakRandom in JIT
+        https://bugs.webkit.org/show_bug.cgi?id=174053
+
+        Reviewed by Geoffrey Garen.
+
+        We already have AbstractMacroAssembler::random() function. Use it instead.
+
+        * jit/JIT.cpp:
+        (JSC::JIT::JIT):
+        (JSC::JIT::compileWithoutLinking):
+        * jit/JIT.h:
+
+2017-06-30  Yusuke Suzuki  <[email protected]>
+
         [WTF] Drop SymbolRegistry::keyForSymbol
         https://bugs.webkit.org/show_bug.cgi?id=174052
 

Modified: trunk/Source/_javascript_Core/jit/JIT.cpp (219042 => 219043)


--- trunk/Source/_javascript_Core/jit/JIT.cpp	2017-07-01 05:09:40 UTC (rev 219042)
+++ trunk/Source/_javascript_Core/jit/JIT.cpp	2017-07-01 05:24:30 UTC (rev 219043)
@@ -89,7 +89,6 @@
     , m_putByIdIndex(UINT_MAX)
     , m_byValInstructionIndex(UINT_MAX)
     , m_callLinkInfoIndex(UINT_MAX)
-    , m_randomGenerator(cryptographicallyRandomNumber())
     , m_pcToCodeOriginMapBuilder(*vm)
     , m_canBeOptimized(false)
     , m_shouldEmitProfiling(false)
@@ -628,7 +627,7 @@
         m_disassembler->setStartOfCode(label());
 
     // Just add a little bit of randomness to the codegen
-    if (m_randomGenerator.getUint32() & 1)
+    if (random() & 1)
         nop();
 
     emitFunctionPrologue();

Modified: trunk/Source/_javascript_Core/jit/JIT.h (219042 => 219043)


--- trunk/Source/_javascript_Core/jit/JIT.h	2017-07-01 05:09:40 UTC (rev 219042)
+++ trunk/Source/_javascript_Core/jit/JIT.h	2017-07-01 05:24:30 UTC (rev 219043)
@@ -962,7 +962,6 @@
 
         std::unique_ptr<JITDisassembler> m_disassembler;
         RefPtr<Profiler::Compilation> m_compilation;
-        WeakRandom m_randomGenerator;
         static CodeRef stringGetByValStubGenerator(VM*);
 
         PCToCodeOriginMapBuilder m_pcToCodeOriginMapBuilder;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to