Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rubinius/rubinius
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0deebd96678f
Choose a base ref
...
head repository: rubinius/rubinius
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 90bbc4244bd3
Choose a head ref
  • 2 commits
  • 15 files changed
  • 1 contributor

Commits on Apr 2, 2016

  1. Copy the full SHA
    a2ff9cd View commit details
  2. Removed CallCustom.

    CallCustom was added to provide a mechanism for binding a call site that was
    independent of Ruby method resolution semantics.
    
    The instruction set is being improved to, among other things, decouple method
    or function resolution, caching, and invocation. This will provide arbitrary
    semantics for finding the code to run, caching it, and invoking it.
    brixen committed Apr 2, 2016
    Copy the full SHA
    90bbc42 View commit details
13 changes: 0 additions & 13 deletions core/call_custom_cache.rb

This file was deleted.

2 changes: 0 additions & 2 deletions core/deprecations.rb
Original file line number Diff line number Diff line change
@@ -4,7 +4,5 @@ module Rubinius
"Ruby 2.1 features that are incompatible with Ruby 2.2 are deprecated." =>
"Use Ruby 2.2 features if they are available.",
"Rubinius::KERNEL_PATH is deprecated." => "Use Rubinius::CORE_PATH instead.",
"CallCustom is deprecated." =>
"The replacement will be new executable resolution, cache, and invoke machine instructions.",
}
end
1 change: 0 additions & 1 deletion core/load_order.txt
Original file line number Diff line number Diff line change
@@ -11,7 +11,6 @@ bignum.rb
binding.rb
block_environment.rb
byte_array.rb
call_custom_cache.rb
call_site.rb
capi.rb
channel.rb
42 changes: 0 additions & 42 deletions machine/builtin/call_custom_cache.cpp

This file was deleted.

42 changes: 0 additions & 42 deletions machine/builtin/call_custom_cache.hpp

This file was deleted.

65 changes: 4 additions & 61 deletions machine/builtin/call_site.cpp
Original file line number Diff line number Diff line change
@@ -6,9 +6,7 @@
#include "memory.hpp"

#include "builtin/class.hpp"
#include "builtin/call_custom_cache.hpp"
#include "builtin/call_site.hpp"
#include "builtin/call_unit.hpp"
#include "builtin/exception.hpp"
#include "builtin/executable.hpp"
#include "builtin/mono_inline_cache.hpp"
@@ -38,29 +36,6 @@ namespace rubinius {
return Integer::from(state, ip());
}

Object* CallSite::empty_cache_custom(STATE, CallSite* call_site, Arguments& args) {
Object* const recv = args.recv();

Array* ary = Array::create(state, args.total() + 2);
ary->set(state, 0, recv);
ary->set(state, 1, call_site->name());

for(size_t i = 0; i < args.total(); i++) {
ary->set(state, i + 2, args.get_argument(i));
}

Object* ret = G(rubinius)->send(state, state->symbol("bind_call"), ary);

if(CallUnit* cu = try_as<CallUnit>(ret)) {
CallCustomCache* cache = CallCustomCache::create(state, call_site, cu);
call_site->update_call_site(state, cache);
return cu->execute(state, cu, cu->executable(), cu->module(), args);
} else {
Exception::internal_error(state, "bind_call must return CallUnit");
return 0;
}
}

Object* CallSite::empty_cache(STATE, CallSite* call_site, Arguments& args) {
Object* const self = state->vm()->call_frame()->self();
Object* const recv = args.recv();
@@ -83,15 +58,7 @@ namespace rubinius {
Executable* meth = dispatch.method;
Module* mod = dispatch.module;

if(meth->custom_call_site_p()) {
CallSiteInformation info(call_site->executable(), call_site->ip());
state->set_call_site_information(&info);
Object* res = meth->execute(state, meth, mod, args);
state->set_call_site_information(NULL);
return res;
} else {
return meth->execute(state, meth, mod, args);
}
return meth->execute(state, meth, mod, args);
}

Object* CallSite::empty_cache_private(STATE, CallSite* call_site,
@@ -118,15 +85,7 @@ namespace rubinius {
Executable* meth = dispatch.method;
Module* mod = dispatch.module;

if(meth->custom_call_site_p()) {
CallSiteInformation info(call_site->executable(), call_site->ip());
state->set_call_site_information(&info);
Object* res = meth->execute(state, meth, mod, args);
state->set_call_site_information(NULL);
return res;
} else {
return meth->execute(state, meth, mod, args);
}
return meth->execute(state, meth, mod, args);
}

Object* CallSite::empty_cache_vcall(STATE, CallSite* call_site, Arguments& args) {
@@ -152,15 +111,7 @@ namespace rubinius {
Executable* meth = dispatch.method;
Module* mod = dispatch.module;

if(meth->custom_call_site_p()) {
CallSiteInformation info(call_site->executable(), call_site->ip());
state->set_call_site_information(&info);
Object* res = meth->execute(state, meth, mod, args);
state->set_call_site_information(NULL);
return res;
} else {
return meth->execute(state, meth, mod, args);
}
return meth->execute(state, meth, mod, args);
}

Object* CallSite::empty_cache_super(STATE, CallSite* call_site,
@@ -212,15 +163,7 @@ namespace rubinius {
Executable* meth = dispatch.method;
Module* mod = dispatch.module;

if(meth->custom_call_site_p()) {
CallSiteInformation info(call_site->executable(), call_site->ip());
state->set_call_site_information(&info);
Object* res = meth->execute(state, meth, mod, args);
state->set_call_site_information(NULL);
return res;
} else {
return meth->execute(state, meth, mod, args);
}
return meth->execute(state, meth, mod, args);
}

void CallSite::empty_cache_updater(STATE, CallSite* call_site, Class* klass, Dispatch& dispatch) {
6 changes: 0 additions & 6 deletions machine/builtin/call_site.hpp
Original file line number Diff line number Diff line change
@@ -65,7 +65,6 @@ namespace rubinius {
static CacheExecuteFunc empty_cache_private;
static CacheExecuteFunc empty_cache_vcall;
static CacheExecuteFunc empty_cache_super;
static CacheExecuteFunc empty_cache_custom;

static CacheUpdateFunc empty_cache_updater;

@@ -90,11 +89,6 @@ namespace rubinius {
fallback(empty_cache_vcall);
}

void set_call_custom() {
executor(empty_cache_custom);
fallback(empty_cache_custom);
}

void set_executor(CacheExecutor exec) {
executor(exec);
fallback(exec);
105 changes: 0 additions & 105 deletions machine/builtin/call_unit.cpp

This file was deleted.

Loading