Skip to content
Browse files

Cleanup last remnands of dynamic interpreter

  • Loading branch information...
1 parent 6b29b21 commit 912d530871f44fa0386cfce4b79598425cc6bd8e @dbussink dbussink committed Jul 3, 2011
Showing with 2 additions and 58 deletions.
  1. +1 −1 vm/call_frame.hpp
  2. +0 −2 vm/configuration.hpp
  3. +0 −10 vm/vm.cpp
  4. +0 −1 vm/vm.hpp
  5. +1 −33 vm/vmmethod.cpp
  6. +0 −11 vm/vmmethod.hpp
View
2 vm/call_frame.hpp
@@ -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()) {
View
2 vm/configuration.hpp
@@ -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;
@@ -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)
View
10 vm/vm.cpp
@@ -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);
View
1 vm/vm.hpp
@@ -60,7 +60,6 @@ namespace rubinius {
class Object;
class Configuration;
struct Interrupts;
- class VMManager;
class Waiter;
class LookupTable;
class SymbolTable;
View
34 vm/vmmethod.cpp
@@ -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)
View
11 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"
@@ -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);
@@ -186,12 +181,6 @@ namespace rubinius {
};
/**
- * Dispatch method on the defined interpreter.
- */
- static Object* run_interpreter(STATE, VMMethod* const vmm,
- InterpreterCallFrame* const call_frame);
-
- /**
* Interpreting implementation.
*
* @see vm/instructions.cpp for the code.

0 comments on commit 912d530

Please sign in to comment.
Something went wrong with that request. Please try again.