Created
September 29, 2014 20:38
-
-
Save brixen/5b2bdc761745cff8a16b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CLM-bshirai:rubinius bshirai$ rbx compile -B -e 'def add(a,b) | |
> a + b | |
> end' | |
============= :__script__ ============== | |
Arguments: 0 required, 0 post, 0 total | |
Arity: 0 | |
Locals: 0 | |
Stack size: 5 | |
Literals: 4: :add, <compiled code>, :method_visibility, :add_defn_method | |
Lines to IP: 1: 0..15 | |
0000: push_rubinius | |
0001: push_literal :add | |
0003: push_literal #<Rubinius::CompiledCode add file=(snippet)> | |
0005: push_scope | |
0006: push_variables | |
0007: send_stack :method_visibility, 0 | |
0010: send_stack :add_defn_method, 4 | |
0013: pop | |
0014: push_true | |
0015: ret | |
---------------------------------------- | |
================= :add ================= | |
Arguments: 2 required, 0 post, 2 total | |
Arity: 2 | |
Locals: 2: a, b | |
Stack size: 4 | |
Literals: 1: :+ | |
Line: 1 | |
Lines to IP: 2: 0..7 | |
0000: push_local 0 # a | |
0002: push_local 1 # b | |
0004: send_stack :+, 1 | |
0007: ret | |
---------------------------------------- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment