Module: CodeTools::GeneratorMethods
- Included in:
- Generator
- Defined in:
- lib/rubinius/compiler/generator_methods.rb
Instance Method Summary collapse
- #add_scope ⇒ Object
- #allow_private ⇒ Object
- #call_custom(arg1, arg2) ⇒ 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_many(arg1) ⇒ Object
- #dup_top ⇒ Object
- #emit_push_literal(arg1) ⇒ Object
- #ensure_return ⇒ Object
- #find_const(arg1) ⇒ Object
- #find_const_fast(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
- #is_nil ⇒ Object
- #kind_of ⇒ Object
- #make_array(arg1) ⇒ Object
- #meta_push_0 ⇒ Object
- #meta_push_1 ⇒ Object
- #meta_push_2 ⇒ Object
- #meta_push_neg_1 ⇒ Object
- #meta_send_call(arg1, arg2) ⇒ Object
- #meta_send_op_equal(arg1) ⇒ Object
- #meta_send_op_gt(arg1) ⇒ Object
- #meta_send_op_lt(arg1) ⇒ Object
- #meta_send_op_minus(arg1) ⇒ Object
- #meta_send_op_plus(arg1) ⇒ Object
- #meta_send_op_tequal(arg1) ⇒ Object
- #meta_to_s(arg1) ⇒ Object
- #move_down(arg1) ⇒ Object
- #noop ⇒ 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_fast(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_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
- #set_call_flags(arg1) ⇒ Object
- #set_const(arg1) ⇒ Object
- #set_const_at(arg1) ⇒ Object
- #set_ivar(arg1) ⇒ Object
- #set_literal(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_stack ⇒ Object
- #yield_debugger ⇒ Object
- #yield_splat(arg1) ⇒ Object
- #yield_stack(arg1) ⇒ Object
- #zsuper(arg1) ⇒ Object
Instance Method Details
#add_scope ⇒ Object
610 611 612 613 614 615 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 610 def add_scope @stream << 73 @ip += 1 @current_block.add_stack(1, 0) @instruction = 73 end |
#allow_private ⇒ Object
475 476 477 478 479 480 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 475 def allow_private @stream << 54 @ip += 1 @current_block.add_stack(0, 0) @instruction = 54 end |
#call_custom(arg1, arg2) ⇒ Object
855 856 857 858 859 860 861 862 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 855 def call_custom(arg1, arg2) arg1 = find_literal arg1 arg2 = Integer(arg2) @stream << 107 << arg1 << arg2 @ip += 3 @current_block.add_stack(arg2+1, 1) @instruction = 107 end |
#cast_array ⇒ Object
394 395 396 397 398 399 400 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 394 def cast_array unless @instruction == 42 or @instruction == 41 @stream << 42 @ip += 1 end @instruction = 42 end |
#cast_for_multi_block_arg ⇒ Object
554 555 556 557 558 559 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 554 def cast_for_multi_block_arg @stream << 65 @ip += 1 @current_block.add_stack(0, 1) @instruction = 65 end |
#cast_for_single_block_arg ⇒ Object
547 548 549 550 551 552 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 547 def cast_for_single_block_arg @stream << 64 @ip += 1 @current_block.add_stack(0, 1) @instruction = 64 end |
#cast_for_splat_block_arg ⇒ Object
561 562 563 564 565 566 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 561 def cast_for_splat_block_arg @stream << 66 @ip += 1 @current_block.add_stack(0, 1) @instruction = 66 end |
#cast_multi_value ⇒ Object
832 833 834 835 836 837 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 832 def cast_multi_value @stream << 104 @ip += 1 @current_block.add_stack(1, 1) @instruction = 104 end |
#check_frozen ⇒ Object
825 826 827 828 829 830 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 825 def check_frozen @stream << 103 @ip += 1 @current_block.add_stack(1, 1) @instruction = 103 end |
#check_interrupts ⇒ Object
624 625 626 627 628 629 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 624 def check_interrupts @stream << 75 @ip += 1 @current_block.add_stack(0, 0) @instruction = 75 end |
#check_serial(arg1, arg2) ⇒ Object
645 646 647 648 649 650 651 652 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 645 def check_serial(arg1, arg2) arg1 = find_literal arg1 arg2 = Integer(arg2) @stream << 78 << arg1 << arg2 @ip += 3 @current_block.add_stack(1, 1) @instruction = 78 end |
#check_serial_private(arg1, arg2) ⇒ Object
654 655 656 657 658 659 660 661 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 654 def check_serial_private(arg1, arg2) arg1 = find_literal arg1 arg2 = Integer(arg2) @stream << 79 << arg1 << arg2 @ip += 3 @current_block.add_stack(1, 1) @instruction = 79 end |
#clear_exception ⇒ Object
300 301 302 303 304 305 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 300 def clear_exception @stream << 31 @ip += 1 @current_block.add_stack(0, 0) @instruction = 31 end |
#create_block(arg1) ⇒ Object
538 539 540 541 542 543 544 545 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 538 def create_block(arg1) arg1 = add_literal arg1 @generators << arg1 @stream << 63 << arg1 @ip += 2 @current_block.add_stack(0, 1) @instruction = 63 end |
#dup_many(arg1) ⇒ Object
223 224 225 226 227 228 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 223 def dup_many(arg1) @stream << 20 << arg1 @ip += 2 @current_block.add_stack(arg1, (arg1 * 2)) @instruction = 20 end |
#dup_top ⇒ Object
216 217 218 219 220 221 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 216 def dup_top @stream << 19 @ip += 1 @current_block.add_stack(1, 2) @instruction = 19 end |
#emit_push_literal(arg1) ⇒ Object
69 70 71 72 73 74 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 69 def emit_push_literal(arg1) @stream << 7 << arg1 @ip += 2 @current_block.add_stack(0, 1) @instruction = 7 end |
#ensure_return ⇒ Object
360 361 362 363 364 365 366 367 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 360 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
439 440 441 442 443 444 445 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 439 def find_const(arg1) arg1 = find_literal arg1 @stream << 49 << arg1 @ip += 2 @current_block.add_stack(1, 1) @instruction = 49 end |
#find_const_fast(arg1) ⇒ Object
461 462 463 464 465 466 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 461 def find_const_fast(arg1) @stream << 52 << arg1 @ip += 2 @current_block.add_stack(1, 1) @instruction = 52 end |
#goto(arg1) ⇒ Object
76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 76 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
172 173 174 175 176 177 178 179 180 181 182 183 184 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 172 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
88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 88 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
116 117 118 119 120 121 122 123 124 125 126 127 128 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 116 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
186 187 188 189 190 191 192 193 194 195 196 197 198 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 186 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
130 131 132 133 134 135 136 137 138 139 140 141 142 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 130 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
158 159 160 161 162 163 164 165 166 167 168 169 170 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 158 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
102 103 104 105 106 107 108 109 110 111 112 113 114 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 102 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
144 145 146 147 148 149 150 151 152 153 154 155 156 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 144 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
684 685 686 687 688 689 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 684 def instance_of @stream << 83 @ip += 1 @current_block.add_stack(2, 1) @instruction = 83 end |
#invoke_primitive(arg1, arg2) ⇒ Object
839 840 841 842 843 844 845 846 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 839 def invoke_primitive(arg1, arg2) arg1 = find_literal arg1 arg2 = Integer(arg2) @stream << 105 << arg1 << arg2 @ip += 3 @current_block.add_stack(arg2, 1) @instruction = 105 end |
#is_nil ⇒ Object
638 639 640 641 642 643 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 638 def is_nil @stream << 77 @ip += 1 @current_block.add_stack(1, 1) @instruction = 77 end |
#kind_of ⇒ Object
677 678 679 680 681 682 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 677 def kind_of @stream << 82 @ip += 1 @current_block.add_stack(2, 1) @instruction = 82 end |
#make_array(arg1) ⇒ Object
387 388 389 390 391 392 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 387 def make_array(arg1) @stream << 41 << arg1 @ip += 2 @current_block.add_stack(arg1, 1) @instruction = 41 end |
#meta_push_0 ⇒ Object
698 699 700 701 702 703 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 698 def @stream << 85 @ip += 1 @current_block.add_stack(0, 1) @instruction = 85 end |
#meta_push_1 ⇒ Object
705 706 707 708 709 710 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 705 def @stream << 86 @ip += 1 @current_block.add_stack(0, 1) @instruction = 86 end |
#meta_push_2 ⇒ Object
712 713 714 715 716 717 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 712 def @stream << 87 @ip += 1 @current_block.add_stack(0, 1) @instruction = 87 end |
#meta_push_neg_1 ⇒ Object
691 692 693 694 695 696 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 691 def @stream << 84 @ip += 1 @current_block.add_stack(0, 1) @instruction = 84 end |
#meta_send_call(arg1, arg2) ⇒ Object
761 762 763 764 765 766 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 761 def (arg1, arg2) @stream << 94 << arg1 << arg2 @ip += 3 @current_block.add_stack(arg2+1, 1) @instruction = 94 end |
#meta_send_op_equal(arg1) ⇒ Object
733 734 735 736 737 738 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 733 def (arg1) @stream << 90 << arg1 @ip += 2 @current_block.add_stack(2, 1) @instruction = 90 end |
#meta_send_op_gt(arg1) ⇒ Object
747 748 749 750 751 752 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 747 def (arg1) @stream << 92 << arg1 @ip += 2 @current_block.add_stack(2, 1) @instruction = 92 end |
#meta_send_op_lt(arg1) ⇒ Object
740 741 742 743 744 745 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 740 def (arg1) @stream << 91 << arg1 @ip += 2 @current_block.add_stack(2, 1) @instruction = 91 end |
#meta_send_op_minus(arg1) ⇒ Object
726 727 728 729 730 731 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 726 def (arg1) @stream << 89 << arg1 @ip += 2 @current_block.add_stack(2, 1) @instruction = 89 end |
#meta_send_op_plus(arg1) ⇒ Object
719 720 721 722 723 724 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 719 def (arg1) @stream << 88 << arg1 @ip += 2 @current_block.add_stack(2, 1) @instruction = 88 end |
#meta_send_op_tequal(arg1) ⇒ Object
754 755 756 757 758 759 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 754 def (arg1) @stream << 93 << arg1 @ip += 2 @current_block.add_stack(2, 1) @instruction = 93 end |
#meta_to_s(arg1) ⇒ Object
864 865 866 867 868 869 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 864 def (arg1) @stream << 108 << arg1 @ip += 2 @current_block.add_stack(1, 1) @instruction = 108 end |
#move_down(arg1) ⇒ Object
251 252 253 254 255 256 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 251 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/compiler/generator_methods.rb', line 5 def noop @stream << 0 @ip += 1 @current_block.add_stack(0, 0) @instruction = 0 end |
#passed_arg(arg1) ⇒ Object
286 287 288 289 290 291 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 286 def passed_arg(arg1) @stream << 29 << arg1 @ip += 2 @current_block.add_stack(0, 1) @instruction = 29 end |
#passed_blockarg(arg1) ⇒ Object
531 532 533 534 535 536 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 531 def passed_blockarg(arg1) @stream << 62 << arg1 @ip += 2 @current_block.add_stack(0, 1) @instruction = 62 end |
#pop ⇒ Object
230 231 232 233 234 235 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 230 def pop @stream << 21 @ip += 1 @current_block.add_stack(1, 0) @instruction = 21 end |
#pop_many(arg1) ⇒ Object
237 238 239 240 241 242 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 237 def pop_many(arg1) @stream << 22 << arg1 @ip += 2 @current_block.add_stack(arg1, 0) @instruction = 22 end |
#pop_unwind ⇒ Object
344 345 346 347 348 349 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 344 def pop_unwind @stream << 36 @ip += 1 @current_block.add_stack(0, 0) @instruction = 36 end |
#push_block ⇒ Object
524 525 526 527 528 529 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 524 def push_block @stream << 61 @ip += 1 @current_block.add_stack(0, 1) @instruction = 61 end |
#push_block_arg ⇒ Object
783 784 785 786 787 788 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 783 def push_block_arg @stream << 97 @ip += 1 @current_block.add_stack(0, 1) @instruction = 97 end |
#push_const_fast(arg1) ⇒ Object
454 455 456 457 458 459 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 454 def push_const_fast(arg1) @stream << 51 << arg1 @ip += 2 @current_block.add_stack(0, 1) @instruction = 51 end |
#push_cpath_top ⇒ Object
447 448 449 450 451 452 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 447 def push_cpath_top @stream << 50 @ip += 1 @current_block.add_stack(0, 1) @instruction = 50 end |
#push_current_exception ⇒ Object
293 294 295 296 297 298 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 293 def push_current_exception @stream << 30 @ip += 1 @current_block.add_stack(0, 1) @instruction = 30 end |
#push_exception_state ⇒ Object
307 308 309 310 311 312 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 307 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/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
811 812 813 814 815 816 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 811 def push_has_block @stream << 101 @ip += 1 @current_block.add_stack(0, 1) @instruction = 101 end |
#push_int(arg1) ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 33 def push_int(arg1) if arg1 > 2 and arg1 < 256 @stream << 4 << arg1 @current_block.add_stack(0, 1) @ip += 2 @instruction = 4 else case arg1 when -1 when 0 when 1 when 2 else push_literal arg1 end end end |
#push_ivar(arg1) ⇒ Object
417 418 419 420 421 422 423 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 417 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
265 266 267 268 269 270 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 265 def push_local(arg1) @stream << 26 << arg1 @ip += 2 @current_block.add_stack(0, 1) @instruction = 26 end |
#push_local_depth(arg1, arg2) ⇒ Object
272 273 274 275 276 277 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 272 def push_local_depth(arg1, arg2) @stream << 27 << arg1 << arg2 @ip += 3 @current_block.add_stack(0, 1) @instruction = 27 end |
#push_mirror ⇒ Object
878 879 880 881 882 883 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 878 def push_mirror @stream << 110 @ip += 1 @current_block.add_stack(0, 1) @instruction = 110 end |
#push_my_field(arg1) ⇒ Object
663 664 665 666 667 668 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 663 def push_my_field(arg1) @stream << 80 << arg1 @ip += 2 @current_block.add_stack(0, 1) @instruction = 80 end |
#push_my_offset(arg1) ⇒ Object
768 769 770 771 772 773 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 768 def push_my_offset(arg1) @stream << 95 << arg1 @ip += 2 @current_block.add_stack(0, 1) @instruction = 95 end |
#push_nil ⇒ Object
12 13 14 15 16 17 |
# File 'lib/rubinius/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
818 819 820 821 822 823 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 818 def push_proc @stream << 102 @ip += 1 @current_block.add_stack(0, 1) @instruction = 102 end |
#push_rubinius ⇒ Object
848 849 850 851 852 853 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 848 def push_rubinius @stream << 106 @ip += 1 @current_block.add_stack(0, 1) @instruction = 106 end |
#push_scope ⇒ Object
603 604 605 606 607 608 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 603 def push_scope @stream << 72 @ip += 1 @current_block.add_stack(0, 1) @instruction = 72 end |
#push_self ⇒ Object
55 56 57 58 59 60 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 55 def push_self @stream << 5 @ip += 1 @current_block.add_stack(0, 1) @instruction = 5 end |
#push_stack_local(arg1) ⇒ Object
797 798 799 800 801 802 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 797 def push_stack_local(arg1) @stream << 99 << arg1 @ip += 2 @current_block.add_stack(0, 1) @instruction = 99 end |
#push_true ⇒ Object
19 20 21 22 23 24 |
# File 'lib/rubinius/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
871 872 873 874 875 876 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 871 def push_type @stream << 109 @ip += 1 @current_block.add_stack(0, 1) @instruction = 109 end |
#push_undef ⇒ Object
790 791 792 793 794 795 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 790 def push_undef @stream << 98 @ip += 1 @current_block.add_stack(0, 1) @instruction = 98 end |
#push_variables ⇒ Object
617 618 619 620 621 622 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 617 def push_variables @stream << 74 @ip += 1 @current_block.add_stack(0, 1) @instruction = 74 end |
#raise_break ⇒ Object
369 370 371 372 373 374 375 376 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 369 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
321 322 323 324 325 326 327 328 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 321 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
351 352 353 354 355 356 357 358 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 351 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
378 379 380 381 382 383 384 385 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 378 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
314 315 316 317 318 319 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 314 def restore_exception_state @stream << 33 @ip += 1 @current_block.add_stack(1, 0) @instruction = 33 end |
#ret ⇒ Object
200 201 202 203 204 205 206 207 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 200 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
244 245 246 247 248 249 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 244 def rotate(arg1) @stream << 23 << arg1 @ip += 2 @current_block.add_stack(arg1, (arg1 * 1)) @instruction = 23 end |
#send_method(arg1) ⇒ Object
482 483 484 485 486 487 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 482 def send_method(arg1) @stream << 55 << arg1 @ip += 2 @current_block.add_stack(1, 1) @instruction = 55 end |
#send_stack(arg1, arg2) ⇒ Object
489 490 491 492 493 494 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 489 def send_stack(arg1, arg2) @stream << 56 << arg1 << arg2 @ip += 3 @current_block.add_stack(arg2+1, 1) @instruction = 56 end |
#send_stack_with_block(arg1, arg2) ⇒ Object
496 497 498 499 500 501 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 496 def send_stack_with_block(arg1, arg2) @stream << 57 << arg1 << arg2 @ip += 3 @current_block.add_stack(arg2+2, 1) @instruction = 57 end |
#send_stack_with_splat(arg1, arg2) ⇒ Object
503 504 505 506 507 508 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 503 def send_stack_with_splat(arg1, arg2) @stream << 58 << arg1 << arg2 @ip += 3 @current_block.add_stack(arg2+3, 1) @instruction = 58 end |
#send_super_stack_with_block(arg1, arg2) ⇒ Object
510 511 512 513 514 515 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 510 def send_super_stack_with_block(arg1, arg2) @stream << 59 << arg1 << arg2 @ip += 3 @current_block.add_stack(arg2+1, 1) @instruction = 59 end |
#send_super_stack_with_splat(arg1, arg2) ⇒ Object
517 518 519 520 521 522 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 517 def send_super_stack_with_splat(arg1, arg2) @stream << 60 << arg1 << arg2 @ip += 3 @current_block.add_stack(arg2+2, 1) @instruction = 60 end |
#set_call_flags(arg1) ⇒ Object
468 469 470 471 472 473 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 468 def set_call_flags(arg1) @stream << 53 << arg1 @ip += 2 @current_block.add_stack(0, 0) @instruction = 53 end |
#set_const(arg1) ⇒ Object
425 426 427 428 429 430 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 425 def set_const(arg1) @stream << 47 << arg1 @ip += 2 @current_block.add_stack(1, 1) @instruction = 47 end |
#set_const_at(arg1) ⇒ Object
432 433 434 435 436 437 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 432 def set_const_at(arg1) @stream << 48 << arg1 @ip += 2 @current_block.add_stack(2, 1) @instruction = 48 end |
#set_ivar(arg1) ⇒ Object
409 410 411 412 413 414 415 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 409 def set_ivar(arg1) arg1 = find_literal arg1 @stream << 44 << arg1 @ip += 2 @current_block.add_stack(1, 1) @instruction = 44 end |
#set_literal(arg1) ⇒ Object
62 63 64 65 66 67 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 62 def set_literal(arg1) @stream << 6 << arg1 @ip += 2 @current_block.add_stack(1, 1) @instruction = 6 end |
#set_local(arg1) ⇒ Object
258 259 260 261 262 263 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 258 def set_local(arg1) @stream << 25 << arg1 @ip += 2 @current_block.add_stack(1, 1) @instruction = 25 end |
#set_local_depth(arg1, arg2) ⇒ Object
279 280 281 282 283 284 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 279 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
804 805 806 807 808 809 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 804 def set_stack_local(arg1) @stream << 100 << arg1 @ip += 2 @current_block.add_stack(1, 1) @instruction = 100 end |
#setup_unwind(arg1, arg2) ⇒ Object
330 331 332 333 334 335 336 337 338 339 340 341 342 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 330 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
402 403 404 405 406 407 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 402 def shift_array @stream << 43 @ip += 1 @current_block.add_stack(1, 2) @instruction = 43 end |
#store_my_field(arg1) ⇒ Object
670 671 672 673 674 675 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 670 def store_my_field(arg1) @stream << 81 << arg1 @ip += 2 @current_block.add_stack(1, 1) @instruction = 81 end |
#string_append ⇒ Object
582 583 584 585 586 587 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 582 def string_append @stream << 69 @ip += 1 @current_block.add_stack(2, 1) @instruction = 69 end |
#string_build(arg1) ⇒ Object
589 590 591 592 593 594 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 589 def string_build(arg1) @stream << 70 << arg1 @ip += 2 @current_block.add_stack(arg1, 1) @instruction = 70 end |
#string_dup ⇒ Object
596 597 598 599 600 601 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 596 def string_dup @stream << 71 @ip += 1 @current_block.add_stack(1, 1) @instruction = 71 end |
#swap_stack ⇒ Object
209 210 211 212 213 214 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 209 def swap_stack @stream << 18 @ip += 1 @current_block.add_stack(2, 2) @instruction = 18 end |
#yield_debugger ⇒ Object
631 632 633 634 635 636 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 631 def yield_debugger @stream << 76 @ip += 1 @current_block.add_stack(0, 0) @instruction = 76 end |
#yield_splat(arg1) ⇒ Object
575 576 577 578 579 580 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 575 def yield_splat(arg1) @stream << 68 << arg1 @ip += 2 @current_block.add_stack(arg1+1, 1) @instruction = 68 end |
#yield_stack(arg1) ⇒ Object
568 569 570 571 572 573 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 568 def yield_stack(arg1) @stream << 67 << arg1 @ip += 2 @current_block.add_stack(arg1, 1) @instruction = 67 end |
#zsuper(arg1) ⇒ Object
775 776 777 778 779 780 781 |
# File 'lib/rubinius/compiler/generator_methods.rb', line 775 def zsuper(arg1) arg1 = find_literal arg1 @stream << 96 << arg1 @ip += 2 @current_block.add_stack(1, 1) @instruction = 96 end |