Skip to content

Commit

Permalink
Temporarily disable JIT for keywords.
Browse files Browse the repository at this point in the history
  • Loading branch information
brixen committed Jan 11, 2015
1 parent ffd327f commit ae81a26
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
4 changes: 2 additions & 2 deletions spec/tags/jit/method_tags.txt
@@ -1,2 +1,2 @@
fails:JIT compiling a method call to m(a: 0) returns the default keyword value when passed no arguments
fails:JIT compiling a method call to m(a=1, **kw) when passed one argument assigns non-Symbol keys to the default argument
fails:JIT compiling a method call to m(a: 0) compiles
fails:JIT compiling a method call to m(a=1, **kw) compiles
21 changes: 18 additions & 3 deletions vm/llvm/state.cpp
Expand Up @@ -454,6 +454,11 @@ namespace rubinius {
{
if(!enabled_) return;

// TODO: Fix compile policy checks
if(!code->keywords()->nil_p()) {
return;
}

JITCompileRequest* req = JITCompileRequest::create(state, code, receiver_class,
0, block_env, is_block);

Expand Down Expand Up @@ -482,6 +487,11 @@ namespace rubinius {

if(!enabled_) return;

// TODO: Fix compile policy checks
if(!code->keywords()->nil_p()) {
return;
}

if(code->machine_code()->call_count <= 1) {
return;
}
Expand Down Expand Up @@ -536,16 +546,21 @@ namespace rubinius {

const static size_t eMaxInlineSendCount = 10;

void LLVMState::compile_callframe(STATE, GCToken gct, CompiledCode* start, CallFrame* call_frame,
int primitive) {
void LLVMState::compile_callframe(STATE, GCToken gct, CompiledCode* start,
CallFrame* call_frame, int primitive)
{
// TODO: Fix compile policy checks
if(!start->keywords()->nil_p()) {
return;
}

if(debug_search) {
std::cout << std::endl << "JIT: triggered: "
<< enclosure_name(start) << "#"
<< symbol_debug_str(start->name()) << std::endl;
}

CallFrame* candidate = find_candidate(state, start, call_frame);
CallFrame* candidate = find_candidate(state, start, call_frame);
if(!candidate || candidate->jitted_p() || candidate->inline_method_p()) {
if(config().jit_show_compiling) {
llvm::outs() << "[[[ JIT error finding call frame "
Expand Down

0 comments on commit ae81a26

Please sign in to comment.