Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin' into 1.8.7
Browse files Browse the repository at this point in the history
Conflicts:
	rakelib/release.rb
  • Loading branch information
brixen committed May 18, 2015
2 parents fe57222 + a0f2fa5 commit 2690e3e
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 59 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
@@ -1,7 +1,7 @@
GEM
remote: https://rubygems.org/
specs:
daedalus-core (0.3.0)
daedalus-core (0.5.0)
rake (10.4.2)
redcard (1.1.0)
rubinius-ast (1.3.0)
Expand Down
2 changes: 1 addition & 1 deletion kernel/bootstrap/thread.rb
Expand Up @@ -273,7 +273,7 @@ def alive?
end

def stop?
!alive? || @sleep
!alive? || sleeping?
end

def sleeping?
Expand Down
2 changes: 1 addition & 1 deletion vm/environment.cpp
Expand Up @@ -119,7 +119,7 @@ namespace rubinius {
delete finalizer_thread_;

VM::discard(state, root_vm);
SharedState::discard(shared);
delete shared;
delete state;

for(int i = 0; i < argc_; i++) {
Expand Down
19 changes: 0 additions & 19 deletions vm/shared_state.cpp
Expand Up @@ -58,8 +58,6 @@ namespace rubinius {
, username("")
, pid("")
{
ref();

internal_threads_ = new InternalThreads();

for(int i = 0; i < Primitives::cTotalPrimitives; i++) {
Expand Down Expand Up @@ -96,26 +94,12 @@ namespace rubinius {
delete internal_threads_;
}

void SharedState::add_managed_thread(ManagedThread* thr) {
SYNC_TL;
threads_.push_back(thr);
}

void SharedState::remove_managed_thread(ManagedThread* thr) {
SYNC_TL;
threads_.remove(thr);
}

int SharedState::size() {
return sizeof(SharedState) +
sizeof(WorldState) +
symbols.bytes_used();
}

void SharedState::discard(SharedState* ss) {
if(ss->deref()) delete ss;
}

uint32_t SharedState::new_thread_id() {
return atomic::fetch_and_add(&thread_ids_, 1);
}
Expand All @@ -131,8 +115,6 @@ namespace rubinius {
VM* vm = new VM(id, *this);
threads_.push_back(vm);

this->ref();

// If there is no root vm, then the first one created becomes it.
if(!root_vm_) root_vm_ = vm;
return vm;
Expand All @@ -141,7 +123,6 @@ namespace rubinius {
void SharedState::remove_vm(VM* vm) {
SYNC_TL;
threads_.remove(vm);
this->deref();

// Don't delete ourself here, it's too problematic.
}
Expand Down
8 changes: 1 addition & 7 deletions vm/shared_state.hpp
Expand Up @@ -3,7 +3,6 @@

#include "config.h"

#include "util/refcount.hpp"
#include "gc/variable_buffer.hpp"
#include "gc/root_buffer.hpp"
#include "kcode.hpp"
Expand Down Expand Up @@ -88,7 +87,7 @@ namespace rubinius {
* single process.
*/

class SharedState : public RefCount, public Lockable {
class SharedState : public Lockable {
private:
InternalThreads* internal_threads_;
SignalThread* signal_thread_;
Expand Down Expand Up @@ -157,8 +156,6 @@ namespace rubinius {
SharedState(Environment* env, Configuration& config, ConfigParser& cp);
~SharedState();

static void discard(SharedState* ss);

int size();

void set_initialized() {
Expand Down Expand Up @@ -195,9 +192,6 @@ namespace rubinius {

Array* vm_threads(STATE);

void add_managed_thread(ManagedThread* thr);
void remove_managed_thread(ManagedThread* thr);

int global_serial() const {
return global_serial_;
}
Expand Down
9 changes: 8 additions & 1 deletion vm/test/test.hpp
Expand Up @@ -8,6 +8,7 @@
#include "configuration.hpp"
#include "metrics.hpp"
#include "vm/detection.hpp"
#include "vm/gc/immix_marker.hpp"

#include <cxxtest/TestSuite.h>

Expand All @@ -30,8 +31,14 @@ class VMTest {
}

void destroy() {
if(ObjectMemory* om = state->memory()) {
if(ImmixMarker* im = om->immix_marker()) {
im->stop(state);
}
}

VM::discard(state, state->vm());
SharedState::discard(shared);
delete shared;
delete state;
}

Expand Down
28 changes: 0 additions & 28 deletions vm/util/refcount.hpp

This file was deleted.

1 change: 0 additions & 1 deletion vm/vm.hpp
Expand Up @@ -9,7 +9,6 @@
#include "gc/managed.hpp"
#include "vm_thread_state.hpp"

#include "util/refcount.hpp"
#include "util/thread.hpp"

#include "gc/variable_buffer.hpp"
Expand Down

0 comments on commit 2690e3e

Please sign in to comment.