Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Sort CompiledCode init code and use LLVM guard

  • Loading branch information...
commit fd7693bb2b34995312a7547126e0340646137b82 1 parent 84224c2
@ryoqun authored
Showing with 9 additions and 3 deletions.
  1. +7 −3 vm/builtin/compiledcode.cpp
  2. +2 −0  vm/builtin/compiledcode.hpp
View
10 vm/builtin/compiledcode.cpp
@@ -48,11 +48,11 @@ namespace rubinius {
CompiledCode* CompiledCode::create(STATE) {
CompiledCode* code = state->new_object<CompiledCode>(G(compiled_code));
code->local_count(state, Fixnum::from(0));
- code->set_executor(CompiledCode::default_executor);
- code->machine_code_ = NULL;
code->inliners_ = 0;
code->prim_index_ = -1;
+ code->set_executor(CompiledCode::default_executor);
+ code->machine_code_ = NULL;
#ifdef ENABLE_LLVM
code->jit_data_ = NULL;
#endif
@@ -65,8 +65,10 @@ namespace rubinius {
code->copy_object(state, this);
code->set_executor(CompiledCode::default_executor);
- code->jit_data_ = NULL;
code->machine_code_ = NULL;
+#ifdef ENABLE_LLVM
+ code->jit_data_ = NULL;
+#endif
return code;
}
@@ -251,7 +253,9 @@ namespace rubinius {
machine_code_->set_execute_status(MachineCode::eJIT);
+#ifdef ENABLE_LLVM
jit_data_ = rd;
+#endif
machine_code_->unspecialized = exec;
// See if we can also just make this the normal execute
View
2  vm/builtin/compiledcode.hpp
@@ -38,7 +38,9 @@ namespace rubinius {
MachineCode* machine_code_;
+#ifdef ENABLE_LLVM
jit::RuntimeDataHolder* jit_data_;
+#endif
public:
// Access directly from assembly, so has to be public.
Please sign in to comment.
Something went wrong with that request. Please try again.