Skip to content

Commit

Permalink
Cleanup last remnands of dynamic interpreter
Browse files Browse the repository at this point in the history
  • Loading branch information
dbussink committed Jul 3, 2011
1 parent 6b29b21 commit 912d530
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 58 deletions.
2 changes: 1 addition & 1 deletion vm/call_frame.hpp
Expand Up @@ -208,7 +208,7 @@ namespace rubinius {
}

CallFrame* top_ruby_frame() {
// Skip over any natime method frames.
// Skip over any native method frames.
CallFrame* cf = this;

while(cf->native_method_p()) {
Expand Down
2 changes: 0 additions & 2 deletions vm/configuration.hpp
Expand Up @@ -19,7 +19,6 @@ namespace rubinius {
config::Bytes gc_malloc_threshold;

// JIT/Interpreter
config::Bool dynamic_interpreter_enabled;
config::Integer jit_dump_code;
config::Integer jit_call_til_compile;
config::Integer jit_max_method_size;
Expand Down Expand Up @@ -83,7 +82,6 @@ namespace rubinius {
, gc_malloc_threshold(this, "gc.malloc_threshold",
default_gc_malloc_threshold)

, dynamic_interpreter_enabled(this, "interpreter.dynamic")
, jit_dump_code(this, "jit.dump_code", default_jit_dump_code)
, jit_call_til_compile(this, "jit.call_til_compile",
default_jit_call_til_compile)
Expand Down
10 changes: 0 additions & 10 deletions vm/vm.cpp
Expand Up @@ -126,16 +126,6 @@ namespace rubinius {
}

void VM::initialize_config() {
#ifdef USE_DYNAMIC_INTERPRETER
if(shared.config.dynamic_interpreter_enabled) {
G(rubinius)->set_const(this, "INTERPRETER", symbol("dynamic"));
} else {
G(rubinius)->set_const(this, "INTERPRETER", symbol("static"));
}
#else
G(rubinius)->set_const(this, "INTERPRETER", symbol("static"));
#endif

#ifdef ENABLE_LLVM
if(!shared.config.jit_disabled) {
Array* ary = Array::create(this, 3);
Expand Down
1 change: 0 additions & 1 deletion vm/vm.hpp
Expand Up @@ -60,7 +60,6 @@ namespace rubinius {
class Object;
class Configuration;
struct Interrupts;
class VMManager;
class Waiter;
class LookupTable;
class SymbolTable;
Expand Down
34 changes: 1 addition & 33 deletions vm/vmmethod.cpp
Expand Up @@ -38,51 +38,19 @@
*/
namespace rubinius {

/** System-wide standard interpreter method pointer. */
static InterpreterRunner standard_interpreter = 0;

/** System-wide dynamic interpreter method pointer. */
static InterpreterRunner dynamic_interpreter = 0;

void** VMMethod::instructions = 0;

void VMMethod::init(STATE) {
// Seed the instructions table
interpreter(0, 0, 0);

#ifdef USE_DYNAMIC_INTERPRETER
if(!state->shared.config.dynamic_interpreter_enabled) {
dynamic_interpreter = NULL;
standard_interpreter = &VMMethod::interpreter;
return;
}

/*
if(dynamic_interpreter == NULL) {
uint8_t* buffer = new uint8_t[1024 * 1024 * 1024];
JITCompiler jit(buffer);
jit.create_interpreter(state);
if(getenv("DUMP_DYN")) {
jit.assembler().show();
}
dynamic_interpreter = reinterpret_cast<Runner>(buffer);
}
*/

standard_interpreter = dynamic_interpreter;
#else
dynamic_interpreter = NULL;
standard_interpreter = &VMMethod::interpreter;
#endif
}

/*
* Turns a CompiledMethod's InstructionSequence into a C array of opcodes.
*/
VMMethod::VMMethod(STATE, CompiledMethod* meth)
: parent_(NULL)
, run(standard_interpreter)
, run(VMMethod::interpreter)
, type(NULL)
, uncommon_count(0)
, number_of_caches_(0)
Expand Down
11 changes: 0 additions & 11 deletions vm/vmmethod.hpp
@@ -1,8 +1,6 @@
#ifndef RBX_VMMETHOD_HPP
#define RBX_VMMETHOD_HPP

#include <vector>

#include "executor.hpp"
#include "gc/root.hpp"
#include "primitives.hpp"
Expand All @@ -19,16 +17,13 @@ namespace llvm {
#endif

namespace rubinius {
typedef void* instlocation;
typedef uintptr_t opcode;
typedef uint32_t bpflags;

class CompiledMethod;
class VMMethod;
class InterpreterCallFrame;
class InlineCache;

typedef Object* (*Runner)(STATE, VMMethod* const vmm, CallFrame* const call_frame);
typedef Object* (*InterpreterRunner)(STATE, VMMethod* const vmm,
InterpreterCallFrame* const call_frame);

Expand Down Expand Up @@ -185,12 +180,6 @@ namespace rubinius {
{}
};

/**
* Dispatch method on the defined interpreter.
*/
static Object* run_interpreter(STATE, VMMethod* const vmm,
InterpreterCallFrame* const call_frame);

/**
* Interpreting implementation.
*
Expand Down

0 comments on commit 912d530

Please sign in to comment.