Permalink
Browse files

Add third 'module' argument to Task::generate_context

  • Loading branch information...
1 parent 7a3a84c commit 9351ad411038a066182cc54ce0320fe541da0028 Wilson Bilkovich committed Aug 18, 2008
Showing with 6 additions and 6 deletions.
  1. +3 −3 vm/builtin/task.cpp
  2. +1 −1 vm/builtin/task.hpp
  3. +1 −1 vm/instructions_gen.rb
  4. +1 −1 vm/vmmethod.cpp
View
@@ -55,7 +55,7 @@ namespace rubinius {
if(stack_size == 0) stack_size = CompiledMethod::tramp_stack_size;
CompiledMethod* cm = CompiledMethod::generate_tramp(state, stack_size);
- MethodContext* ctx = task->generate_context(G(main), cm);
+ MethodContext* ctx = task->generate_context(G(main), cm, G(object));
SET(task, active, ctx);
@@ -72,13 +72,13 @@ namespace rubinius {
return context;
}
- MethodContext* Task::generate_context(OBJECT recv, CompiledMethod* meth) {
+ MethodContext* Task::generate_context(OBJECT recv, CompiledMethod* meth, Class* module) {
MethodContext* ctx = MethodContext::create(state, meth->stack_size->to_native());
SET(ctx, sender, (MethodContext*)Qnil);
SET(ctx, self, recv);
SET(ctx, cm, meth);
- SET(ctx, module, G(object));
+ SET(ctx, module, module);
SET(ctx, home, ctx);
ctx->vmm = (VMMethod*)meth->executable;
View
@@ -69,7 +69,7 @@ namespace rubinius {
// Ruby.primitive :task_current_context
MethodContext* current_context(STATE);
- MethodContext* generate_context(OBJECT recv, CompiledMethod* meth);
+ MethodContext* generate_context(OBJECT recv, CompiledMethod* meth, Class* module);
void restore_context(MethodContext* ctx);
void make_active(MethodContext* ctx);
void execute();
View
@@ -190,7 +190,7 @@ class TestInstructions : public CxxTest::TestSuite {
cm->literals = Tuple::create(state, 10);
cm->formalize(state);
- MethodContext* ctx = task->generate_context(Qnil, cm);
+ MethodContext* ctx = task->generate_context(Qnil, cm, G(object));
task->make_active(ctx);
// The += 0 disable unused variable warnings.
View
@@ -74,7 +74,7 @@ namespace rubinius {
bool VMMethod::executor(STATE, VMExecutable* exec, Task* task, Message& msg) {
VMMethod* meth = (VMMethod*)exec;
- MethodContext* ctx = task->generate_context(msg.recv, meth->original.get());
+ MethodContext* ctx = task->generate_context(msg.recv, meth->original.get(), G(object));
task->import_arguments(ctx, msg);
task->make_active(ctx);

0 comments on commit 9351ad4

Please sign in to comment.