Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin' into mcjit
Browse files Browse the repository at this point in the history
brixen committed Jan 8, 2016
2 parents 3f58238 + da81b5d commit bab0934
Showing 90 changed files with 2,054 additions and 407 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ before_script:
- if [ $TRAVIS_OS_NAME == osx ]; then travis_retry ./configure; fi
script: rake ci
after_success:
- if [ $TRAVIS_BRANCH == $TRAVIS_TAG ]; then ./scripts/deploy.sh; fi
- if [ $TRAVIS_BRANCH == $TRAVIS_TAG ]; then ./scripts/deploy.sh all; fi
branches:
only:
- master
27 changes: 27 additions & 0 deletions BSD_LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
BSD 3-clause License

Copyright (c) 2007-2015, Evan Phoenix and contributors
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of Rubinius nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2 changes: 1 addition & 1 deletion Gemfile.installed
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ gem "racc", "~> 1.4"
gem "rake", "~> 10.1"
gem "json", "~> 1.8"
gem "rdoc", "~> 4.0"
gem "psych", "= 2.0.13"
gem "psych", "= 2.0.17"

gem "rb-readline", "~> 0.5"
gem "rubysl-readline", "~> 2.0"
389 changes: 364 additions & 25 deletions LICENSE

Large diffs are not rendered by default.

11 changes: 6 additions & 5 deletions README
Original file line number Diff line number Diff line change
@@ -35,8 +35,9 @@ The following Ruby features are not supported on Rubinius:

3. License

Rubinius uses the BSD license. See LICENSE for details.

Rubinius uses the MPL-2.0 license. See LICENSE for details. Contributions made
prior to January 3rd, 2016 are licensed under the old BSD 3-clause license. A
copy of this license can be found in the file "BSD_LICENSE".

4. Installing Rubinius from Source

@@ -51,8 +52,8 @@ To install Rubinius, use the following steps:

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 http://rubini.us/doc/en/getting-started/requirements/
and http://rubini.us/doc/en/getting-started/building/.
information see http://rubinius.com/doc/en/getting-started/requirements/
and http://rubinius.com/doc/en/getting-started/building/.


5. Using RubyGems
@@ -66,7 +67,7 @@ Rubinius comes with RubyGems built-in. To install a gem, run the following:

The Rubinius documentation is available at the Rubinius website:

http://rubini.us
http://rubinius.com


7. Issues & Support
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -33,8 +33,9 @@ The following Ruby features are not supported on Rubinius:

### License

Rubinius uses the BSD license. See LICENSE for details.

Rubinius uses the MPL-2.0 license. See LICENSE for details. Contributions made
prior to January 3rd, 2016 are licensed under the old BSD 3-clause license. A
copy of this license can be found in the file "BSD_LICENSE".

### Installing Rubinius from Source

@@ -47,7 +48,7 @@ To install Rubinius, use the following steps:
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/).
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://rubinius.com/doc/en/getting-started/requirements/) and [Building Rubinius](http://rubinius.com/doc/en/getting-started/building/).


### Using RubyGems
@@ -59,7 +60,7 @@ Rubinius comes with RubyGems built-in. To install a gem, run the following:

### Documentation

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


### Issues & Support
@@ -72,4 +73,4 @@ For additional help, visit the [Rubinius Gitter chat room](https://gitter.im/rub
### 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/).
[CONTRIBUTING](https://github.com/rubinius/rubinius/blob/master/CONTRIBUTING.md) file and see the documentation [about contributing](http://rubinius.com/doc/en/contributing/).
96 changes: 89 additions & 7 deletions configure
Original file line number Diff line number Diff line change
@@ -161,7 +161,7 @@ class Configure
@vendored_libdir = File.join(root, "/vendor")

# Ruby compatibility version
@ruby_version = "2.1.0"
@ruby_version = "2.2.0"
@ruby_libversion = @ruby_version.split(/\./)[0..1].join.to_i

# Configure settings
@@ -276,6 +276,11 @@ class Configure
@runtime_gems_dir ||= "#{@build_prefix}#{@runtimedir}/gems"
end

def add_opt_dir(dir)
@include_dirs << "#{dir}/include"
@lib_dirs << "#{dir}/lib" << "#{dir}/lib64"
end

def options
@options = Rubinius::Options.new "Usage: configure [options]", 30
o = @options
@@ -361,8 +366,7 @@ class Configure

o.on "--with-opt-dir", "DIR", "Add DIR/include and DIR/lib to include and library search paths" do |dir|
dir.split(File::PATH_SEPARATOR).each do |d|
@include_dirs << "#{d}/include"
@lib_dirs << "#{d}/lib" << "#{d}/lib64"
add_opt_dir(d)
end
end

@@ -701,6 +705,14 @@ int main() { LLVMContext &Context = getGlobalContext(); }
check_tool_version @cc, '-dumpversion', [4, 1]
check_tool_version @cxx, '-dumpversion', [4, 1]

unless @cc == "clang" and @cxx == "clang++"
@log.deprecated <<-EOM
Support for compilers other than clang/clang++ is deprecated and will be
removed soon. If your platform does not have support for clang/clang++,
please notify us.
EOM
end

@make ||= ENV['MAKE'] || 'make'
@rake ||= ENV['RAKE'] || 'rake'
@tar ||= ENV['TAR'] || (@windows ? 'bsdtar' : 'tar')
@@ -1018,8 +1030,7 @@ int main() { return tgetnum(""); }

def detect_build_dirs
["/usr/local", "/opt/local", "/usr/pkg"].each do |dir|
@include_dirs << "#{dir}/include"
@lib_dirs << "#{dir}/lib" << "#{dir}/lib64"
add_opt_dir(dir)
end

@include_dirs = @include_dirs.select {|p| File.directory? p }
@@ -1156,7 +1167,7 @@ int main() { return tgetnum(""); }

def detect_features
# Default on *BSD is no execinfo
if RUBY_PLATFORM =~ /bsd/i and @features["execinfo"].configured.nil?
if @bsd and @features["execinfo"].configured.nil?
@features["execinfo"].configured = false
end

@@ -1221,6 +1232,46 @@ int main() { return tgetnum(""); }
@defines << "HAVE_GETTID"
end

if has_struct_member("stat", "st_atim", ["sys/stat.h"])
@defines << "HAVE_STRUCT_STAT_ST_ATIM"
end

if has_struct_member("stat", "st_atimespec", ["sys/stat.h"])
@defines << "HAVE_STRUCT_STAT_ST_ATIMESPEC"
end

if has_struct_member("stat", "st_atimensec", ["sys/stat.h"])
@defines << "HAVE_STRUCT_STAT_ST_ATIMENSEC"
end

if has_struct_member("stat", "st_mtim", ["sys/stat.h"])
@defines << "HAVE_STRUCT_STAT_ST_MTIM"
end

if has_struct_member("stat", "st_mtimespec", ["sys/stat.h"])
@defines << "HAVE_STRUCT_STAT_ST_MTIMESPEC"
end

if has_struct_member("stat", "st_mtimensec", ["sys/stat.h"])
@defines << "HAVE_STRUCT_STAT_ST_MTIMENSEC"
end

if has_struct_member("stat", "st_ctim", ["sys/stat.h"])
@defines << "HAVE_STRUCT_STAT_ST_CTIM"
end

if has_struct_member("stat", "st_ctimespec", ["sys/stat.h"])
@defines << "HAVE_STRUCT_STAT_ST_CTIMESPEC"
end

if has_struct_member("stat", "st_ctimensec", ["sys/stat.h"])
@defines << "HAVE_STRUCT_STAT_ST_CTIMENSEC"
end

if has_struct_member("stat", "st_birthtimespec", ["sys/stat.h"])
@defines << "HAVE_ST_BIRTHTIME"
end

# glibc has useless lchmod() so we don't try to use lchmod() on linux
if !@linux and has_function("lchmod", ["sys/stat.h", "unistd.h"])
@have_lchmod = true
@@ -1348,7 +1399,6 @@ int main() { return tgetnum(""); }
end

def process
set_host
set_system_commands

enable_features
@@ -1796,7 +1846,9 @@ int main() { return tgetnum(""); }
end

options
set_host
parse ARGV
detect_homebrew_openssl_lib
create_directories
check_tools
check_force_clean
@@ -1958,6 +2010,21 @@ Available commands are:
STDERR.puts message
end

DEPRECATION_HEADER =
"------------------------------ Deprecation notice ------------------------------"
DEPRECATION_FOOTER =
"--------------------------------------------------------------------------------"

def deprecated(message)
log DEPRECATION_HEADER, true
log message, true
log DEPRECATION_FOOTER, true

STDERR.puts DEPRECATION_HEADER
STDERR.puts message
STDERR.puts DEPRECATION_FOOTER
end

# Yields an IO for writing log messages.
def output
File.open @path, "a" do |f|
@@ -1995,6 +2062,21 @@ Available commands are:
fgrep llvm-config`.split
avail_binaries.reject { |fname| fname.include? 'libexec' }.last
end

# Returns true if the *brew* command is in the PATH and identifies
# itself with "Homebrew" when run interactively with -v argument.
def homebrew?
`echo quit | brew -v 2>&-`.start_with? 'Homebrew'
end

# Check if latest version of openssl is installed; if so, add to include
# and libs
def detect_homebrew_openssl_lib
if @darwin && homebrew? && (`brew list`.split("\n").include? 'openssl')
add_opt_dir(`brew --prefix openssl`.chomp)
end
end

end

STDOUT.sync = true
8 changes: 8 additions & 0 deletions dockerfiles/ubuntu/14.04/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM ubuntu:14.04

ADD https://rubinius-binaries-rubinius-com.s3-us-west-2.amazonaws.com/ubuntu/14.04/x86_64/rubinius-3.3.tar.bz2 /tmp/rubinius.tar.bz2
RUN apt-get -y install bzip2 && cd /opt && tar xvjf /tmp/rubinius.tar.bz2

ENV PATH /opt/rubinius/3.3/bin:/opt/rubinius/3.3/gems/bin:$PATH

CMD ["bash"]
8 changes: 8 additions & 0 deletions dockerfiles/ubuntu/15.10/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM ubuntu:15.10

ADD https://rubinius-binaries-rubinius-com.s3-us-west-2.amazonaws.com/ubuntu/15.10/x86_64/rubinius-3.3.tar.bz2 /tmp/rubinius.tar.bz2
RUN apt-get -y install bzip2 && cd /opt && tar xvjf /tmp/rubinius.tar.bz2

ENV PATH /opt/rubinius/3.3/bin:/opt/rubinius/3.3/gems/bin:$PATH

CMD ["bash"]
6 changes: 3 additions & 3 deletions gems_list.txt
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ daedalus-core-0.5.0.gem
ffi2-generators-0.1.1.gem
json-1.8.3.gem
minitest-4.7.5.gem
psych-2.0.13.gem
psych-2.0.17.gem
racc-1.4.14.gem
rake-10.4.2.gem
rb-readline-0.5.3.gem
@@ -72,7 +72,7 @@ rubysl-nkf-2.0.1.gem
rubysl-observer-2.0.0.gem
rubysl-open-uri-2.0.0.gem
rubysl-open3-2.0.0.gem
rubysl-openssl-2.7.0.gem
rubysl-openssl-2.8.0.gem
rubysl-optparse-2.0.1.gem
rubysl-ostruct-2.1.0.gem
rubysl-pathname-2.1.0.gem
@@ -93,7 +93,7 @@ rubysl-securerandom-2.0.0.gem
rubysl-set-2.0.1.gem
rubysl-shellwords-2.0.0.gem
rubysl-singleton-2.0.0.gem
rubysl-socket-2.0.1.gem
rubysl-socket-2.1.0.gem
rubysl-stringio-2.0.0.gem
rubysl-strscan-2.0.0.gem
rubysl-sync-2.0.0.gem
5 changes: 5 additions & 0 deletions kernel/bootstrap/stat.rb
Original file line number Diff line number Diff line change
@@ -87,6 +87,11 @@ def ctime
raise PrimitiveFailure, "Rubinius::Stat#ctime primitive failed"
end

def birthtime
Rubinius.primitive :stat_birthtime
raise NotImplementedError, "birthtime() function is unimplemented on this machine"
end

def inspect
"#<#{self.class.name} dev=0x#{self.dev.to_s(16)}, ino=#{self.ino}, " \
"mode=#{sprintf("%07d", self.mode.to_s(8).to_i)}, nlink=#{self.nlink}, " \
8 changes: 6 additions & 2 deletions kernel/common/binding.rb
Original file line number Diff line number Diff line change
@@ -3,8 +3,8 @@ class Binding
attr_accessor :compiled_code
attr_accessor :constant_scope
attr_accessor :proc_environment
attr_accessor :self
attr_accessor :location
attr_accessor :receiver

def from_proc?
@proc_environment
@@ -29,7 +29,7 @@ def self.self_context(recv, variables)
def self.setup(variables, code, constant_scope, recv=nil, location=nil)
bind = allocate()

bind.self = self_context(recv, variables)
bind.receiver = self_context(recv, variables)
bind.variables = variables
bind.compiled_code = code
bind.constant_scope = constant_scope
@@ -54,4 +54,8 @@ def eval(expr, filename=nil, lineno=nil)

Kernel.eval(expr, self, filename, lineno)
end

def local_variables
variables.local_variables
end
end
5 changes: 5 additions & 0 deletions kernel/common/dir.rb
Original file line number Diff line number Diff line change
@@ -174,6 +174,11 @@ def each
self
end

def fileno
Rubinius.primitive :dir_fileno
raise PrimitiveFailure, "Dir#fileno primitive failed"
end

attr_reader :path

alias_method :to_path, :path
Loading

0 comments on commit bab0934

Please sign in to comment.