WebKit Bugzilla
Attachment 358075 Details for
Bug 193035
: [JSC][Win][Clang] warning: implicit conversion from 'size_t' (aka 'unsigned long long') to 'int32_t' (aka 'int') changes value from 18446744073709551552 to -64 [-Wconstant-conversion]
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-193035-20181226155511.patch (text/plain), 5.63 KB, created by
Fujii Hironori
on 2018-12-25 22:55:12 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Fujii Hironori
Created:
2018-12-25 22:55:12 PST
Size:
5.63 KB
patch
obsolete
>Subversion Revision: 239551 >diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index 0db65496050440b7997f8f561f98171a548c011f..e1a3b1a56b1f79813e52dea7a915b124fc399c17 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,22 @@ >+2018-12-25 Fujii Hironori <Hironori.Fujii@sony.com> >+ >+ [JSC][Win][Clang] warning: implicit conversion from 'size_t' (aka 'unsigned long long') to 'int32_t' (aka 'int') changes value from 18446744073709551552 to -64 [-Wconstant-conversion] >+ https://bugs.webkit.org/show_bug.cgi?id=193035 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Clang-cl reports a compilation warning for implicit conversion >+ from -64 size_t to int. Replaced '-maxFrameExtentForSlowPathCall' >+ with '-static_cast<int32_t>(maxFrameExtentForSlowPathCall)'. >+ >+ * dfg/DFGJITCompiler.cpp: >+ (JSC::DFG::JITCompiler::compile): >+ (JSC::DFG::JITCompiler::compileFunction): >+ * jit/JIT.cpp: >+ (JSC::JIT::compileWithoutLinking): >+ * jit/ThunkGenerators.cpp: >+ (JSC::slowPathFor): >+ > 2018-12-13 Yusuke Suzuki <yusukesuzuki@slowstart.org> > > [BigInt] Support BigInt in JSON.stringify >diff --git a/Source/JavaScriptCore/dfg/DFGJITCompiler.cpp b/Source/JavaScriptCore/dfg/DFGJITCompiler.cpp >index 43376421756a95e00dfa073da87f7c15517b663f..fcbd53b82b5bbc42b591af71ebfd99e85f85375b 100644 >--- a/Source/JavaScriptCore/dfg/DFGJITCompiler.cpp >+++ b/Source/JavaScriptCore/dfg/DFGJITCompiler.cpp >@@ -387,7 +387,7 @@ void JITCompiler::compile() > emitStoreCodeOrigin(CodeOrigin(0)); > > if (maxFrameExtentForSlowPathCall) >- addPtr(TrustedImm32(-maxFrameExtentForSlowPathCall), stackPointerRegister); >+ addPtr(TrustedImm32(-static_cast<int32_t>(maxFrameExtentForSlowPathCall)), stackPointerRegister); > > m_speculative->callOperationWithCallFrameRollbackOnException(operationThrowStackOverflowError, m_codeBlock); > >@@ -463,7 +463,7 @@ void JITCompiler::compileFunction() > emitStoreCodeOrigin(CodeOrigin(0)); > > if (maxFrameExtentForSlowPathCall) >- addPtr(TrustedImm32(-maxFrameExtentForSlowPathCall), stackPointerRegister); >+ addPtr(TrustedImm32(-static_cast<int32_t>(maxFrameExtentForSlowPathCall)), stackPointerRegister); > > m_speculative->callOperationWithCallFrameRollbackOnException(operationThrowStackOverflowError, m_codeBlock); > >@@ -483,7 +483,7 @@ void JITCompiler::compileFunction() > branch32(AboveOrEqual, GPRInfo::regT1, TrustedImm32(m_codeBlock->numParameters())).linkTo(fromArityCheck, this); > emitStoreCodeOrigin(CodeOrigin(0)); > if (maxFrameExtentForSlowPathCall) >- addPtr(TrustedImm32(-maxFrameExtentForSlowPathCall), stackPointerRegister); >+ addPtr(TrustedImm32(-static_cast<int32_t>(maxFrameExtentForSlowPathCall)), stackPointerRegister); > m_speculative->callOperationWithCallFrameRollbackOnException(m_codeBlock->m_isConstructor ? operationConstructArityCheck : operationCallArityCheck, GPRInfo::regT0); > if (maxFrameExtentForSlowPathCall) > addPtr(TrustedImm32(maxFrameExtentForSlowPathCall), stackPointerRegister); >diff --git a/Source/JavaScriptCore/jit/JIT.cpp b/Source/JavaScriptCore/jit/JIT.cpp >index 915b33d37e6b6a2d58ba254bbfbf3e9571bb8019..39bfd64c0405b589b6cbc0bac81757f9e6a6576f 100644 >--- a/Source/JavaScriptCore/jit/JIT.cpp >+++ b/Source/JavaScriptCore/jit/JIT.cpp >@@ -729,7 +729,7 @@ void JIT::compileWithoutLinking(JITCompilationEffort effort) > stackOverflow.link(this); > m_bytecodeOffset = 0; > if (maxFrameExtentForSlowPathCall) >- addPtr(TrustedImm32(-maxFrameExtentForSlowPathCall), stackPointerRegister); >+ addPtr(TrustedImm32(-static_cast<int32_t>(maxFrameExtentForSlowPathCall)), stackPointerRegister); > callOperationWithCallFrameRollbackOnException(operationThrowStackOverflowError, m_codeBlock); > > // If the number of parameters is 1, we never require arity fixup. >@@ -746,7 +746,7 @@ void JIT::compileWithoutLinking(JITCompilationEffort effort) > m_bytecodeOffset = 0; > > if (maxFrameExtentForSlowPathCall) >- addPtr(TrustedImm32(-maxFrameExtentForSlowPathCall), stackPointerRegister); >+ addPtr(TrustedImm32(-static_cast<int32_t>(maxFrameExtentForSlowPathCall)), stackPointerRegister); > callOperationWithCallFrameRollbackOnException(m_codeBlock->m_isConstructor ? operationConstructArityCheck : operationCallArityCheck); > if (maxFrameExtentForSlowPathCall) > addPtr(TrustedImm32(maxFrameExtentForSlowPathCall), stackPointerRegister); >diff --git a/Source/JavaScriptCore/jit/ThunkGenerators.cpp b/Source/JavaScriptCore/jit/ThunkGenerators.cpp >index 0777791599ec37f2c09ecbd2c4a71ac01b78b204..8630cd662ea3023ca54c15bf8fb550e2a18b3712 100644 >--- a/Source/JavaScriptCore/jit/ThunkGenerators.cpp >+++ b/Source/JavaScriptCore/jit/ThunkGenerators.cpp >@@ -90,7 +90,7 @@ static void slowPathFor(CCallHelpers& jit, VM* vm, Sprt_JITOperation_ECli slowPa > // Other argument values are shift by 1. Use space on the stack for our two return values. > // Moving the stack down maxFrameExtentForSlowPathCall bytes gives us room for our 3 arguments > // and space for the 16 byte return area. >- jit.addPtr(CCallHelpers::TrustedImm32(-maxFrameExtentForSlowPathCall), CCallHelpers::stackPointerRegister); >+ jit.addPtr(CCallHelpers::TrustedImm32(-static_cast<int32_t>(maxFrameExtentForSlowPathCall)), CCallHelpers::stackPointerRegister); > jit.move(GPRInfo::regT2, GPRInfo::argumentGPR2); > jit.addPtr(CCallHelpers::TrustedImm32(32), CCallHelpers::stackPointerRegister, GPRInfo::argumentGPR0); > jit.move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR1);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193035
: 358075