Skip to content

Commit

Permalink
Delay set_call_frame
Browse files Browse the repository at this point in the history
  • Loading branch information
ryoqun committed Mar 26, 2013
1 parent 73bafbc commit 48e9057
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion vm/codegen/field_extract.rb
Expand Up @@ -18,7 +18,6 @@ def emit_counter

def output_header(str)
str << "Object* Primitives::#{@name}(STATE, CallFrame* call_frame, Executable* exec, Module* mod, Arguments& args) {\n"
str << " state->set_call_frame(call_frame);\n"
str << emit_counter
# str << " std::cout << \"[Primitive #{@name}]\\n\";\n"
str << " Object* ret;\n"
Expand Down Expand Up @@ -86,6 +85,7 @@ def output_call(str, call, args)
str << " RUBINIUS_METHOD_PRIMITIVE_RETURN_HOOK(state, mod, args.name(), call_frame);\n"
str << "#endif\n"
str << " } catch(const RubyException& exc) {\n"
str << " state->set_call_frame(call_frame);\n"
str << " exc.exception->locations(state,\n"
str << " Location::from_call_stack(state, call_frame));\n"
str << " state->raise_exception(exc.exception);\n"
Expand All @@ -97,6 +97,7 @@ def output_call(str, call, args)
str << " goto fail;\n\n"
prim_return(str);
str << "fail:\n"
str << " state->set_call_frame(call_frame);\n"
str << " return CompiledCode::primitive_failed(state, call_frame, exec, mod, args);\n"
str << "}\n\n"
end
Expand Down

0 comments on commit 48e9057

Please sign in to comment.