diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog index bff2bfaa2c5e3d3bf33efd6ad4239527ea5dae9c..1b93261605fb00da1cfd13aec7720a4b9b845fa2 100644 --- a/JavaScriptCore/ChangeLog +++ b/JavaScriptCore/ChangeLog @@ -1,3 +1,20 @@ +2008-10-17 Cameron Zwarich + + 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 Reviewed by Cameron Zwarich. diff --git a/JavaScriptCore/VM/CTI.cpp b/JavaScriptCore/VM/CTI.cpp index 8529be5f63174ad65a7918aac7b96df91c4df89b..93b8af366cd4d44dec4d5e4595ec73fa69f539cf 100644 --- a/JavaScriptCore/VM/CTI.cpp +++ b/JavaScriptCore/VM/CTI.cpp @@ -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(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(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(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(info.hotPathBegin) + repatchOffsetPutByIdPropertyMapOffset, cachedOffset * sizeof(JSValue*)); diff --git a/JavaScriptCore/VM/Machine.cpp b/JavaScriptCore/VM/Machine.cpp index 0ade70588cec00a26a6d374ad179e00294f0b1cc..cf6d8d7a2582b6c925bdca2dfcae0d3ca2295443 100644 --- a/JavaScriptCore/VM/Machine.cpp +++ b/JavaScriptCore/VM/Machine.cpp @@ -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(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(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(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(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(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(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(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(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(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(cti_op_get_by_id_generic)); VM_CHECK_EXCEPTION_AT_END(); return result;