GithubHelp home page GithubHelp logo

sisshiki1969 / monoruby Goto Github PK

View Code? Open in Web Editor NEW
106.0 106.0 4.0 12.83 MB

Ruby implementation with yet another JIT compiler.

License: Apache License 2.0

Rust 97.59% Ruby 1.95% JavaScript 0.01% Lua 0.01% Shell 0.43% C 0.02%

monoruby's People

Contributors

sisshiki1969 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

monoruby's Issues

SEGV when yield.

SEGV occurs in the code below.

def m
  i = 0
  while i<30
    i += 1
    yield
  end
end

m{}

Compatibility?

The README doesn't mention anything about compatibility, but it seems worth having at least a sentence about it.
Does it run RubyGems/Bundler/Rails? Does it have the Ruby standard library? C extensions?

Support *super* in a block scope.

Currently we can accept super with arguments delegation only when super exists in a method scope.
We must support super in a block scope.

Splat arguments for native function are not supported in JIT.

a = [1,2,3]
b = []
10.times do
    b.prepend(*a)
end
puts "#{b}" 

CRuby: [1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3]
monoruby: [[1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3], 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3]

Bug in inline constant cache.

LoadConst insn returns wrong value when base exists because base is not guarded.

module M
  def initialize
    puts self.class::C
  end
end

class A
  include M
  C = 100
end

class B
  include M
  C = 200
end

A.new # => 100
B.new # => 200  but monoruby gets 100 currently.

Conversion of keyword arguments to Hash in method call is not supported.

In Ruby method call, when all conditions of

  1. the callee method does not have keyword params
  2. at least one keyword argument exists
    met, keyword arguments are converted to a Hash object and the Hash is passed to the callee method as the last positional argument.

Currently, monoruby is not compatible with this behavior.

def f(a, b, *c)
  puts "a:#{a} b:#{b} c:#{c}"
end

f("a", 42, 1000, x:100, y:200)
# => [Ruby] a:a b:42 c:[1000, {:x=>100, :y=>200}]
#=>[monoruby] a:a b:42 c:[1000]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.