Commit 625bf3d8 authored by cwzwarich@webkit.org's avatar cwzwarich@webkit.org

2008-10-17 Cameron Zwarich <zwarich@apple.com>

        Rubber-stamped by Maciej Stachowiak.

        Remove some C style casts.

        * VM/CTI.cpp:
        (JSC::CTI::patchGetByIdSelf):
        (JSC::CTI::patchPutByIdReplace):
        * VM/Machine.cpp:
        (JSC::Machine::tryCTICachePutByID):
        (JSC::Machine::tryCTICacheGetByID):
        (JSC::Machine::cti_op_put_by_id):
        (JSC::Machine::cti_op_put_by_id_fail):
        (JSC::Machine::cti_op_get_by_id):
        (JSC::Machine::cti_op_get_by_id_fail):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37651 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 0d68a330
2008-10-17 Cameron Zwarich <zwarich@apple.com>
Rubber-stamped by Maciej Stachowiak.
Remove some C style casts.
* VM/CTI.cpp:
(JSC::CTI::patchGetByIdSelf):
(JSC::CTI::patchPutByIdReplace):
* VM/Machine.cpp:
(JSC::Machine::tryCTICachePutByID):
(JSC::Machine::tryCTICacheGetByID):
(JSC::Machine::cti_op_put_by_id):
(JSC::Machine::cti_op_put_by_id_fail):
(JSC::Machine::cti_op_get_by_id):
(JSC::Machine::cti_op_get_by_id_fail):
2008-10-17 Maciej Stachowiak <mjs@apple.com>
Reviewed by Cameron Zwarich.
......
......@@ -3036,7 +3036,7 @@ void CTI::patchGetByIdSelf(CodeBlock* codeBlock, StructureID* structureID, size_
// We don't want to repatch more than once - in future go to cti_op_get_by_id_generic.
// Should probably go to Machine::cti_op_get_by_id_fail, but that doesn't do anything interesting right now.
ctiRepatchCallByReturnAddress(returnAddress, (void*)(Machine::cti_op_get_by_id_generic));
ctiRepatchCallByReturnAddress(returnAddress, reinterpret_cast<void*>(Machine::cti_op_get_by_id_generic));
// Repatch the offset into the propoerty map to load from, then repatch the StructureID to look for.
X86Assembler::repatchDisplacement(reinterpret_cast<intptr_t>(info.hotPathBegin) + repatchOffsetGetByIdPropertyMapOffset, cachedOffset * sizeof(JSValue*));
......@@ -3049,7 +3049,7 @@ void CTI::patchPutByIdReplace(CodeBlock* codeBlock, StructureID* structureID, si
// We don't want to repatch more than once - in future go to cti_op_put_by_id_generic.
// Should probably go to Machine::cti_op_put_by_id_fail, but that doesn't do anything interesting right now.
ctiRepatchCallByReturnAddress(returnAddress, (void*)(Machine::cti_op_put_by_id_generic));
ctiRepatchCallByReturnAddress(returnAddress, reinterpret_cast<void*>(Machine::cti_op_put_by_id_generic));
// Repatch the offset into the propoerty map to load from, then repatch the StructureID to look for.
X86Assembler::repatchDisplacement(reinterpret_cast<intptr_t>(info.hotPathBegin) + repatchOffsetPutByIdPropertyMapOffset, cachedOffset * sizeof(JSValue*));
......
......@@ -3996,7 +3996,7 @@ NEVER_INLINE void Machine::tryCTICachePutByID(CallFrame* callFrame, CodeBlock* c
// Uncacheable: give up.
if (!slot.isCacheable()) {
ctiRepatchCallByReturnAddress(returnAddress, (void*)cti_op_put_by_id_generic);
ctiRepatchCallByReturnAddress(returnAddress, reinterpret_cast<void*>(cti_op_put_by_id_generic));
return;
}
......@@ -4004,7 +4004,7 @@ NEVER_INLINE void Machine::tryCTICachePutByID(CallFrame* callFrame, CodeBlock* c
StructureID* structureID = baseCell->structureID();
if (structureID->isDictionary()) {
ctiRepatchCallByReturnAddress(returnAddress, (void*)cti_op_put_by_id_generic);
ctiRepatchCallByReturnAddress(returnAddress, reinterpret_cast<void*>(cti_op_put_by_id_generic));
return;
}
......@@ -4018,7 +4018,7 @@ NEVER_INLINE void Machine::tryCTICachePutByID(CallFrame* callFrame, CodeBlock* c
// If baseCell != base, then baseCell must be a proxy for another object.
if (baseCell != slot.base()) {
ctiRepatchCallByReturnAddress(returnAddress, (void*)cti_op_put_by_id_generic);
ctiRepatchCallByReturnAddress(returnAddress, reinterpret_cast<void*>(cti_op_put_by_id_generic));
return;
}
......@@ -4079,7 +4079,7 @@ NEVER_INLINE void Machine::tryCTICacheGetByID(CallFrame* callFrame, CodeBlock* c
// FIXME: Cache property access for immediates.
if (JSImmediate::isImmediate(baseValue)) {
ctiRepatchCallByReturnAddress(returnAddress, (void*)cti_op_get_by_id_generic);
ctiRepatchCallByReturnAddress(returnAddress, reinterpret_cast<void*>(cti_op_get_by_id_generic));
return;
}
......@@ -4100,7 +4100,7 @@ NEVER_INLINE void Machine::tryCTICacheGetByID(CallFrame* callFrame, CodeBlock* c
// Uncacheable: give up.
if (!slot.isCacheable()) {
ctiRepatchCallByReturnAddress(returnAddress, (void*)cti_op_get_by_id_generic);
ctiRepatchCallByReturnAddress(returnAddress, reinterpret_cast<void*>(cti_op_get_by_id_generic));
return;
}
......@@ -4108,7 +4108,7 @@ NEVER_INLINE void Machine::tryCTICacheGetByID(CallFrame* callFrame, CodeBlock* c
StructureID* structureID = baseCell->structureID();
if (structureID->isDictionary()) {
ctiRepatchCallByReturnAddress(returnAddress, (void*)cti_op_get_by_id_generic);
ctiRepatchCallByReturnAddress(returnAddress, reinterpret_cast<void*>(cti_op_get_by_id_generic));
return;
}
......@@ -4377,7 +4377,7 @@ void Machine::cti_op_put_by_id(CTI_ARGS)
PutPropertySlot slot;
ARG_src1->put(callFrame, ident, ARG_src3, slot);
ctiRepatchCallByReturnAddress(CTI_RETURN_ADDRESS, (void*)cti_op_put_by_id_second);
ctiRepatchCallByReturnAddress(CTI_RETURN_ADDRESS, reinterpret_cast<void*>(cti_op_put_by_id_second));
VM_CHECK_EXCEPTION_AT_END();
}
......@@ -4406,7 +4406,7 @@ void Machine::cti_op_put_by_id_fail(CTI_ARGS)
ARG_src1->put(callFrame, ident, ARG_src3, slot);
// should probably uncachePutByID() ... this would mean doing a vPC lookup - might be worth just bleeding this until the end.
ctiRepatchCallByReturnAddress(CTI_RETURN_ADDRESS, (void*)cti_op_put_by_id_generic);
ctiRepatchCallByReturnAddress(CTI_RETURN_ADDRESS, reinterpret_cast<void*>(cti_op_put_by_id_generic));
VM_CHECK_EXCEPTION_AT_END();
}
......@@ -4420,7 +4420,7 @@ JSValue* Machine::cti_op_get_by_id(CTI_ARGS)
PropertySlot slot(baseValue);
JSValue* result = baseValue->get(callFrame, ident, slot);
ctiRepatchCallByReturnAddress(CTI_RETURN_ADDRESS, (void*)cti_op_get_by_id_second);
ctiRepatchCallByReturnAddress(CTI_RETURN_ADDRESS, reinterpret_cast<void*>(cti_op_get_by_id_second));
VM_CHECK_EXCEPTION_AT_END();
return result;
......@@ -4464,7 +4464,7 @@ JSValue* Machine::cti_op_get_by_id_fail(CTI_ARGS)
JSValue* result = baseValue->get(callFrame, ident, slot);
// should probably uncacheGetByID() ... this would mean doing a vPC lookup - might be worth just bleeding this until the end.
ctiRepatchCallByReturnAddress(CTI_RETURN_ADDRESS, (void*)cti_op_get_by_id_generic);
ctiRepatchCallByReturnAddress(CTI_RETURN_ADDRESS, reinterpret_cast<void*>(cti_op_get_by_id_generic));
VM_CHECK_EXCEPTION_AT_END();
return result;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment