Skip to content

Instantly share code, notes, and snippets.

@miura1729
Created November 28, 2018 09:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save miura1729/5746f27e0d6bed20fea478d705cba3b7 to your computer and use it in GitHub Desktop.
Save miura1729/5746f27e0d6bed20fea478d705cba3b7 to your computer and use it in GitHub Desktop.
#include "mruby.h"
#include "mruby/value.h"
#include "mruby/array.h"
int main(int argc, char **argv)
{
mrb_state *mrb = mrb_open();
main_Object_0(mrb, mrb_top_self(mrb));
return 0;
}
mrb_int main_Object_0(mrb_state *, mrb_value);
mrb_int fib_Object_1(mrb_state *, mrb_value, mrb_int v127, mrb_value v128);
mrb_int fib_Object_2(mrb_state *, mrb_value, mrb_int v127, mrb_value v128);
/*
Class Object
Instance variables
methodes
fib: (Object val=#<Object:0x2004e380>, Fixnum val=35, NilClass) -> Fixnum
fib: (Object val=#<Object:0x2004e380>, Fixnum, NilClass) -> Fixnum
*/
mrb_int main_Object_0(mrb_state *mrb, mrb_value self) {
mrb_int v15;
L0:;
v15 = fib_Object_1(mrb, self, 35, mrb_nil_value());
return v15;
}
mrb_int fib_Object_1(mrb_state *mrb, mrb_value self, mrb_int v127, mrb_value v128) {
mrb_int v191;
mrb_int v196;
mrb_int v203;
L9:;
L11:;
L13:;
v191 = fib_Object_2(mrb, self, 34, mrb_nil_value());
v196 = fib_Object_2(mrb, self, 33, mrb_nil_value());
v203 = (v191 + v196);
L14:;
return v203;
}
mrb_int fib_Object_2(mrb_state *mrb, mrb_value self, mrb_int v127, mrb_value v128) {
mrb_int v203;
mrb_int v191;
mrb_int v196;
L9:;
if ((v127 == 1)) goto L10; else goto L11;
L10:;
v203 = 10;
L14:;
return v203;
L11:;
if ((v127 == 0)) goto L12; else goto L13;
L12:;
v203 = 1;
goto L14;
L13:;
v191 = fib_Object_2(mrb, self, (v127 - 1), mrb_nil_value());
v196 = fib_Object_2(mrb, self, (v127 - 2), mrb_nil_value());
v203 = (v191 + v196);
goto L14;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment