Module: CodeTools::GeneratorMethods
- Included in:
- Generator
- Defined in:
- lib/rubinius/code/compiler/generator_methods.rb
Instance Method Summary collapse
- #add_scope ⇒ Object
- #allow_private ⇒ Object
- #cast_array ⇒ Object
- #cast_for_multi_block_arg ⇒ Object
- #cast_for_single_block_arg ⇒ Object
- #cast_for_splat_block_arg ⇒ Object
- #cast_multi_value ⇒ Object
- #check_frozen ⇒ Object
- #check_interrupts ⇒ Object
- #check_serial(arg1, arg2) ⇒ Object
- #check_serial_private(arg1, arg2) ⇒ Object
- #clear_exception ⇒ Object
- #create_block(arg1) ⇒ Object
- #dup ⇒ Object
- #dup_many(arg1) ⇒ Object
- #emit_push_literal(arg1) ⇒ Object
- #ensure_return ⇒ Object
- #find_const(arg1) ⇒ Object
- #goto(arg1) ⇒ Object
- #goto_if_equal(arg1) ⇒ Object
- #goto_if_false(arg1) ⇒ Object
- #goto_if_nil(arg1) ⇒ Object
- #goto_if_not_equal(arg1) ⇒ Object
- #goto_if_not_nil(arg1) ⇒ Object
- #goto_if_not_undefined(arg1) ⇒ Object
- #goto_if_true(arg1) ⇒ Object
- #goto_if_undefined(arg1) ⇒ Object
- #instance_of ⇒ Object
- #invoke_primitive(arg1, arg2) ⇒ Object
- #kind_of ⇒ Object
- #make_array(arg1) ⇒ Object
- #move_down(arg1) ⇒ Object
- #noop ⇒ Object
- #object_to_s(arg1) ⇒ Object
- #passed_arg(arg1) ⇒ Object
- #passed_blockarg(arg1) ⇒ Object
- #pop ⇒ Object
- #pop_many(arg1) ⇒ Object
- #pop_unwind ⇒ Object
- #push_block ⇒ Object
- #push_block_arg ⇒ Object
- #push_const(arg1) ⇒ Object
- #push_cpath_top ⇒ Object
- #push_current_exception ⇒ Object
- #push_exception_state ⇒ Object
- #push_false ⇒ Object
- #push_has_block ⇒ Object
- #push_int(arg1) ⇒ Object
- #push_ivar(arg1) ⇒ Object
- #push_local(arg1) ⇒ Object
- #push_local_depth(arg1, arg2) ⇒ Object
- #push_memo(arg1) ⇒ Object
- #push_mirror ⇒ Object
- #push_my_field(arg1) ⇒ Object
- #push_my_offset(arg1) ⇒ Object
- #push_nil ⇒ Object
- #push_proc ⇒ Object
- #push_rubinius ⇒ Object
- #push_scope ⇒ Object
- #push_self ⇒ Object
- #push_stack_local(arg1) ⇒ Object
- #push_true ⇒ Object
- #push_type ⇒ Object
- #push_undef ⇒ Object
- #push_variables ⇒ Object
- #raise_break ⇒ Object
- #raise_exc ⇒ Object
- #raise_return ⇒ Object
- #reraise ⇒ Object
- #restore_exception_state ⇒ Object
- #ret ⇒ Object
- #rotate(arg1) ⇒ Object
- #send_method(arg1) ⇒ Object
- #send_stack(arg1, arg2) ⇒ Object
- #send_stack_with_block(arg1, arg2) ⇒ Object
- #send_stack_with_splat(arg1, arg2) ⇒ Object
- #send_super_stack_with_block(arg1, arg2) ⇒ Object
- #send_super_stack_with_splat(arg1, arg2) ⇒ Object
- #send_vcall(arg1) ⇒ Object
- #set_call_flags(arg1) ⇒ Object
- #set_const(arg1) ⇒ Object
- #set_const_at(arg1) ⇒ Object
- #set_ivar(arg1) ⇒ Object
- #set_local(arg1) ⇒ Object
- #set_local_depth(arg1, arg2) ⇒ Object
- #set_stack_local(arg1) ⇒ Object
- #setup_unwind(arg1, arg2) ⇒ Object
- #shift_array ⇒ Object
- #store_my_field(arg1) ⇒ Object
- #string_append ⇒ Object
- #string_build(arg1) ⇒ Object
- #string_dup ⇒ Object
- #swap ⇒ Object
- #yield_debugger ⇒ Object
- #yield_splat(arg1) ⇒ Object
- #yield_stack(arg1) ⇒ Object
- #zsuper(arg1) ⇒ Object
Instance Method Details
#add_scope ⇒ Object
618 619 620 621 622 623 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 618 def add_scope @stream << 72 @ip += 1 @current_block.add_stack(1, 0) @instruction = 72 end |
#allow_private ⇒ Object
461 462 463 464 465 466 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 461 def allow_private @stream << 52 @ip += 1 @current_block.add_stack(0, 0) @instruction = 52 end |
#cast_array ⇒ Object
384 385 386 387 388 389 390 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 384 def cast_array unless @instruction == 42 or @instruction == 41 @stream << 42 @ip += 1 end @instruction = 42 end |
#cast_for_multi_block_arg ⇒ Object
559 560 561 562 563 564 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 559 def cast_for_multi_block_arg @stream << 64 @ip += 1 @current_block.add_stack(0, 1) @instruction = 64 end |
#cast_for_single_block_arg ⇒ Object
552 553 554 555 556 557 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 552 def cast_for_single_block_arg @stream << 63 @ip += 1 @current_block.add_stack(0, 1) @instruction = 63 end |
#cast_for_splat_block_arg ⇒ Object
566 567 568 569 570 571 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 566 def cast_for_splat_block_arg @stream << 65 @ip += 1 @current_block.add_stack(0, 1) @instruction = 65 end |
#cast_multi_value ⇒ Object
754 755 756 757 758 759 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 754 def cast_multi_value @stream << 91 @ip += 1 @current_block.add_stack(1, 1) @instruction = 91 end |
#check_frozen ⇒ Object
747 748 749 750 751 752 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 747 def check_frozen @stream << 90 @ip += 1 @current_block.add_stack(1, 1) @instruction = 90 end |
#check_interrupts ⇒ Object
632 633 634 635 636 637 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 632 def check_interrupts @stream << 74 @ip += 1 @current_block.add_stack(0, 0) @instruction = 74 end |
#check_serial(arg1, arg2) ⇒ Object
646 647 648 649 650 651 652 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 646 def check_serial(arg1, arg2) arg1 = find_literal(arg1) @stream << 76 << arg1 << arg2 @ip += 3 @current_block.add_stack(1, 1) @instruction = 76 end |
#check_serial_private(arg1, arg2) ⇒ Object
654 655 656 657 658 659 660 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 654 def check_serial_private(arg1, arg2) arg1 = find_literal(arg1) @stream << 77 << arg1 << arg2 @ip += 3 @current_block.add_stack(1, 1) @instruction = 77 end |
#clear_exception ⇒ Object
289 290 291 292 293 294 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 289 def clear_exception @stream << 31 @ip += 1 @current_block.add_stack(0, 0) @instruction = 31 end |
#create_block(arg1) ⇒ Object
544 545 546 547 548 549 550 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 544 def create_block(arg1) arg1 = add_generator(arg1) @stream << 62 << arg1 @ip += 2 @current_block.add_stack(0, 1) @instruction = 62 end |
#dup ⇒ Object
202 203 204 205 206 207 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 202 def dup @stream << 19 @ip += 1 @current_block.add_stack(1, 2) @instruction = 19 end |
#dup_many(arg1) ⇒ Object
209 210 211 212 213 214 215 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 209 def dup_many(arg1) arg1 = Integer(arg1) @stream << 20 << arg1 @ip += 2 @current_block.add_stack(arg1, (arg1 * 2)) @instruction = 20 end |
#emit_push_literal(arg1) ⇒ Object
55 56 57 58 59 60 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 55 def emit_push_literal(arg1) @stream << 7 << arg1 @ip += 2 @current_block.add_stack(0, 1) @instruction = 7 end |
#ensure_return ⇒ Object
349 350 351 352 353 354 355 356 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 349 def ensure_return @stream << 38 @ip += 1 @current_block.add_stack(1, 1) @current_block.close true @current_block = new_basic_block @instruction = 38 end |
#find_const(arg1) ⇒ Object
446 447 448 449 450 451 452 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 446 def find_const(arg1) arg1 = find_literal(arg1) @stream << 50 << arg1 @ip += 2 @current_block.add_stack(1, 1) @instruction = 50 end |
#goto(arg1) ⇒ Object
62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 62 def goto(arg1) location = @ip + 1 @stream << 8 << arg1 @ip += 2 arg1.used_at location @current_block.add_stack(0, 0) @current_block.left = arg1.basic_block @current_block.close @current_block = new_basic_block @instruction = 8 end |
#goto_if_equal(arg1) ⇒ Object
158 159 160 161 162 163 164 165 166 167 168 169 170 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 158 def goto_if_equal(arg1) location = @ip + 1 @stream << 15 << arg1 @ip += 2 arg1.used_at location @current_block.add_stack(2, 0) @current_block.left = arg1.basic_block @current_block.close block = new_basic_block @current_block.right = block @current_block = block @instruction = 15 end |
#goto_if_false(arg1) ⇒ Object
74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 74 def goto_if_false(arg1) location = @ip + 1 @stream << 9 << arg1 @ip += 2 arg1.used_at location @current_block.add_stack(1, 0) @current_block.left = arg1.basic_block @current_block.close block = new_basic_block @current_block.right = block @current_block = block @instruction = 9 end |
#goto_if_nil(arg1) ⇒ Object
102 103 104 105 106 107 108 109 110 111 112 113 114 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 102 def goto_if_nil(arg1) location = @ip + 1 @stream << 11 << arg1 @ip += 2 arg1.used_at location @current_block.add_stack(1, 0) @current_block.left = arg1.basic_block @current_block.close block = new_basic_block @current_block.right = block @current_block = block @instruction = 11 end |
#goto_if_not_equal(arg1) ⇒ Object
172 173 174 175 176 177 178 179 180 181 182 183 184 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 172 def goto_if_not_equal(arg1) location = @ip + 1 @stream << 16 << arg1 @ip += 2 arg1.used_at location @current_block.add_stack(2, 0) @current_block.left = arg1.basic_block @current_block.close block = new_basic_block @current_block.right = block @current_block = block @instruction = 16 end |
#goto_if_not_nil(arg1) ⇒ Object
116 117 118 119 120 121 122 123 124 125 126 127 128 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 116 def goto_if_not_nil(arg1) location = @ip + 1 @stream << 12 << arg1 @ip += 2 arg1.used_at location @current_block.add_stack(1, 0) @current_block.left = arg1.basic_block @current_block.close block = new_basic_block @current_block.right = block @current_block = block @instruction = 12 end |
#goto_if_not_undefined(arg1) ⇒ Object
144 145 146 147 148 149 150 151 152 153 154 155 156 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 144 def goto_if_not_undefined(arg1) location = @ip + 1 @stream << 14 << arg1 @ip += 2 arg1.used_at location @current_block.add_stack(1, 0) @current_block.left = arg1.basic_block @current_block.close block = new_basic_block @current_block.right = block @current_block = block @instruction = 14 end |
#goto_if_true(arg1) ⇒ Object
88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 88 def goto_if_true(arg1) location = @ip + 1 @stream << 10 << arg1 @ip += 2 arg1.used_at location @current_block.add_stack(1, 0) @current_block.left = arg1.basic_block @current_block.close block = new_basic_block @current_block.right = block @current_block = block @instruction = 10 end |
#goto_if_undefined(arg1) ⇒ Object
130 131 132 133 134 135 136 137 138 139 140 141 142 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 130 def goto_if_undefined(arg1) location = @ip + 1 @stream << 13 << arg1 @ip += 2 arg1.used_at location @current_block.add_stack(1, 0) @current_block.left = arg1.basic_block @current_block.close block = new_basic_block @current_block.right = block @current_block = block @instruction = 13 end |
#instance_of ⇒ Object
683 684 685 686 687 688 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 683 def instance_of @stream << 81 @ip += 1 @current_block.add_stack(2, 1) @instruction = 81 end |
#invoke_primitive(arg1, arg2) ⇒ Object
761 762 763 764 765 766 767 768 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 761 def invoke_primitive(arg1, arg2) arg1 = find_literal(arg1) arg2 = Integer(arg2) @stream << 92 << arg1 << arg2 @ip += 3 @current_block.add_stack(arg2, 1) @instruction = 92 end |
#kind_of ⇒ Object
676 677 678 679 680 681 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 676 def kind_of @stream << 80 @ip += 1 @current_block.add_stack(2, 1) @instruction = 80 end |
#make_array(arg1) ⇒ Object
376 377 378 379 380 381 382 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 376 def make_array(arg1) arg1 = Integer(arg1) @stream << 41 << arg1 @ip += 2 @current_block.add_stack(arg1, 1) @instruction = 41 end |
#move_down(arg1) ⇒ Object
240 241 242 243 244 245 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 240 def move_down(arg1) @stream << 24 << arg1 @ip += 2 @current_block.add_stack(arg1, (arg1 * 1)) @instruction = 24 end |
#noop ⇒ Object
5 6 7 8 9 10 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 5 def noop @stream << 0 @ip += 1 @current_block.add_stack(0, 0) @instruction = 0 end |
#object_to_s(arg1) ⇒ Object
777 778 779 780 781 782 783 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 777 def object_to_s(arg1) arg1 = find_literal(arg1) @stream << 94 << arg1 @ip += 2 @current_block.add_stack(1, 1) @instruction = 94 end |
#passed_arg(arg1) ⇒ Object
275 276 277 278 279 280 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 275 def passed_arg(arg1) @stream << 29 << arg1 @ip += 2 @current_block.add_stack(0, 1) @instruction = 29 end |
#passed_blockarg(arg1) ⇒ Object
536 537 538 539 540 541 542 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 536 def passed_blockarg(arg1) arg1 = Integer(arg1) @stream << 61 << arg1 @ip += 2 @current_block.add_stack(0, 1) @instruction = 61 end |
#pop ⇒ Object
217 218 219 220 221 222 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 217 def pop @stream << 21 @ip += 1 @current_block.add_stack(1, 0) @instruction = 21 end |
#pop_many(arg1) ⇒ Object
224 225 226 227 228 229 230 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 224 def pop_many(arg1) arg1 = Integer(arg1) @stream << 22 << arg1 @ip += 2 @current_block.add_stack(arg1, 0) @instruction = 22 end |
#pop_unwind ⇒ Object
333 334 335 336 337 338 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 333 def pop_unwind @stream << 36 @ip += 1 @current_block.add_stack(0, 0) @instruction = 36 end |
#push_block ⇒ Object
529 530 531 532 533 534 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 529 def push_block @stream << 60 @ip += 1 @current_block.add_stack(0, 1) @instruction = 60 end |
#push_block_arg ⇒ Object
705 706 707 708 709 710 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 705 def push_block_arg @stream << 84 @ip += 1 @current_block.add_stack(0, 1) @instruction = 84 end |
#push_const(arg1) ⇒ Object
438 439 440 441 442 443 444 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 438 def push_const(arg1) arg1 = find_literal(arg1) @stream << 49 << arg1 @ip += 2 @current_block.add_stack(0, 1) @instruction = 49 end |
#push_cpath_top ⇒ Object
431 432 433 434 435 436 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 431 def push_cpath_top @stream << 48 @ip += 1 @current_block.add_stack(0, 1) @instruction = 48 end |
#push_current_exception ⇒ Object
282 283 284 285 286 287 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 282 def push_current_exception @stream << 30 @ip += 1 @current_block.add_stack(0, 1) @instruction = 30 end |
#push_exception_state ⇒ Object
296 297 298 299 300 301 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 296 def push_exception_state @stream << 32 @ip += 1 @current_block.add_stack(0, 1) @instruction = 32 end |
#push_false ⇒ Object
26 27 28 29 30 31 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 26 def push_false @stream << 3 @ip += 1 @current_block.add_stack(0, 1) @instruction = 3 end |
#push_has_block ⇒ Object
733 734 735 736 737 738 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 733 def push_has_block @stream << 88 @ip += 1 @current_block.add_stack(0, 1) @instruction = 88 end |
#push_int(arg1) ⇒ Object
33 34 35 36 37 38 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 33 def push_int(arg1) @stream << 4 << arg1 @ip += 2 @current_block.add_stack(0, 1) @instruction = 4 end |
#push_ivar(arg1) ⇒ Object
407 408 409 410 411 412 413 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 407 def push_ivar(arg1) arg1 = find_literal(arg1) @stream << 45 << arg1 @ip += 2 @current_block.add_stack(0, 1) @instruction = 45 end |
#push_local(arg1) ⇒ Object
254 255 256 257 258 259 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 254 def push_local(arg1) @stream << 26 << arg1 @ip += 2 @current_block.add_stack(0, 1) @instruction = 26 end |
#push_local_depth(arg1, arg2) ⇒ Object
261 262 263 264 265 266 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 261 def push_local_depth(arg1, arg2) @stream << 27 << arg1 << arg2 @ip += 3 @current_block.add_stack(0, 1) @instruction = 27 end |
#push_memo(arg1) ⇒ Object
47 48 49 50 51 52 53 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 47 def push_memo(arg1) arg1 = find_literal(arg1) @stream << 6 << arg1 @ip += 2 @current_block.add_stack(1, 1) @instruction = 6 end |
#push_mirror ⇒ Object
792 793 794 795 796 797 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 792 def push_mirror @stream << 96 @ip += 1 @current_block.add_stack(0, 1) @instruction = 96 end |
#push_my_field(arg1) ⇒ Object
662 663 664 665 666 667 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 662 def push_my_field(arg1) @stream << 78 << arg1 @ip += 2 @current_block.add_stack(0, 1) @instruction = 78 end |
#push_my_offset(arg1) ⇒ Object
690 691 692 693 694 695 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 690 def push_my_offset(arg1) @stream << 82 << arg1 @ip += 2 @current_block.add_stack(0, 1) @instruction = 82 end |
#push_nil ⇒ Object
12 13 14 15 16 17 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 12 def push_nil @stream << 1 @ip += 1 @current_block.add_stack(0, 1) @instruction = 1 end |
#push_proc ⇒ Object
740 741 742 743 744 745 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 740 def push_proc @stream << 89 @ip += 1 @current_block.add_stack(0, 1) @instruction = 89 end |
#push_rubinius ⇒ Object
770 771 772 773 774 775 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 770 def push_rubinius @stream << 93 @ip += 1 @current_block.add_stack(0, 1) @instruction = 93 end |
#push_scope ⇒ Object
611 612 613 614 615 616 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 611 def push_scope @stream << 71 @ip += 1 @current_block.add_stack(0, 1) @instruction = 71 end |
#push_self ⇒ Object
40 41 42 43 44 45 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 40 def push_self @stream << 5 @ip += 1 @current_block.add_stack(0, 1) @instruction = 5 end |
#push_stack_local(arg1) ⇒ Object
719 720 721 722 723 724 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 719 def push_stack_local(arg1) @stream << 86 << arg1 @ip += 2 @current_block.add_stack(0, 1) @instruction = 86 end |
#push_true ⇒ Object
19 20 21 22 23 24 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 19 def push_true @stream << 2 @ip += 1 @current_block.add_stack(0, 1) @instruction = 2 end |
#push_type ⇒ Object
785 786 787 788 789 790 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 785 def push_type @stream << 95 @ip += 1 @current_block.add_stack(0, 1) @instruction = 95 end |
#push_undef ⇒ Object
712 713 714 715 716 717 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 712 def push_undef @stream << 85 @ip += 1 @current_block.add_stack(0, 1) @instruction = 85 end |
#push_variables ⇒ Object
625 626 627 628 629 630 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 625 def push_variables @stream << 73 @ip += 1 @current_block.add_stack(0, 1) @instruction = 73 end |
#raise_break ⇒ Object
358 359 360 361 362 363 364 365 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 358 def raise_break @stream << 39 @ip += 1 @current_block.add_stack(1, 1) @current_block.close false @current_block = new_basic_block @instruction = 39 end |
#raise_exc ⇒ Object
310 311 312 313 314 315 316 317 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 310 def raise_exc @stream << 34 @ip += 1 @current_block.add_stack(1, 0) @current_block.close false @current_block = new_basic_block @instruction = 34 end |
#raise_return ⇒ Object
340 341 342 343 344 345 346 347 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 340 def raise_return @stream << 37 @ip += 1 @current_block.add_stack(1, 1) @current_block.close true @current_block = new_basic_block @instruction = 37 end |
#reraise ⇒ Object
367 368 369 370 371 372 373 374 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 367 def reraise @stream << 40 @ip += 1 @current_block.add_stack(0, 0) @current_block.close false @current_block = new_basic_block @instruction = 40 end |
#restore_exception_state ⇒ Object
303 304 305 306 307 308 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 303 def restore_exception_state @stream << 33 @ip += 1 @current_block.add_stack(1, 0) @instruction = 33 end |
#ret ⇒ Object
186 187 188 189 190 191 192 193 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 186 def ret @stream << 17 @ip += 1 @current_block.add_stack(1, 1) @current_block.close true @current_block = new_basic_block @instruction = 17 end |
#rotate(arg1) ⇒ Object
232 233 234 235 236 237 238 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 232 def rotate(arg1) arg1 = Integer(arg1) @stream << 23 << arg1 @ip += 2 @current_block.add_stack(arg1, (arg1 * 1)) @instruction = 23 end |
#send_method(arg1) ⇒ Object
476 477 478 479 480 481 482 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 476 def send_method(arg1) arg1 = find_literal(arg1) @stream << 54 << arg1 @ip += 2 @current_block.add_stack(1, 1) @instruction = 54 end |
#send_stack(arg1, arg2) ⇒ Object
484 485 486 487 488 489 490 491 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 484 def send_stack(arg1, arg2) arg1 = find_literal(arg1) arg2 = Integer(arg2) @stream << 55 << arg1 << arg2 @ip += 3 @current_block.add_stack(arg2+1, 1) @instruction = 55 end |
#send_stack_with_block(arg1, arg2) ⇒ Object
493 494 495 496 497 498 499 500 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 493 def send_stack_with_block(arg1, arg2) arg1 = find_literal(arg1) arg2 = Integer(arg2) @stream << 56 << arg1 << arg2 @ip += 3 @current_block.add_stack(arg2+2, 1) @instruction = 56 end |
#send_stack_with_splat(arg1, arg2) ⇒ Object
502 503 504 505 506 507 508 509 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 502 def send_stack_with_splat(arg1, arg2) arg1 = find_literal(arg1) arg2 = Integer(arg2) @stream << 57 << arg1 << arg2 @ip += 3 @current_block.add_stack(arg2+3, 1) @instruction = 57 end |
#send_super_stack_with_block(arg1, arg2) ⇒ Object
511 512 513 514 515 516 517 518 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 511 def send_super_stack_with_block(arg1, arg2) arg1 = find_literal(arg1) arg2 = Integer(arg2) @stream << 58 << arg1 << arg2 @ip += 3 @current_block.add_stack(arg2+1, 1) @instruction = 58 end |
#send_super_stack_with_splat(arg1, arg2) ⇒ Object
520 521 522 523 524 525 526 527 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 520 def send_super_stack_with_splat(arg1, arg2) arg1 = find_literal(arg1) arg2 = Integer(arg2) @stream << 59 << arg1 << arg2 @ip += 3 @current_block.add_stack(arg2+2, 1) @instruction = 59 end |
#send_vcall(arg1) ⇒ Object
468 469 470 471 472 473 474 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 468 def send_vcall(arg1) arg1 = find_literal(arg1) @stream << 53 << arg1 @ip += 2 @current_block.add_stack(0, 1) @instruction = 53 end |
#set_call_flags(arg1) ⇒ Object
454 455 456 457 458 459 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 454 def set_call_flags(arg1) @stream << 51 << arg1 @ip += 2 @current_block.add_stack(0, 0) @instruction = 51 end |
#set_const(arg1) ⇒ Object
415 416 417 418 419 420 421 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 415 def set_const(arg1) arg1 = find_literal(arg1) @stream << 46 << arg1 @ip += 2 @current_block.add_stack(1, 1) @instruction = 46 end |
#set_const_at(arg1) ⇒ Object
423 424 425 426 427 428 429 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 423 def set_const_at(arg1) arg1 = find_literal(arg1) @stream << 47 << arg1 @ip += 2 @current_block.add_stack(2, 1) @instruction = 47 end |
#set_ivar(arg1) ⇒ Object
399 400 401 402 403 404 405 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 399 def set_ivar(arg1) arg1 = find_literal(arg1) @stream << 44 << arg1 @ip += 2 @current_block.add_stack(1, 1) @instruction = 44 end |
#set_local(arg1) ⇒ Object
247 248 249 250 251 252 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 247 def set_local(arg1) @stream << 25 << arg1 @ip += 2 @current_block.add_stack(1, 1) @instruction = 25 end |
#set_local_depth(arg1, arg2) ⇒ Object
268 269 270 271 272 273 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 268 def set_local_depth(arg1, arg2) @stream << 28 << arg1 << arg2 @ip += 3 @current_block.add_stack(1, 1) @instruction = 28 end |
#set_stack_local(arg1) ⇒ Object
726 727 728 729 730 731 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 726 def set_stack_local(arg1) @stream << 87 << arg1 @ip += 2 @current_block.add_stack(1, 1) @instruction = 87 end |
#setup_unwind(arg1, arg2) ⇒ Object
319 320 321 322 323 324 325 326 327 328 329 330 331 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 319 def setup_unwind(arg1, arg2) location = @ip + 1 @stream << 35 << arg1 << arg2 @ip += 3 arg1.used_at location @current_block.add_stack(0, 0) @current_block.left = arg1.basic_block @current_block.close block = new_basic_block @current_block.right = block @current_block = block @instruction = 35 end |
#shift_array ⇒ Object
392 393 394 395 396 397 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 392 def shift_array @stream << 43 @ip += 1 @current_block.add_stack(1, 2) @instruction = 43 end |
#store_my_field(arg1) ⇒ Object
669 670 671 672 673 674 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 669 def store_my_field(arg1) @stream << 79 << arg1 @ip += 2 @current_block.add_stack(1, 1) @instruction = 79 end |
#string_append ⇒ Object
589 590 591 592 593 594 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 589 def string_append @stream << 68 @ip += 1 @current_block.add_stack(2, 1) @instruction = 68 end |
#string_build(arg1) ⇒ Object
596 597 598 599 600 601 602 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 596 def string_build(arg1) arg1 = Integer(arg1) @stream << 69 << arg1 @ip += 2 @current_block.add_stack(arg1, 1) @instruction = 69 end |
#string_dup ⇒ Object
604 605 606 607 608 609 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 604 def string_dup @stream << 70 @ip += 1 @current_block.add_stack(1, 1) @instruction = 70 end |
#swap ⇒ Object
195 196 197 198 199 200 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 195 def swap @stream << 18 @ip += 1 @current_block.add_stack(2, 2) @instruction = 18 end |
#yield_debugger ⇒ Object
639 640 641 642 643 644 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 639 def yield_debugger @stream << 75 @ip += 1 @current_block.add_stack(0, 0) @instruction = 75 end |
#yield_splat(arg1) ⇒ Object
581 582 583 584 585 586 587 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 581 def yield_splat(arg1) arg1 = Integer(arg1) @stream << 67 << arg1 @ip += 2 @current_block.add_stack(arg1+1, 1) @instruction = 67 end |
#yield_stack(arg1) ⇒ Object
573 574 575 576 577 578 579 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 573 def yield_stack(arg1) arg1 = Integer(arg1) @stream << 66 << arg1 @ip += 2 @current_block.add_stack(arg1, 1) @instruction = 66 end |
#zsuper(arg1) ⇒ Object
697 698 699 700 701 702 703 |
# File 'lib/rubinius/code/compiler/generator_methods.rb', line 697 def zsuper(arg1) arg1 = find_literal(arg1) @stream << 83 << arg1 @ip += 2 @current_block.add_stack(1, 1) @instruction = 83 end |