Title: [254244] trunk/Source/_javascript_Core
Revision
254244
Author
msab...@apple.com
Date
2020-01-08 18:04:19 -0800 (Wed, 08 Jan 2020)

Log Message

Instruction.h: Multiplication result converted to larger type
https://bugs.webkit.org/show_bug.cgi?id=205945

Reviewed by Mark Lam.

* bytecode/Instruction.h:
(JSC::BaseInstruction::size const):
Changed the types to size_t so that the computation is computed accordingly.

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (254243 => 254244)


--- trunk/Source/_javascript_Core/ChangeLog	2020-01-09 02:00:06 UTC (rev 254243)
+++ trunk/Source/_javascript_Core/ChangeLog	2020-01-09 02:04:19 UTC (rev 254244)
@@ -1,3 +1,15 @@
+2020-01-08  Michael Saboff  <msab...@apple.com>
+
+        Instruction.h: Multiplication result converted to larger type
+        https://bugs.webkit.org/show_bug.cgi?id=205945
+
+        Reviewed by Mark Lam.
+
+        * bytecode/Instruction.h:
+        (JSC::BaseInstruction::size const):
+        Changed the types to size_t so that the computation is computed accordingly.
+
+
 2020-01-08  Yusuke Suzuki  <ysuz...@apple.com>
 
         Reduce binary size by purging C++ type information in Objective-C fields and parameters

Modified: trunk/Source/_javascript_Core/bytecode/Instruction.h (254243 => 254244)


--- trunk/Source/_javascript_Core/bytecode/Instruction.h	2020-01-09 02:00:06 UTC (rev 254243)
+++ trunk/Source/_javascript_Core/bytecode/Instruction.h	2020-01-09 02:04:19 UTC (rev 254244)
@@ -118,8 +118,8 @@
     size_t size() const
     {
         auto sizeShiftAmount = this->sizeShiftAmount<Traits>();
-        auto prefixSize = sizeShiftAmount ? 1 : 0;
-        auto operandSize = 1 << sizeShiftAmount;
+        size_t prefixSize = sizeShiftAmount ? 1 : 0;
+        size_t operandSize = static_cast<size_t>(1) << sizeShiftAmount;
         size_t sizeOfBytecode = 1;
         return sizeOfBytecode + (Traits::opcodeLengths[opcodeID<Traits>()] - 1) * operandSize + prefixSize;
     }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to