⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 254602 in webkit


Ignore:
Timestamp:
Jan 15, 2020, 11:15:22 AM (7 years ago)
Author:
Alan Coon
Message:

Cherry-pick r254244. rdar://problem/58553148

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.

git-svn-id: ​https://svn.webkit.org/repository/webkit/trunk@254244 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Location:
branches/safari-609-branch/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-609-branch/Source/JavaScriptCore/ChangeLog

    r254600 r254602  
     12020-01-14  Alan Coon  <alancoon@apple.com>
     2
     3        Cherry-pick r254244. rdar://problem/58553148
     4
     5    Instruction.h: Multiplication result converted to larger type
     6    https://bugs.webkit.org/show_bug.cgi?id=205945
     7   
     8    Reviewed by Mark Lam.
     9   
     10    * bytecode/Instruction.h:
     11    (JSC::BaseInstruction::size const):
     12    Changed the types to size_t so that the computation is computed accordingly.
     13   
     14   
     15    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254244 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     16
     17    2020-01-08  Michael Saboff  <msaboff@apple.com>
     18
     19            Instruction.h: Multiplication result converted to larger type
     20            https://bugs.webkit.org/show_bug.cgi?id=205945
     21
     22            Reviewed by Mark Lam.
     23
     24            * bytecode/Instruction.h:
     25            (JSC::BaseInstruction::size const):
     26            Changed the types to size_t so that the computation is computed accordingly.
     27
     28
    1292020-01-14  Alan Coon  <alancoon@apple.com>
    230
  • branches/safari-609-branch/Source/JavaScriptCore/bytecode/Instruction.h

    r253904 r254602  
    119119    {
    120120        auto sizeShiftAmount = this->sizeShiftAmount<Traits>();
    121         auto prefixSize = sizeShiftAmount ? 1 : 0;
    122         auto operandSize = 1 << sizeShiftAmount;
     121        size_t prefixSize = sizeShiftAmount ? 1 : 0;
     122        size_t operandSize = static_cast<size_t>(1) << sizeShiftAmount;
    123123        size_t sizeOfBytecode = 1;
    124124        return sizeOfBytecode + (Traits::opcodeLengths[opcodeID<Traits>()] - 1) * operandSize + prefixSize;
Note: See TracChangeset for help on using the changeset viewer.