Skip to content

Commit

Permalink
clean up merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
chuckremes committed Mar 25, 2016
2 parents 8374329 + 2f73b5a commit cf86e0f
Show file tree
Hide file tree
Showing 49 changed files with 937 additions and 757 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Expand Up @@ -39,6 +39,7 @@ notifications:
on_start: always
env:
global:
- RBXOPT=-Xint
- LANG="en_US.UTF-8"
- secure: olbok/GN6rOYvPnHBYWGz7giCoCdLFpT/7WSBHukYO3E0uNeqAUOOgW2BFOwCVWdSEJ/iTvJXZQ4qVZHX+6jRfvILZeGv+D2P93VdD8UFQRoTOfFC7esAo525s9fuKm9ehUGWZxlzGOBHHckky1jn6pEf8mlXAVM5e76dlH0fck=
- secure: aqG9eB/PrzQ7XJQN6YX/00sNVvwSB77saxXQzguL2WFjAXB74h6168Hzq+awHtNX/vfOb6ta7fpWLHrA0D+gmZnvTR29VlP6nd0vs1tkdX1/jWbiBHjamRffp+NWVdKbJKYn5iLOGXcuUMOzY/opLKOdvxKZfkxGMxR2tTNLZUE=
Expand Down
2 changes: 1 addition & 1 deletion core/vm.rb
Expand Up @@ -9,7 +9,7 @@ def self.backtrace(frames_to_skip)
Rubinius.primitive :vm_backtrace

# Add the + 1 to skip this frame
backtrace(Integer(frames_to_skip) + 1, include_vars)
backtrace Integer(frames_to_skip) + 1
end

def self.stats
Expand Down
6 changes: 3 additions & 3 deletions machine/builtin/compiled_code.cpp
Expand Up @@ -21,7 +21,7 @@

#include "memory/object_mark.hpp"

#include "util/logger.hpp"
#include "logger.hpp"

#include <ostream>

Expand Down Expand Up @@ -277,7 +277,7 @@ namespace rubinius {
jit::RuntimeDataHolder* rd)
{
if(!machine_code_) {
utilities::logger::error("specializing with no backend");
logger::error("specializing with no backend");
return;
}

Expand All @@ -299,7 +299,7 @@ namespace rubinius {

msg << "Specialization space exceeded for " <<
machine_code_->name()->cpp_str(state);
utilities::logger::warn(msg.str().c_str());
logger::warn(msg.str().c_str());

i = 0;
}
Expand Down
6 changes: 4 additions & 2 deletions machine/builtin/data.cpp
Expand Up @@ -39,7 +39,8 @@ namespace rubinius {
data->internal_ = rdata;

if(mark || free) {
state->memory()->needs_finalization(data, (memory::FinalizerFunction)&Data::finalize);
state->memory()->needs_finalization(state, data,
(memory::FinalizerFunction)&Data::finalize);
}

state->vm()->metrics().memory.data_objects++;
Expand Down Expand Up @@ -72,7 +73,8 @@ namespace rubinius {
data->internal_ = rdata;

if(type->function.dmark || type->function.dfree) {
state->memory()->needs_finalization(data, (memory::FinalizerFunction)&Data::finalize);
state->memory()->needs_finalization(state, data,
(memory::FinalizerFunction)&Data::finalize);
}

state->vm()->metrics().memory.data_objects++;
Expand Down
2 changes: 1 addition & 1 deletion machine/builtin/dir.cpp
Expand Up @@ -18,7 +18,7 @@ namespace rubinius {
Dir* d = Dir::allocate(state, G(dir));
d->os_ = 0;

state->memory()->needs_finalization(d,
state->memory()->needs_finalization(state, d,
(memory::FinalizerFunction)&Dir::finalize,
memory::FinalizeObject::eUnmanaged);

Expand Down
2 changes: 1 addition & 1 deletion machine/builtin/encoding.cpp
Expand Up @@ -733,7 +733,7 @@ namespace rubinius {

c->set_converter(NULL);

state->memory()->needs_finalization(c,
state->memory()->needs_finalization(state, c,
(memory::FinalizerFunction)&Converter::finalize,
memory::FinalizeObject::eUnmanaged);

Expand Down
2 changes: 1 addition & 1 deletion machine/builtin/ffi_pointer.cpp
Expand Up @@ -115,7 +115,7 @@ namespace rubinius {

if(autorelease) {
if(!set_finalizer) {
state->memory()->needs_finalization(this,
state->memory()->needs_finalization(state, this,
(memory::FinalizerFunction)&Pointer::finalize,
memory::FinalizeObject::eUnmanaged);
set_finalizer = true;
Expand Down
4 changes: 2 additions & 2 deletions machine/builtin/fiber.cpp
Expand Up @@ -37,7 +37,7 @@ namespace rubinius {
fib->data_ = state->vm()->new_fiber_data(true);
fib->data_->set_call_frame(state->vm()->call_frame());

state->memory()->needs_finalization(fib,
state->memory()->needs_finalization(state, fib,
(memory::FinalizerFunction)&Fiber::finalize,
memory::FinalizeObject::eUnmanaged);

Expand Down Expand Up @@ -109,7 +109,7 @@ namespace rubinius {
Fiber* fib = state->memory()->new_object<Fiber>(state, as<Class>(self));
fib->starter(state, callable);

state->memory()->needs_finalization(fib,
state->memory()->needs_finalization(state, fib,
(memory::FinalizerFunction)&Fiber::finalize,
memory::FinalizeObject::eUnmanaged);

Expand Down
2 changes: 1 addition & 1 deletion machine/builtin/fiber.hpp
Expand Up @@ -69,7 +69,7 @@ namespace rubinius {

state->vm()->set_current_fiber(this);
state->vm()->set_call_frame(data_->call_frame());
data_->set_call_frame(0);
data_->set_call_frame(NULL);
status_ = eRunning;
}

Expand Down
6 changes: 3 additions & 3 deletions machine/builtin/fsevent.cpp
Expand Up @@ -6,7 +6,7 @@
#include "builtin/fsevent.hpp"
#include "builtin/string.hpp"

#include "util/logger.hpp"
#include "logger.hpp"

namespace rubinius {
using namespace utilities;
Expand All @@ -32,7 +32,7 @@ namespace rubinius {
if((fsevent->kq_ = kqueue()) < 0) {
logger::error("%s: unable to create kqueue", strerror(errno));
} else {
state->memory()->needs_finalization(fsevent,
state->memory()->needs_finalization(state, fsevent,
(memory::FinalizerFunction)&FSEvent::finalize,
memory::FinalizeObject::eUnmanaged);
}
Expand Down Expand Up @@ -81,7 +81,7 @@ namespace rubinius {
if((fsevent->in_ = inotify_init()) < 0) {
logger::error("%s: unable to create inotify", strerror(errno));
} else {
state->memory()->needs_finalization(fsevent,
state->memory()->needs_finalization(state, fsevent,
(memory::FinalizerFunction)&FSEvent::finalize,
memory::FinalizeObject::eUnmanaged);
}
Expand Down
36 changes: 21 additions & 15 deletions machine/builtin/location.cpp
Expand Up @@ -34,7 +34,11 @@ namespace rubinius {
loc->flags(state, Fixnum::from(0));

if(call_frame->is_block_p(state)) {
loc->name(state, call_frame->top_scope(state)->method()->name());
if(VariableScope* vs = try_as<VariableScope>(call_frame->top_scope(state))) {
loc->name(state, vs->method()->name());
} else {
loc->name(state, call_frame->name());
}
loc->set_is_block(state);
} else {
loc->name(state, call_frame->name());
Expand Down Expand Up @@ -64,12 +68,12 @@ namespace rubinius {
return Location::create(state, frame, false);
}

return nil<Location>();
return Location::allocate(state, G(location));
}

Location* Location::create(STATE, NativeMethodFrame* nmf) {
NativeMethod* nm = try_as<NativeMethod>(nmf->get_object(nmf->method()));
if(!nm) return 0;
if(!nm) return Location::allocate(state, G(location));

Location* loc = state->memory()->new_object<Location>(state, G(location));
if(Module* mod = try_as<Module>(nmf->get_object(nmf->module()))) {
Expand Down Expand Up @@ -105,24 +109,26 @@ namespace rubinius {
frame = frame->previous)
{
if(frame->compiled_code) {
if(Location* location = Location::create(state, frame, true)) {
if(first) {
location->set_ip_on_current(state);
first = false;
}
array->append(state, location);
Location* location = Location::create(state, frame, true);

if(first) {
location->set_ip_on_current(state);
first = false;
}

array->append(state, location);
} else if(NativeMethodFrame* nmf = frame->native_method_frame()) {
if(Location* location = Location::create(state, nmf)) {
array->append(state, location);
}
array->append(state, Location::create(state, nmf));
}

}

return array;
}

Array* Location::from_call_stack(STATE, ssize_t up) {
if(up < 0) rubinius::bug("negative skip frame value provided");

CallFrame* base = state->vm()->call_frame();
CallFrame* start = base;
size_t count = 0;
Expand All @@ -144,16 +150,16 @@ namespace rubinius {
if(frame->compiled_code) {
array->append(state, Location::create(state, frame));
} else if(NativeMethodFrame* nmf = frame->native_method_frame()) {
if(Location* location = Location::create(state, nmf)) {
array->append(state, location);
}
array->append(state, Location::create(state, nmf));
}
}

return array;
}

Array* Location::mri_backtrace(STATE, ssize_t up) {
if(up < 0) rubinius::bug("negative skip frame value provided");

CallFrame* base = state->vm()->call_frame();
CallFrame* start = base;
size_t count = 0;
Expand Down
2 changes: 1 addition & 1 deletion machine/builtin/logger.cpp
Expand Up @@ -4,7 +4,7 @@
#include "builtin/logger.hpp"
#include "builtin/string.hpp"

#include "util/logger.hpp"
#include "logger.hpp"

namespace rubinius {
using namespace utilities;
Expand Down
6 changes: 3 additions & 3 deletions machine/builtin/native_function.cpp
Expand Up @@ -406,7 +406,7 @@ namespace rubinius {
state->symbol("symbol"), ary);

if(!result) {
utilities::logger::error("Exception raised by callback, ignoring");
logger::error("Exception raised by callback, ignoring");
state->vm()->thread_state()->clear();
result = cNil;
}
Expand Down Expand Up @@ -483,7 +483,7 @@ namespace rubinius {
// Ug. An exception is being raised...
if(!obj) {
// For now, log the error and return nil.
utilities::logger::error("Exception raised by callback, ignoring");
logger::error("Exception raised by callback, ignoring");
state->vm()->thread_state()->clear();
obj = cNil;
}
Expand Down Expand Up @@ -559,7 +559,7 @@ namespace rubinius {

if(!value) {
// For now, log the error and return nil.
utilities::logger::error("Exception raised by callback, ignoring");
logger::error("Exception raised by callback, ignoring");
state->vm()->thread_state()->clear();
value = cNil;
}
Expand Down
4 changes: 2 additions & 2 deletions machine/builtin/object.cpp
Expand Up @@ -29,7 +29,7 @@
#include "builtin/string.hpp"
#include "builtin/tuple.hpp"

#include "util/logger.hpp"
#include "logger.hpp"

#include <sstream>

Expand Down Expand Up @@ -152,7 +152,7 @@ namespace rubinius {
} else if(CompactLookupTable* clt = try_as<CompactLookupTable>(other->ivars())) {
ivars(state, clt->duplicate(state));
} else {
utilities::logger::warn(
logger::warn(
"Object::copy_object: invalid ivars_ reference for %s",
other->class_object(state)->to_string(state, true).c_str()
);
Expand Down

0 comments on commit cf86e0f

Please sign in to comment.