I hereby claim:
- I am rue on github.
- I am rue (https://keybase.io/rue) on keybase.
- I have a public key whose fingerprint is 4476 8846 E7C0 9EF8 E766 7738 E1FD 3C4D C6E3 45F6
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
@offset = 0 | |
@active_branches = [0] | |
@inactive_branches = {} | |
@max_stack = 0 | |
stream.each {|inst| | |
case inst | |
when git, gif | |
@active_branches.each {|n| @inactive_branches[label.ip] = n} |
Breakpoint 2, op_send_super_stack_with_block (task=0x1818288, js=0x18183fc, index=0, count=1) at vm/gen/instructions.cpp:373 | |
373 bool res = task->send_message(msg); | |
(gdb) p msg | |
$1 = (class rubinius::Message &) @0x1b7edf0: { | |
state = 0x1009400, | |
arguments = 0x0, | |
task = 0x1818288, | |
argument_start = 0, | |
send_site = 0x181813c, | |
name = 0x923, |
diff --git a/vm/exception.hpp b/vm/exception.hpp | |
index 1c4ffb0..9732b42 100644 | |
--- a/vm/exception.hpp | |
+++ b/vm/exception.hpp | |
@@ -70,10 +70,8 @@ namespace rubinius { | |
static void raise(size_t expected, size_t given); | |
static void raise(const char* reason); | |
- ArgumentError(size_t e, size_t g) : expected(e), given(g) { } | |
- ArgumentError(const char* reason) { |
STATE /* state */; /**< Access to the VM state. */ | |
Array* arguments; /**< Arguments from the call. */ | |
Task* task; /**< Access to the Task the method call runs in. */ | |
size_t argument_start; /**< NOT USED. Index where arguments would start. */ | |
/** SendSite in which this call originates. */ | |
SendSite* send_site; | |
/** Name of the method being called (comes from SendSite) */ | |
SYMBOL name; | |
/** Receiver in the call, i.e. obj in `obj.foo()` */ |
#include <ucontext.h> | |
#include <iostream> | |
using namespace std; | |
ucontext_t retctx; | |
std::size_t ssize = 1024 * 64; | |
char* stack = new char[ssize]; | |
/** | |
* Create a writer method. | |
* | |
* For attr_writer(foo, SomeClass), creates void foo(STATE, SomeClass* obj) | |
* that sets the instance variable my_foo to the object given and runs the write | |
* barrier. | |
*/ | |
#define attr_writer(name, type) void name(STATE, type* obj) { \ | |
my_ ## name = obj; \ |
/** | |
* This method always executes on the separate stack created for the context. | |
* | |
* Fortunately for us, Message always has an Array of arguments. | |
* | |
* Arity -3: VALUE func(VALUE argument_array); | |
* Arity -2: VALUE func(VALUE receiver, VALUE argument_array); | |
* Arity -1: VALUE func(int argument_count, VALUE*, VALUE receiver); | |
* Otherwise: VALUE func(VALUE receiver, VALUE arg1[, VALUE arg2, ...]); // Currently max 10 args | |
* |
#include <list> | |
#include <iostream> | |
#include <iterator> | |
int main() | |
{ | |
std::list<int> l; | |
std::list<int>::iterator i1 = l.insert(l.end(), 1); |
Object Creation in C++ | |
======================== | |
Concerning creating objects of the builtin classes in Rubinius (i.e. | |
classes existing in `vm/builtin/`.) Internal-only objects do not use | |
this model. | |
Ruby Model | |
------------ |