diff --git a/vm/builtin/compiledcode.cpp b/vm/builtin/compiledcode.cpp index dc70628ad1..7df82ce491 100644 --- a/vm/builtin/compiledcode.cpp +++ b/vm/builtin/compiledcode.cpp @@ -361,7 +361,7 @@ namespace rubinius { } CompiledCode* CompiledCode::of_sender(STATE, CallFrame* calling_environment) { - CallFrame* caller = static_cast(calling_environment->previous); + CallFrame* caller = calling_environment->previous; if(caller) { if(caller->cm) { return caller->cm; diff --git a/vm/builtin/location.cpp b/vm/builtin/location.cpp index 2e4c6f7c7b..296300850a 100644 --- a/vm/builtin/location.cpp +++ b/vm/builtin/location.cpp @@ -60,7 +60,7 @@ namespace rubinius { } Location* Location::of_closest_ruby_method(STATE, CallFrame* calling_environment) { - CallFrame* dest = static_cast(calling_environment->previous); + CallFrame* dest = calling_environment->previous; // Skip any frames for native methods while(dest->native_method_p()) { dest = dest->previous; } return Location::create(state, dest, false); @@ -96,7 +96,7 @@ namespace rubinius { // First the first normal frame while(!call_frame->cm) { - call_frame = static_cast(call_frame->previous); + call_frame = call_frame->previous; // Weird edge case. if(!call_frame) return bt; } @@ -106,7 +106,7 @@ namespace rubinius { bt->append(state, loc); - call_frame = static_cast(call_frame->previous); + call_frame = call_frame->previous; while(call_frame) { // Ignore synthetic frames @@ -117,7 +117,7 @@ namespace rubinius { if(loc) bt->append(state, loc); } - call_frame = static_cast(call_frame->previous); + call_frame = call_frame->previous; } return bt; @@ -169,7 +169,7 @@ namespace rubinius { Tuple::from(state, 4, call_frame->cm, line, block, name)); } - call_frame = static_cast(call_frame->previous); + call_frame = call_frame->previous; } return bt; diff --git a/vm/builtin/system.cpp b/vm/builtin/system.cpp index 36a44da3b2..7dc30ed27a 100644 --- a/vm/builtin/system.cpp +++ b/vm/builtin/system.cpp @@ -600,7 +600,7 @@ namespace rubinius { bool include_vars = CBOOL(inc_vars); for(native_int i = skip->to_native(); call_frame && i > 0; --i) { - call_frame = static_cast(call_frame->previous); + call_frame = call_frame->previous; } return Location::from_call_stack(state, call_frame, include_vars); @@ -611,7 +611,7 @@ namespace rubinius { CallFrame* call_frame = calling_environment; for(native_int i = skip->to_native(); call_frame && i > 0; --i) { - call_frame = static_cast(call_frame->previous); + call_frame = call_frame->previous; } return Location::mri_backtrace(state, call_frame); diff --git a/vm/builtin/variable_scope.cpp b/vm/builtin/variable_scope.cpp index f320868f7a..91fd9ff5e5 100644 --- a/vm/builtin/variable_scope.cpp +++ b/vm/builtin/variable_scope.cpp @@ -30,7 +30,7 @@ namespace rubinius { } VariableScope* VariableScope::of_sender(STATE, CallFrame* call_frame) { - CallFrame* dest = static_cast(call_frame->previous); + CallFrame* dest = call_frame->previous; // Skip any frames for native methods while(dest->native_method_p()) { dest = dest->previous; } return dest->promote_scope(state); diff --git a/vm/call_frame.cpp b/vm/call_frame.cpp index 4b9d65f96c..7581490bb3 100644 --- a/vm/call_frame.cpp +++ b/vm/call_frame.cpp @@ -91,12 +91,12 @@ namespace rubinius { } stream << std::endl; - cf = static_cast(cf->previous); + cf = cf->previous; continue; } if(!cf->cm) { - cf = static_cast(cf->previous); + cf = cf->previous; continue; } @@ -160,7 +160,7 @@ namespace rubinius { stream << ")"; stream << std::endl; - cf = static_cast(cf->previous); + cf = cf->previous; } } @@ -175,7 +175,7 @@ namespace rubinius { CallFrame* cur = this; while(cur) { if(cur->scope && cur->scope->on_heap() == scope) return true; - cur = static_cast(cur->previous); + cur = cur->previous; } return false; diff --git a/vm/gc/gc.cpp b/vm/gc/gc.cpp index 1141f35f70..784c856332 100644 --- a/vm/gc/gc.cpp +++ b/vm/gc/gc.cpp @@ -245,7 +245,7 @@ namespace rubinius { saw_variable_scope(call_frame, displace(call_frame->scope, offset)); - call_frame = static_cast(call_frame->previous); + call_frame = call_frame->previous; } }