public
Description: Rubinius, the Ruby VM
Homepage: http://rubini.us
Clone URL: git://github.com/evanphx/rubinius.git
Get the tests running again
evanphx (author)
Tue Jul 15 10:20:45 -0700 2008
commit  6b1e6fd0af694c982e2a2117b65da25a512ac9c0
tree    b1c2ff428c6b3da3c49cbdbe2047c2b6456bd150
parent  49d27d7a8d14d512c366f24403d9536f62a6544f
...
75
76
77
78
 
 
79
80
81
...
2306
2307
2308
2309
 
 
2310
2311
2312
...
2320
2321
2322
 
 
2323
2324
2325
...
2398
2399
2400
2401
 
 
2402
2403
2404
...
2414
2415
2416
 
 
2417
2418
2419
...
2472
2473
2474
2475
 
 
2476
2477
2478
...
2491
2492
2493
 
 
2494
2495
2496
...
2563
2564
2565
2566
 
 
2567
2568
2569
...
2586
2587
2588
 
 
2589
2590
2591
...
2638
2639
2640
2641
 
 
2642
2643
2644
...
2668
2669
2670
 
 
2671
2672
2673
...
2731
2732
2733
2734
 
 
2735
2736
2737
...
2765
2766
2767
 
 
2768
2769
2770
...
75
76
77
 
78
79
80
81
82
...
2307
2308
2309
 
2310
2311
2312
2313
2314
...
2322
2323
2324
2325
2326
2327
2328
2329
...
2402
2403
2404
 
2405
2406
2407
2408
2409
...
2419
2420
2421
2422
2423
2424
2425
2426
...
2479
2480
2481
 
2482
2483
2484
2485
2486
...
2499
2500
2501
2502
2503
2504
2505
2506
...
2573
2574
2575
 
2576
2577
2578
2579
2580
...
2597
2598
2599
2600
2601
2602
2603
2604
...
2651
2652
2653
 
2654
2655
2656
2657
2658
...
2682
2683
2684
2685
2686
2687
2688
2689
...
2747
2748
2749
 
2750
2751
2752
2753
2754
...
2782
2783
2784
2785
2786
2787
2788
2789
0
@@ -75,7 +75,8 @@ class TestInstructions : public CxxTest::TestSuite {
0
         fd.puts "cm->stack_size = Object::i2n(10);"
0
         fd.puts "cm->local_count = Object::i2n(0);"
0
         fd.puts "cm->literals = Tuple::create(state, 10);"
0
- fd.puts "MethodContext* ctx = task->generate_context(Qnil, cm, cm->vmmethod(state));"
0
+ fd.puts "cm->formalize(state);"
0
+ fd.puts "MethodContext* ctx = task->generate_context(Qnil, cm);"
0
         fd.puts "task->make_active(ctx);"
0
         # The += 0 disable unused variable warnings.
0
         fd.puts "Tuple* stack = task->stack; stack += 0;"
0
@@ -2306,7 +2307,8 @@ CODE
0
   def test_send_method
0
     <<-CODE
0
     CompiledMethod* target = CompiledMethod::create(state);
0
- target->iseq = InstructionSequence::create(state, 0);
0
+ target->iseq = InstructionSequence::create(state, 1);
0
+ target->iseq->opcodes->put(state, 0, Object::i2n(InstructionSequence::insn_ret));
0
     target->total_args = Object::i2n(0);
0
     target->required_args = target->total_args;
0
     target->stack_size = Object::i2n(10);
0
@@ -2320,6 +2322,8 @@ CODE
0
 
0
     stream[1] = (opcode)0;
0
 
0
+ target->formalize(state);
0
+
0
     run();
0
 
0
     TS_ASSERT_EQUALS(task->active->cm, target);
0
@@ -2398,7 +2402,8 @@ CODE
0
   def test_send_stack
0
     <<-CODE
0
     CompiledMethod* target = CompiledMethod::create(state);
0
- target->iseq = InstructionSequence::create(state, 0);
0
+ target->iseq = InstructionSequence::create(state, 1);
0
+ target->iseq->opcodes->put(state, 0, Object::i2n(InstructionSequence::insn_ret));
0
     target->total_args = Object::i2n(1);
0
     target->required_args = target->total_args;
0
     target->stack_size = Object::i2n(1);
0
@@ -2414,6 +2419,8 @@ CODE
0
     stream[1] = (opcode)0;
0
     stream[2] = (opcode)1;
0
 
0
+ target->formalize(state);
0
+
0
     run();
0
 
0
     MethodContext* s = task->active->sender;
0
@@ -2472,7 +2479,8 @@ CODE
0
   def test_send_stack_with_block
0
     <<-CODE
0
     CompiledMethod* target = CompiledMethod::create(state);
0
- target->iseq = InstructionSequence::create(state, 0);
0
+ target->iseq = InstructionSequence::create(state, 1);
0
+ target->iseq->opcodes->put(state, 0, Object::i2n(InstructionSequence::insn_ret));
0
     target->total_args = Object::i2n(1);
0
     target->required_args = target->total_args;
0
     target->stack_size = Object::i2n(1);
0
@@ -2491,6 +2499,8 @@ CODE
0
     stream[1] = (opcode)0;
0
     stream[2] = (opcode)1;
0
 
0
+ target->formalize(state);
0
+
0
     run();
0
 
0
     TS_ASSERT_EQUALS(task->active->cm, target);
0
@@ -2563,7 +2573,8 @@ CODE
0
   def test_send_stack_with_splat
0
     <<-CODE
0
     CompiledMethod* target = CompiledMethod::create(state);
0
- target->iseq = InstructionSequence::create(state, 0);
0
+ target->iseq = InstructionSequence::create(state, 1);
0
+ target->iseq->opcodes->put(state, 0, Object::i2n(InstructionSequence::insn_ret));
0
     target->total_args = Object::i2n(2);
0
     target->required_args = target->total_args;
0
     target->stack_size = Object::i2n(2);
0
@@ -2586,6 +2597,8 @@ CODE
0
     stream[1] = (opcode)0;
0
     stream[2] = (opcode)1;
0
 
0
+ target->formalize(state);
0
+
0
     run();
0
 
0
     TS_ASSERT_EQUALS(task->active->cm, target);
0
@@ -2638,7 +2651,8 @@ CODE
0
   def test_send_super_stack_with_block
0
     <<-CODE
0
     CompiledMethod* target = CompiledMethod::create(state);
0
- target->iseq = InstructionSequence::create(state, 0);
0
+ target->iseq = InstructionSequence::create(state, 1);
0
+ target->iseq->opcodes->put(state, 0, Object::i2n(InstructionSequence::insn_ret));
0
     target->total_args = Object::i2n(1);
0
     target->required_args = target->total_args;
0
     target->stack_size = Object::i2n(1);
0
@@ -2668,6 +2682,8 @@ CODE
0
     stream[1] = (opcode)0;
0
     stream[2] = (opcode)1;
0
 
0
+ target->formalize(state);
0
+
0
     run();
0
 
0
     TS_ASSERT_EQUALS(task->active->cm, target);
0
@@ -2731,7 +2747,8 @@ CODE
0
   def test_send_super_stack_with_splat
0
     <<-CODE
0
     CompiledMethod* target = CompiledMethod::create(state);
0
- target->iseq = InstructionSequence::create(state, 0);
0
+ target->iseq = InstructionSequence::create(state, 1);
0
+ target->iseq->opcodes->put(state, 0, Object::i2n(InstructionSequence::insn_ret));
0
     target->total_args = Object::i2n(2);
0
     target->required_args = target->total_args;
0
     target->stack_size = Object::i2n(2);
0
@@ -2765,6 +2782,8 @@ CODE
0
     stream[1] = (opcode)0;
0
     stream[2] = (opcode)1;
0
 
0
+ target->formalize(state);
0
+
0
     run();
0
 
0
     TS_ASSERT_EQUALS(task->active->cm, target);
...
21
22
23
24
 
25
26
27
...
21
22
23
 
24
25
26
27
0
@@ -21,7 +21,7 @@ class TestCompiledMethod : public CxxTest::TestSuite {
0
 
0
   void test_startup_tramp() {
0
     CompiledMethod* cm = CompiledMethod::generate_tramp(state);
0
- VMMethod* vmm = cm->vmmethod(state);
0
+ VMMethod* vmm = cm->formalize(state);
0
 
0
     TS_ASSERT_EQUALS(vmm->opcodes[0], static_cast<unsigned int>(InstructionSequence::insn_halt));
0
     TS_ASSERT(!cm->scope->nil_p());
...
34
35
36
37
 
 
38
39
40
 
 
41
42
43
...
34
35
36
 
37
38
39
40
41
42
43
44
45
46
0
@@ -34,10 +34,13 @@ class TestMessage : public CxxTest::TestSuite {
0
 
0
   CompiledMethod* create_cm() {
0
     CompiledMethod* cm = CompiledMethod::create(state);
0
- cm->iseq = InstructionSequence::create(state, 40);
0
+ cm->iseq = InstructionSequence::create(state, 1);
0
+ cm->iseq->opcodes->put(state, 0, Object::i2n(InstructionSequence::insn_ret));
0
     cm->stack_size = Object::i2n(10);
0
     cm->total_args = Object::i2n(0);
0
     cm->required_args = cm->total_args;
0
+ cm->formalize(state);
0
+
0
     return cm;
0
   }
0
 
...
23
24
25
26
 
 
27
28
29
 
 
 
30
31
32
...
23
24
25
 
26
27
28
29
30
31
32
33
34
35
36
0
@@ -23,10 +23,14 @@ class TestTask : public CxxTest::TestSuite {
0
 
0
   CompiledMethod* create_cm() {
0
     CompiledMethod* cm = CompiledMethod::create(state);
0
- cm->iseq = InstructionSequence::create(state, 40);
0
+ cm->iseq = InstructionSequence::create(state, 1);
0
+ cm->iseq->opcodes->put(state, 0, Object::i2n(InstructionSequence::insn_ret));
0
     cm->stack_size = Object::i2n(10);
0
     cm->total_args = Object::i2n(0);
0
     cm->required_args = cm->total_args;
0
+
0
+ cm->formalize(state);
0
+
0
     return cm;
0
   }
0
 

Comments

    No one has commented yet.