Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Cleanup Dispatch usage and remove unused versions

  • Loading branch information...
commit a115c6085c7e453a150b880060b44a52864f5bda 1 parent 601d515
@dbussink dbussink authored
View
3  vm/builtin/executable.cpp
@@ -51,12 +51,11 @@ namespace rubinius {
Object* Executable::invoke(STATE, Symbol* name, Module* mod, Object* recv, Array* ary,
Object* block, CallFrame* call_frame)
{
- Dispatch disp(name, mod, this);
Arguments args(name, recv, 0, 0);
args.use_array(ary);
args.set_block(block);
- return execute(state, call_frame, disp.method, disp.module, args);
+ return execute(state, call_frame, this, mod, args);
}
Object* Executable::default_executor(STATE, CallFrame* call_frame, Executable* exec, Module* mod,
View
1  vm/builtin/system.cpp
@@ -1614,7 +1614,6 @@ namespace rubinius {
Object* System::vm_run_script(STATE, GCToken gct, CompiledCode* code,
CallFrame* calling_environment)
{
- Dispatch msg(state->symbol("__script__"), G(object), code);
Arguments args(state->symbol("__script__"), G(main), cNil, 0, 0);
OnStack<1> os(state, code);
View
18 vm/dispatch.hpp
@@ -18,24 +18,10 @@ namespace rubinius {
Executable* method;
bool method_missing;
- Dispatch()
- : name(0)
- , module(0)
- , method(0)
- , method_missing(false)
- {}
-
Dispatch(Symbol* name)
: name(name)
- , module(reinterpret_cast<Module*>(cNil))
- , method(reinterpret_cast<Executable*>(cNil))
- , method_missing(false)
- {}
-
- Dispatch(Symbol* name, Module* mod, Executable* meth)
- : name(name)
- , module(mod)
- , method(meth)
+ , module(0)
+ , method(0)
, method_missing(false)
{}
View
2  vm/test/test_nativefunction.hpp
@@ -84,8 +84,6 @@ extern "C" {
class TestNativeFunction : public CxxTest::TestSuite, public VMTest {
public:
- Dispatch null_dispatch;
-
void setUp() {
create();
}
Please sign in to comment.
Something went wrong with that request. Please try again.