Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rubinius/rubinius
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 52707799b2e7
Choose a base ref
...
head repository: rubinius/rubinius
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: c3cb85792ebf
Choose a head ref
Loading
Showing with 1,439 additions and 1,654 deletions.
  1. +0 −102 CONTRIBUTING
  2. +63 −0 CONTRIBUTING.md
  3. +1 −1 Gemfile.lock
  4. +37 −72 README
  5. +69 −0 README.md
  6. +19 −33 configure
  7. +3 −3 gems_list.txt
  8. +6 −3 kernel/bootstrap/constant_table.rb
  9. +10 −10 kernel/common/kernel.rb
  10. +0 −1 kernel/common/thread.rb
  11. +11 −9 kernel/delta/ruby_constants.rb
  12. +2 −1 kernel/loader.rb
  13. +3 −3 library/rbconfig.rb
  14. +1 −1 rakelib/install.rake
  15. +0 −1 rakelib/kernel.rake
  16. +7 −6 rakelib/package.rake
  17. +4 −4 rakelib/package.rb
  18. +1 −1 rakelib/release.rake
  19. +29 −16 rakelib/release.rb
  20. +1 −1 rakelib/vm.rake
  21. +8 −0 spec/ruby/core/fixnum/minus_spec.rb
  22. +15 −0 spec/ruby/core/kernel/inspect_spec.rb
  23. +6 −0 spec/ruby/core/string/shared/encode.rb
  24. +5 −0 spec/ruby/core/thread/backtrace/location/fixtures/main.rb
  25. +0 −137 vm/auxiliary_threads.cpp
  26. +37 −14 vm/builtin/constant_table.cpp
  27. +5 −2 vm/builtin/constant_table.hpp
  28. +2 −0 vm/builtin/data.cpp
  29. +4 −1 vm/builtin/fixnum.cpp
  30. +6 −6 vm/builtin/io.cpp
  31. +2 −0 vm/builtin/jit.cpp
  32. +1 −1 vm/builtin/native_function.cpp
  33. +37 −18 vm/builtin/system.cpp
  34. +37 −65 vm/builtin/thread.cpp
  35. +6 −14 vm/builtin/thread.hpp
  36. +196 −261 vm/console.cpp
  37. +71 −35 vm/console.hpp
  38. +21 −18 vm/environment.cpp
  39. +10 −10 vm/environment.hpp
  40. +3 −3 vm/gc/baker.cpp
  41. +33 −106 vm/gc/finalize.cpp
  42. +10 −24 vm/gc/finalize.hpp
  43. +3 −3 vm/gc/immix.cpp
  44. +27 −89 vm/gc/immix_marker.cpp
  45. +6 −20 vm/gc/immix_marker.hpp
  46. +1 −1 vm/gc/managed.cpp
  47. +2 −2 vm/gc/managed.hpp
  48. +9 −9 vm/gc/mark_sweep.cpp
  49. +2 −1 vm/gc/root_buffer.hpp
  50. +2 −1 vm/gc/variable_buffer.hpp
  51. +234 −0 vm/internal_threads.cpp
  52. +48 −9 vm/{auxiliary_threads.hpp → internal_threads.hpp}
  53. +1 −1 vm/llvm/jit_block.cpp
  54. +1 −1 vm/llvm/jit_method.cpp
  55. +44 −85 vm/llvm/state.cpp
  56. +6 −20 vm/llvm/state.hpp
  57. +38 −127 vm/metrics.cpp
  58. +80 −93 vm/metrics.hpp
  59. +43 −43 vm/object_memory.cpp
  60. +2 −2 vm/object_memory.hpp
  61. +1 −0 vm/ontology.cpp
  62. +17 −15 vm/shared_state.cpp
  63. +19 −16 vm/shared_state.hpp
  64. +30 −107 vm/signal.cpp
  65. +5 −19 vm/signal.hpp
  66. +1 −1 vm/test/test.hpp
  67. +4 −0 vm/test/test_integer.hpp
  68. +1 −1 vm/util/atomic.hpp
  69. +2 −3 vm/vm.cpp
  70. +26 −0 vm/vm.hpp
  71. +2 −2 vm/world_state.hpp
102 changes: 0 additions & 102 deletions CONTRIBUTING

This file was deleted.

63 changes: 63 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
## Contributing To Rubinius

We want to start off by saying thank you for using Rubinius. This project is a labor of love, and we appreciate all of the users that catch bugs, make performance improvements, and help with documentation. Every contribution is meaningful, so thank you for participating. That being said, here are a few guidelines that we ask you to follow so we can successfully address your issue.

### Submitting Issues

Please include the following:

* The Rubinius version (rbx -v)
* Your OS (uname -a) RVM/rbenv/chruby/etc version or the commit hash from git if you're building off of a clone
* Stack trace (preferably as a Gist, since they're easier to read) If you can add a failing spec, that's great!
* Please include the simplest possible reproduction you can. This last point is vital to fixing issues.

If available, please also include the contents of the following files as a Gist:

* configure.log
* config.rb

These two files contain the output of the compilation process and the various configuration options used (e.g. compiler options).

### Running Specs

MSpec provides several different scripts to run the specs under different conditions. The default behavior is to simply run all the specs. If you invoke the following command, it will run all the Ruby Array specs:

$ bin/mspec core/array

The -t option specifies which Ruby implementation to run the specs under. The default in Rubinius is to run them with Rubinius, so -tx is implied. You can easily run with another target by giving the name of an executable on your PATH or the full path to an executable. Since the specs are intended to show the behavior of MRI, if you are writing new specs you need to run them under the current stable release of MRI 2.0. For example, if you have a ruby2.0.0 executable on your PATH, you can do the following:

$ bin/mspec -t ruby2.0.0 core/array

Finally, if you are running bin/mspec in the Rubinius source directory, the location of the RubySpecs are known (spec/ruby/), so you can use the full path or the shortened version core/array above.

### Fixing A Bug

* Fork the repo, create a topic branch, and include a spec, if appropriate. Pull requests that need a spec but are submitted without one will be delayed until one is written. The spec should be in a separate commit.
* Please follow the [Coding Style Guide](http://rubini.us/doc/en/contributing/style-guide)
* **Always run the full spec suite**. `rake` will run the VM specs plus RubySpec.
* Please add a detailed commit message. Here is a [fantastic example](https://github.com/rubinius/rubinius/commit/1f9ddd1) by @ryoqun . The preference is for a (max) 50 character summary as line one, a blank line, then any number of lines, no longer than 80 characters.
* Send in that pull request!
* Follow up with us on the ticket if we haven't merged or commented in a few days. We strive to address issues in a reasonable time. If we miss yours, please remind us.
* When unsure about the changes, associated specs or other topics, please ask! We're more than eager to help.

### Writing Specs

A lot of this is already covered in [How To Write A Spec](http://rubini.us/doc/en/how-to/write-a-spec/) but the basic gist of it is as following:

* Spec descriptions (for both "describe" and "it" blocks) should be written in natural English.
* Specs should include only the bare minimum that is required to test something.
* Setup code that is re-used between examples should be placed in a before() block
* When unsure, please ask!

### Performance Patches

We love these!

* Include benchmarks before and after the change. Please include your hardware specs, namely CPU speed, # of cores, speed of hard drive (if SSD, then SSD is fine) and amount of RAM.
* **Always run the full spec suite**. `rake` will ensure you didn't accidentally break anything.

For more details on how to contribute, please see [Contributing to Rubinius](http://rubini.us/2011/10/18/contributing-to-rubinius/).

For more help, visit the [Rubinius Gitter chat room](https://gitter.im/rubinius/rubinius)

Again, thank you!
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ GEM
rubinius-processor (~> 1.0)
rubinius-toolset (~> 2.0)
rubinius-compiler (1.2.1)
rubinius-melbourne (1.2.0.0)
rubinius-melbourne (1.2.1.0)
rubinius-processor (1.3.0)
rubinius-toolset (2.3.1)

109 changes: 37 additions & 72 deletions README
Original file line number Diff line number Diff line change
@@ -1,35 +1,38 @@
1. What is Rubinius
1. The Rubinius Language Platform

Rubinius is an implementation of the Ruby programming language. Rubinius is
compatible with Ruby version 1.8.7.

Rubinius includes a Ruby parser, bytecode virtual machine, bytecode compiler,
generational garbage collector, and just-in-time (JIT) native machine code
compiler. Rubinius uses native OS threads with no global interpreter lock.
Rubinius also provides C-API compatibility for native C extensions.
Rubinius is a modern language platform that supports a number of programming
languages.

The Ruby core library is written almost entirely in Ruby. Rubinius tools, such
as the bytecode compiler and debugger, are also written in Ruby. Rubinius
provides the same standard libraries as Matz's Ruby implementation (MRI) with
the following exceptions:

* Continuation
* Ripper
* TracePoint
* Tracer
Rubinius includes a bytecode virtual machine, generational garbage collector,
and just-in-time (JIT) native machine code compiler. Rubinius provides
concurrency support via native OS threads with no global interpreter lock.

Rubinius runs on Mac OS X and many Unix/Linux operating systems. Microsoft
Windows is not yet supported.

Most popular Ruby applications, like Rails, run on Rubinius.

2. The Ruby Programming Language

Many popular Ruby applications, like Rails, run on Rubinius, which aims to be
compatible with Ruby version 1.8.7.

Rubinius includes a Ruby parser, Ruby bytecode compiler, Ruby core library,
and C-API compatibility for native C extensions. The Ruby core library is
written almost entirely in Ruby. The Ruby bytecode compiler and other tools,
such as the debugger, are also written in Ruby. Rubinius provides the
standard Ruby libraries.

The following Ruby features are not supported on Rubinius:

2. License
* $SAFE levels


3. License

Rubinius uses the BSD license. See LICENSE for details.


3. Installing Rubinius from Source
4. Installing Rubinius from Source

To install Rubinius, use the following steps:

@@ -45,71 +48,33 @@ terminal to add the Rubinius executable (bin) directory to your PATH. For more
information see http://rubini.us/doc/en/getting-started/requirements/
and http://rubini.us/doc/en/getting-started/building/.

If you are unable to build melbourne during the rake step you may be using an
incompatible version of bison. Rubinius 2.x/melbourne 2.x can be built with
bison 3.x but Rubinius 1.x/melbourne 1.x must be built with bison 2.x

On Debian and Ubuntu variants, a good way to have both versions installed is to
use update-alternatives. You can accomplish this by either installing bison
via apt-get and then moving files around, or installing both versions by source.

It's unknown at this time if moving the package manager-installed files will
break updates by the package manager in the future, so the steps below will
outline how to build via source.

1. wget http://ftp.gnu.org/gnu/bison/bison-2.5.1.tar.gz
2. wget http://ftp.gnu.org/gnu/bison/bison-3.0.2.tar.gz
3. tar xzf bison-2.5.1.tar.gz
4. tar xzf bison-3.0.2.tar.gz
5. cd bison-2.5.1/
6. ./configure --program-suffix="-2.5.1" --datarootdir=/usr/share/bison-2.5.1
7. make && sudo make install
8. cd ../bison-3.0.2/
9. ./configure --program-suffix="-3.0.2" --datarootdir=/usr/share/bison-3.0.2
10. make && sudo make install
11. sudo update-alternatives \
--install \
/usr/local/bin/bison \
bison \
/usr/local/bin/bison-3.0.2 \
150 \
--slave \
/usr/share/bison \
bison-share-dir \
/usr/share/bison-3.0.2/bison
12. sudo update-alternatives \
--install \
/usr/local/bin/bison \
bison \
/usr/local/bin/bison-2.5.1 \
100 \
--slave \
/usr/share/bison \
bison-share-dir \
/usr/share/bison-2.5.1/bison
13. sudo update-alternatives --config bison

4. Using RubyGems

5. Using RubyGems

Rubinius comes with RubyGems built-in. To install a gem, run the following:

rbx -S gem install <gem_name>
$ rbx -S gem install <gem_name>


5. Documentation
6. Documentation

After installing Rubinius, run 'rbx docs' to access the built-in documentation
at any time.
The Rubinius documentation is available at the Rubinius website:

http://rubini.us

6. Tickets

7. Issues & Support

Please file tickets for bugs or problems. The issue tracker is:

http://github.com/rubinius/rubinius/issues

For additional help, visit the Rubinius Gitter chat room:

https://gitter.im/rubinius/rubinius


7. Contributing
8. Contributing

The Rubinius team welcomes contributions. For more information read the
The Rubinius team welcomes contributions. For more information, read the
CONTRIBUTING file in the root directory of Rubinius.
69 changes: 69 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/rubinius/rubinius?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![Build Status](https://travis-ci.org/rubinius/rubinius.svg?branch=1.8.7)](https://travis-ci.org/rubinius/rubinius)

## The Rubinius Language Platform

Rubinius is a modern language platform that supports a number of programming languages.

Rubinius includes a bytecode virtual machine, generational garbage collector, and just-in-time (JIT) native machine code compiler. Rubinius provides concurrency support via native OS threads with no global interpreter lock.

Rubinius runs on Mac OS X and many Unix/Linux operating systems. Microsoft Windows is not yet supported.


### The Ruby Programming Language

Many popular Ruby applications, like Rails, run on Rubinius, which aims to be
compatible with Ruby version 1.8.7.

Rubinius includes a Ruby parser, Ruby bytecode compiler, Ruby core library,
and C-API compatibility for native C extensions. The Ruby core library is
written almost entirely in Ruby. The Ruby bytecode compiler and other tools,
such as the debugger, are also written in Ruby. Rubinius provides the
standard Ruby libraries.

The following Ruby features are not supported on Rubinius:

* $SAFE levels


### License

Rubinius uses the BSD license. See LICENSE for details.


### Installing Rubinius from Source

To install Rubinius, use the following steps:


1. Ensure that MRI 1.8.7+, rubygems, rake, and git are installed
1. git clone git://github.com/rubinius/rubinius.git -b 1.8.7
1. cd rubinius
1. bundle
1. ./configure --prefix=/path/to/install/dir
1. rake

When the install process finishes, follow the directions printed to the terminal to add the Rubinius executable (bin) directory to your PATH. For more information see the documentation for [Build Requirements](http://rubini.us/doc/en/getting-started/requirements/) and [Building Rubinius](http://rubini.us/doc/en/getting-started/building/).


### Using RubyGems

Rubinius comes with RubyGems built-in. To install a gem, run the following:

$ rbx -S gem install <gem_name>


### Documentation

The Rubinius documentation is available at the [Rubinius website](http://rubini.us).


### Issues & Support

Please [file tickets](http://github.com/rubinius/rubinius/issues) for bugs or problems.

For additional help, visit the [Rubinius Gitter chat room](https://gitter.im/rubinius/rubinius).


### Contributing

The Rubinius team welcomes contributions. For more information, read the [CONTRIBUTING](https://github.com/rubinius/rubinius/blob/master/CONTRIBUTING.md) file and see the documentation [about contributing](http://rubini.us/doc/en/contributing/).
Loading