From 625bf3d83193ef1766404d099f9c8ad6485a54f9 Mon Sep 17 00:00:00 2001 From: "cwzwarich@webkit.org" Date: Fri, 17 Oct 2008 10:15:10 +0000 Subject: [PATCH] 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): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37651 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- JavaScriptCore/ChangeLog | 17 +++++++++++++++++ JavaScriptCore/VM/CTI.cpp | 4 ++-- JavaScriptCore/VM/Machine.cpp | 20 ++++++++++---------- 3 files changed, 29 insertions(+), 12 deletions(-) diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog index bff2bfaa2c5..1b93261605f 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 8529be5f631..93b8af366cd 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 0ade70588ce..cf6d8d7a258 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; -- GitLab