Skip to content
This repository

May 15, 2012

  1. Watson

    should not raise an exception, so implement vm_fast_mod(). fix #1471

    The modulo between the Fixnum/Float is improved the performance by this patch.
    
    * before
          user     system      total        real
      1.000000   0.000000   1.000000 (  1.000743)
      1.030000   0.000000   1.030000 (  1.030479)
      1.090000   0.000000   1.090000 (  1.097021)
    
    * after
          user     system      total        real
      0.570000   0.000000   0.570000 (  0.577238)
      1.040000   0.000000   1.040000 (  1.031634)
      0.540000   0.000000   0.540000 (  0.539968)
    
    Test Script:
    ----
    require 'benchmark'
    
    Benchmark.bm do |x|
      x.report do
        10_000_000.times do
          42 % 1
        end
      end
    
      x.report do
        10_000_000.times do
          42 % 1.0
        end
      end
    
      x.report do
        10_000_000.times do
          42.0 % 1.0
        end
      end
    end
    authored May 15, 2012

Apr 23, 2012

  1. Mark Rada

    Change ownership to The MacRuby Team and update copyrights

    authored April 22, 2012

Jun 16, 2011

  1. Kouji Takao

    fixed below.

    (fixes #1285 and #1292)
    
    however, this changes has regresion that does not support alias eval, instance_eval, module_eval and class_eval.
    
    ---
    Squashed commit of the following:
    
    commit 5da9a95
    Author: Kouji Takao <kouji@takao7.net>
    Date:   Wed Jun 15 20:49:45 2011 +0900
    
        fixed memory error in Binding#dup, Binding#clone.
        removed fails tag for spec/frozen/tags/macruby/core/binding/clone_tags.txt and spec/frozen/tags/macruby/core/binding/dup_tags.txt.
    
    commit f03f4a4
    Author: Kouji Takao <kouji@takao7.net>
    Date:   Wed Jun 15 20:19:26 2011 +0900
    
        fixed memory leak in proc + outer_stack.
        fixed segv with RBO.
    
    commit e0bd18a
    Author: Kouji Takao <kouji@takao7.net>
    Date:   Sat Jun 4 00:49:22 2011 +0900
    
        passed failed test in test_vm/block.rb below.
        ---
        assert ':ok', %{
          proc do
            def proc_caller(&b) b.call end
            def enclosing_method
              proc_caller { return :ok }
              :nok
            end
            p enclosing_method
          end.call
        }
    
        raise TypeError below.
        ---
        1.instance_eval "def f; end"
        1.instance_eval { def f; end }
    
    commit 87657c9
    Author: Kouji Takao <kouji@takao7.net>
    Date:   Fri Jun 3 22:36:29 2011 +0900
    
        added fails tags, because segfault on BigDecimal with raise exception.
    
    commit 3ff39e9
    Author: Kouji Takao <kouji@takao7.net>
    Date:   Fri Jun 3 22:31:33 2011 +0900
    
        reset current_class, outer_stack and current_outer in rb_vm_aot_feature_load().
    
    commit da2dfc2
    Author: Kouji Takao <kouji@takao7.net>
    Date:   Fri Jun 3 22:30:43 2011 +0900
    
        added initialize outer_stack.
    
    commit 0638482
    Author: Kouji Takao <kouji@takao7.net>
    Date:   Fri Jun 3 22:30:22 2011 +0900
    
        fixed segfault on rubyspec.
    
    commit 66c81e7
    Author: Kouji Takao <kouji@takao7.net>
    Date:   Thu Jun 2 23:20:47 2011 +0900
    
        reset outer_stack when loading rbo.
    
    commit 55beb0c
    Author: Kouji Takao <kouji@takao7.net>
    Date:   Thu Jun 2 19:24:34 2011 +0900
    
        removed outer_mask from RoxorCompiler, because It is not used now.
    
    commit ccbb5b3
    Author: Kouji Takao <kouji@takao7.net>
    Date:   Thu Jun 2 18:51:11 2011 +0900
    
        fixed bug, retain outer_stack in RoxorVM copy constructer and release outer_stack in RoxorVM destructer.
    
    commit e78a418480d41fdaffb6962dd5b386ddb7769892
    Author: Kouji Takao <kouji@takao7.net>
    Date:   Thu Jun 2 17:22:34 2011 +0900
    
        fixed bug, defined?(<expected constants>)
    
    commit bdfde05de4cf1b7777894383afd1fb1c1aa80827
    Author: Kouji Takao <kouji@takao7.net>
    Date:   Thu Jun 2 14:44:07 2011 +0900
    
        implemented Binding#dup and Binding#clone.
    
    commit 227017b27d2ce39692f10b51b95d20f3f4097dbf
    Author: Kouji Takao <kouji@takao7.net>
    Date:   Thu Jun 2 14:27:26 2011 +0900
    
        removed rb_vm_set_outer() and rb_vm_get_outer().
        because does not use original outer now.
    
    commit 3c11376eb514301a2474693a8e4cd893e0dab833
    Author: Kouji Takao <kouji@takao7.net>
    Date:   Thu Jun 2 11:46:18 2011 +0900
    
        fixed segfault on defined?(CONSTANT) in method below.
        ---
        class A
          CONST = 42
          def f
            p(defined? CONST)
          end
        end
        GC.start # GC [A] outer_stack
    
        A.new.f # before SEGV
    
    commit 96cf97a5a6315d684297685fc05d95c223dd4949
    Author: Kouji Takao <kouji@takao7.net>
    Date:   Wed Jun 1 23:19:51 2011 +0900
    
        occurs TypeError exception below. This is CRuby spec. (like above)
        ---
        1.instance_eval "class A; end"
    
    commit a51d5415c9d6ef1532a0f2a4b1cd37d9b0c9afa8
    Author: Kouji Takao <kouji@takao7.net>
    Date:   Wed Jun 1 23:07:05 2011 +0900
    
        occurs TypeError exception below. This is CRuby spec.
        ---
        1.instance_eval "A = 10"
    
    commit 6a55eac0bec96de075e648683298cae1ec40d50f
    Author: Kouji Takao <kouji@takao7.net>
    Date:   Wed Jun 1 22:00:29 2011 +0900
    
        fixed memory leak below. (but MacRuby has memory leak calling eval with string now)
        ---
        Array.class_eval <<-EOS
          def f
          end
        EOS
    
    commit b1aa927a45085305a317a7fbc96212582e12c0b7
    Author: Kouji Takao <kouji@takao7.net>
    Date:   Wed Jun 1 16:38:16 2011 +0900
    
        does not push outer in eval.
    
    commit 4f8696d7c095cbc311b8f3a1e5f7af37c2f1de2b
    Author: Kouji Takao <kouji@takao7.net>
    Date:   Wed Jun 1 16:11:22 2011 +0900
    
        fixed bug below.
        ---
        module M1
          B = 42
          module M2
            eval("B") # before uninitialized constant M1::M2::B (NameError), after none.
          end
        end
    
    commit ba3b3110139003b970c207e8c68ec9591fd36cad
    Author: Kouji Takao <kouji@takao7.net>
    Date:   Wed Jun 1 15:06:40 2011 +0900
    
        fixed memory leak below.
        ---
        loop do
          1.instance_eval do
            42
          end
        end
    
    commit c0b3bbf22383a1fd9689698a6b2df4801a851bfc
    Author: Kouji Takao <kouji@takao7.net>
    Date:   Wed Jun 1 14:41:08 2011 +0900
    
        Revert "removed rb_vm_outer_t.pushed_by_eval struct member. it use detecting current class on cRuby, but MacRuby has rb_vm_t.current_class."
    
        This reverts commit 5f6cf8fd924a07553e59a474d508274e2ec2b275.
    
    commit 1446c62436ba5fc7a9d71dc929fc84278778f718
    Author: Kouji Takao <kouji@takao7.net>
    Date:   Wed Jun 1 14:40:54 2011 +0900
    
        Revert "fixed bug below."
    
        This reverts commit 3531dfc0c48af2b610946159a5f621db52d42b4e.
    
    commit d297f371b9d4fd3ebf03fb1534e9bcbb80f524ce
    Author: Kouji Takao <kouji@takao7.net>
    Date:   Wed Jun 1 14:37:15 2011 +0900
    
        fixed bug below.
        ---
        class EvalSpecs
          class A
            def c
              eval "class C; end"
            end
          end
        end
    
        EvalSpecs::A.new.c
    
        p EvalSpecs::A::C.name #=> "EvalSpecs::A::C"
    
    commit 7f0595b4d23a0494949bf7c23b11a0e007f5e25b
    Author: Kouji Takao <kouji@takao7.net>
    Date:   Wed Jun 1 13:40:16 2011 +0900
    
        removed rb_vm_outer_t.pushed_by_eval struct member. it use detecting current class on cRuby, but MacRuby has rb_vm_t.current_class.
    
    commit dad53ecafda46ebe7c08a8836260c577df805503
    Author: Kouji Takao <kouji@takao7.net>
    Date:   Wed Jun 1 13:24:23 2011 +0900
    
        fixed memory leak like below.
        ---
        class A
          Module.nesting
        end
    
    commit a3e956ba4681d16686178fe5f8b93eaae9d89e28
    Author: Kouji Takao <kouji@takao7.net>
    Date:   Wed Jun 1 02:08:26 2011 +0900
    
        fixed memory leak when run below.
        ---
        loop do
          class A
          end
        end
    
    commit d40229a6dfc92571803e858310cf7bb5fdbf3f3d
    Author: Kouji Takao <kouji@takao7.net>
    Date:   Sun May 29 21:10:54 2011 +0900
    
        Revert "fixed displays "reference count underflow" message (fixes #1284)" and "fixed RoxorVM::pop_outer() leaks memory. (fixes #1267)"
    
        This reverts commit 3b4d10ef3897ce11919bdea99d32b6fb3ce7390b and 68ac3fcaf1041ef9b25fb3bc940a47f41505b7e5.
    authored June 16, 2011

Jun 01, 2011

  1. Laurent Sansonetti

    fix a bug when retrieving the special <dollar-sign>38 variable would …

    …collide with the backquote ascii character, instead we now separately compile special codes and indices
    authored June 01, 2011

May 18, 2011

  1. Kouji Takao

    fixed RoxorVM::pop_outer() leaks memory. (fixes #1267)

    This changes included many things. See below.
    
    (1) fixed memory leak below.
    1.instance_eval { 42 }
    
    But did not below.
    1.instance_eval "42"
    
    I think currently MacRuby occurs memory leak in eval().
    
    (2) occurs TypeError exception below. This is CRuby spec.
    1.instance_eval "A = 10"
    
    (3) occurs TypeError exception below. This is CRuby spec. (like above)
    1.instance_eval "class A; end"
    
    (4) passed failed test in test_vm/block.rb below.
    assert ':ok', %{
      proc do
        def proc_caller(&b) b.call end
        def enclosing_method
          proc_caller { return :ok }
          :nok
        end
        p enclosing_method
      end.call
    }
    
    (5) removed outer_mask in RoxorCompiler
    Because It is not used now.
    
    (6) supported alias eval, instance_eval, module_eval and class_eval.
    
    (7) set, push and pop outer_stack in runtime.
    
    (8) removed rb_vm_set_outer() and rb_vm_get_outer().
    because does not use original outer now.
    
    (9) implemented Binding#dup and Binding#clone.

May 14, 2011

  1. Laurent Sansonetti

    atomic compilation of arrays, to make JIT compilation faster

    authored May 13, 2011

May 04, 2011

  1. Kouji Takao

    fixed break, next and redo with ensure block, fixed codes below.

    1)
    1.times { begin; break; ensure; p 42; end }
    
    2)
    i=0; while i<1; begin; break; ensure; p 42; end; end
    
    3)
    i=0; while true; begin; break if i>0; i=1; redo; ensure; p 42; end; end
    
    4)
    def f(&proc) p :ok; end; f(&nil)
    authored May 04, 2011

Apr 24, 2011

  1. Kouji Takao

    supported lexical const lookup. (fixes #619, #626, #1167, #1192) (ref…

    …s #1095)
    authored April 24, 2011

Apr 16, 2011

  1. Laurent Sansonetti

    when compiling super without argument (ZSUPER), make sure to pass the…

    … current block
    authored April 16, 2011

Mar 11, 2011

  1. now depend on revision 127367 of branch LLVM 2.9

    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@5272 23306eb0-4c56-4727-a40e-e92c0eb68959
    authored March 11, 2011

Mar 10, 2011

  1. better tco disable check

    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@5270 23306eb0-4c56-4727-a40e-e92c0eb68959
    authored March 10, 2011
  2. add support for llvm 2.9, test it by passing CFLAGS=-D__SUPPORT_LLVM_…

    …29__ to rake
    
    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@5269 23306eb0-4c56-4727-a40e-e92c0eb68959
    authored March 10, 2011

Feb 22, 2011

  1. fix lexical const lookup bugs inside modules defined using the :: not…

    …ation + attach necessary dwarf metadata to const lookup primitive calls in order for const_missing to properly appear in backtraces
    
    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@5236 23306eb0-4c56-4727-a40e-e92c0eb68959
    authored February 22, 2011

Jan 28, 2011

  1. fix a bug in the compilation of the 'next' expression which would not…

    … honor ensure blocks
    
    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@5201 23306eb0-4c56-4727-a40e-e92c0eb68959
    authored January 28, 2011

Jan 15, 2011

  1. update copyrights to 2011

    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@5168 23306eb0-4c56-4727-a40e-e92c0eb68959
    authored January 15, 2011

Jan 14, 2011

  1. fix the compilation of C blocks closures to not use a global variable…

    … to store/load the Proc object to call, but instead retrieve a reference to it from the block literal argument
    
    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@5163 23306eb0-4c56-4727-a40e-e92c0eb68959
    authored January 14, 2011

Dec 16, 2010

  1. fix a bug where calling a method defined with #define_method with a b…

    …lock accepting a splat argument (arity -2) would crash
    
    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@5037 23306eb0-4c56-4727-a40e-e92c0eb68959
    authored December 16, 2010

Nov 05, 2010

  1. add support for C-style arrays (from/to Ruby)

    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@4882 23306eb0-4c56-4727-a40e-e92c0eb68959
    authored November 05, 2010

Oct 28, 2010

  1. add implementation of MRI rb_call_super() method (note: untested)

    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@4844 23306eb0-4c56-4727-a40e-e92c0eb68959
    authored October 28, 2010

Sep 29, 2010

  1. add basic support for __method__ and __callee__

    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@4559 23306eb0-4c56-4727-a40e-e92c0eb68959
    authored September 29, 2010

Sep 28, 2010

  1. when calculating a backtrace path from a -e script, omit the current …

    …directory
    
    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@4547 23306eb0-4c56-4727-a40e-e92c0eb68959
    authored September 28, 2010

Sep 22, 2010

  1. issue write barriers when storing objects into Binding slots (this sh…

    …ould fix most of the macirb crashers)
    
    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@4533 23306eb0-4c56-4727-a40e-e92c0eb68959
    authored September 22, 2010

Sep 08, 2010

  1. support for C-level blocks (note: this requires a not-yet-released Br…

    …idgeSupport with special annotations for blocks)
    
    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@4495 23306eb0-4c56-4727-a40e-e92c0eb68959
    authored September 08, 2010

Aug 28, 2010

  1. optimizing symetric masgns

    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@4476 23306eb0-4c56-4727-a40e-e92c0eb68959
    authored August 28, 2010

Jun 25, 2010

  1. aot: precompiling BridgeSupport metadata (work in progress)

    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@4272 23306eb0-4c56-4727-a40e-e92c0eb68959
    authored June 25, 2010

Jun 20, 2010

  1. aot: when preparing methods, also pre-compile objc stubs (currently, …

    …only generic ones)
    
    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@4255 23306eb0-4c56-4727-a40e-e92c0eb68959
    authored June 20, 2010

Jun 16, 2010

  1. started to trim out the static library

    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@4224 23306eb0-4c56-4727-a40e-e92c0eb68959
    authored June 16, 2010

Jun 12, 2010

  1. follow new llvm changes + no more rtti

    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@4219 23306eb0-4c56-4727-a40e-e92c0eb68959
    authored June 12, 2010

Jun 10, 2010

  1. removing unnecessary state variables

    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@4216 23306eb0-4c56-4727-a40e-e92c0eb68959
    authored June 10, 2010

Jun 09, 2010

  1. now interpreting potential cold paths (work in progress)

    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@4213 23306eb0-4c56-4727-a40e-e92c0eb68959
    authored June 09, 2010

Jun 07, 2010

  1. moving more primitives to the kernel

    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@4211 23306eb0-4c56-4727-a40e-e92c0eb68959
    authored June 07, 2010

Jun 05, 2010

  1. moving the dispatcher bits into the kernel + misc fixes/cleanup

    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@4208 23306eb0-4c56-4727-a40e-e92c0eb68959
    authored June 05, 2010

Jun 01, 2010

  1. per-vm method cache + misc fixes/improvements

    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@4181 23306eb0-4c56-4727-a40e-e92c0eb68959
    authored June 01, 2010

May 24, 2010

  1. reduce usage of std::vector

    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@4137 23306eb0-4c56-4727-a40e-e92c0eb68959
    authored May 24, 2010
  2. now compile some of the VM primitives into bitcode that will be added…

    … to the default compilation module and later inlined
    
    git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@4136 23306eb0-4c56-4727-a40e-e92c0eb68959
    authored May 24, 2010
Something went wrong with that request. Please try again.