Permalink
Browse files

Cleanup Dispatch usage and remove unused versions

  • Loading branch information...
1 parent 601d515 commit a115c6085c7e453a150b880060b44a52864f5bda @dbussink dbussink committed Mar 26, 2013
Showing with 3 additions and 21 deletions.
  1. +1 −2 vm/builtin/executable.cpp
  2. +0 −1 vm/builtin/system.cpp
  3. +2 −16 vm/dispatch.hpp
  4. +0 −2 vm/test/test_nativefunction.hpp
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();
}

0 comments on commit a115c60

Please sign in to comment.