Skip to content

Commit

Permalink
Merge branch 'master' from about tag 3.31 into codedb-ffi-io
Browse files Browse the repository at this point in the history
  • Loading branch information
chuckremes committed May 19, 2016
2 parents b8dc05d + 533fbe0 commit 35eaf6c
Show file tree
Hide file tree
Showing 180 changed files with 16,392 additions and 26,706 deletions.
7 changes: 4 additions & 3 deletions .travis.yml
Expand Up @@ -11,12 +11,13 @@ before_install:
- echo $LANG
- echo $LC_ALL
- if [ $TRAVIS_OS_NAME == linux ]; then ./scripts/llvm.sh; fi
- if [ $TRAVIS_OS_NAME == osx ]; then brew update && brew install llvm35 && brew link --force llvm35; fi
- if [ $TRAVIS_OS_NAME == osx ]; then brew update && brew install llvm; fi
- gem update --system
- gem --version
before_script:
- travis_retry bundle
- ./configure
- if [ $TRAVIS_OS_NAME == linux ]; then travis_retry ./configure --llvm-config=llvm-config-3.6; fi
- if [ $TRAVIS_OS_NAME == osx ]; then travis_retry ./configure; fi
script: rake ci
after_success:
- if [ $TRAVIS_BRANCH == $TRAVIS_TAG ]; then ./scripts/deploy.sh release github website triggers; fi
Expand All @@ -33,7 +34,7 @@ notifications:
- "%{repository}/%{branch} (%{commit} - %{author}): %{build_url}: %{message}"
webhooks:
urls:
- https://webhooks.gitter.im/e/9502afd22ca6c8e85fb3
secure: h2oTAbAZF6+c6iv/kHoDGtl1mzQDF2vQSKWnO1pwfEz+L80lX9u3+JB+jsbYUcZ9smBRnRRghqxpLBmyzH3QZCrBdxKnTWfGc7I7lkTCFQZ5O3pPmIusO6W5zX+YUc+NHPPZXouHuHFmEeEB9vJnt/YB/fyGAGOIq+qXV4s+R9M=
on_success: always
on_failure: always
on_start: always
Expand Down
6 changes: 3 additions & 3 deletions Gemfile.lock
Expand Up @@ -4,7 +4,7 @@ GEM
daedalus-core (0.5.0)
rake (10.5.0)
redcard (1.1.0)
rubinius-ast (3.5)
rubinius-ast (3.6)
rubinius-bridge (2.2)
redcard (~> 1.0)
rubinius-code (3.0)
Expand All @@ -14,7 +14,7 @@ GEM
rubinius-melbourne (~> 3)
rubinius-processor (~> 3)
rubinius-toolset (~> 3)
rubinius-compiler (3.3)
rubinius-compiler (3.4)
rubinius-instructions (3.0)
rubinius-melbourne (3.5)
rubinius-processor (3.0)
Expand All @@ -31,4 +31,4 @@ DEPENDENCIES
rubinius-code (~> 3)

BUNDLED WITH
1.11.2
1.12.3
42 changes: 12 additions & 30 deletions configure
Expand Up @@ -58,7 +58,6 @@ class Configure
@gem = nil

# LLVM settings
@llvm_enabled = true
@llvm_path = nil
@llvm_system_name = get_system_name
@llvm_configure = nil
Expand Down Expand Up @@ -336,10 +335,6 @@ class Configure

o.doc "\n LLVM settings"

o.on "--disable-llvm", "Don't build with LLVM" do
@llvm_enabled = false
end

o.on "--system-name", "NAME", "Name of OS (eg fedora-8, ubuntu-10.04)" do |name|
@llvm_system_name = name
end
Expand Down Expand Up @@ -565,11 +560,6 @@ class Configure
end

def setup_llvm
unless @llvm_enabled
@log.write "WARNING: LLVM disabled."
return false
end

@log.print " Checking for 'llvm-config': "

config = @llvm_configure
Expand All @@ -583,8 +573,8 @@ class Configure
if macports?
config = macports_llvm_config
else
out = Bundler.with_clean_env { `brew --prefix llvm35` }.chomp
config = "#{out}/bin/llvm-config-3.5" if $?.success?
out = Bundler.with_clean_env { `brew --prefix llvm` }.chomp
config = "#{out}/bin/llvm-config" if $?.success?
end
end
end
Expand All @@ -604,8 +594,8 @@ class Configure
unless failed
parts = version.sub(/svn$/, "").split(".").map { |i| i.to_i }
api_version = ("%d%02d" % parts[0..1]).to_i
if api_version < 300 or api_version > 305
@log.write "only LLVM 3.0-3.5 is supported"
if api_version < 306
@log.write "only LLVM 3.6+ is supported"
else
@log.write "found! (version #{version} - api: #{api_version})"
@llvm = :config
Expand Down Expand Up @@ -666,19 +656,16 @@ int main() { LLVMContext &Context = getGlobalContext(); }
def check_llvm_flags
flags = '--ldflags'

if @llvm_api_version >= 305
# Starting with LLVM 3.5 the --system-libs option is required in order to
# link against libraries such as zlib. Prior to 3.5 this was handled by
# --ldflags.
flags << ' --system-libs'
end
@llvm_cxxflags << " -std=c++11"

# Starting with LLVM 3.5 the --system-libs option is required in order to
# link against libraries such as zlib. Prior to 3.5 this was handled by
# --ldflags.
flags << ' --system-libs'

# Generate the actual flags. For whatever reason llvm-config also includes
# newlines in the output, so lets get rid of those while we're at it.
@llvm_ldflags = `#{@llvm_configure} #{flags}`.strip.gsub("\n", ' ')

# We use some C++11 features in the VM source, so we need to enable support.
@llvm_cxxflags << " -std=c++11"
end

def env(which)
Expand Down Expand Up @@ -717,7 +704,7 @@ 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++"
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++,
Expand Down Expand Up @@ -1532,10 +1519,6 @@ int main() { return tgetnum(""); }
def write_configure_files
@log.write "\nWriting configuration files..."

unless @llvm_enabled
@llvm_configure = ""
end

@bin_links.delete @program_name

config_settings = {
Expand All @@ -1544,7 +1527,6 @@ int main() { return tgetnum(""); }
:build_make => @make,
:build_rake => @rake,
:build_perl => @perl,
:llvm_enabled => @llvm_enabled,
:llvm_path => @llvm_path,
:llvm_system_name => @llvm_system_name,
:llvm_configure => @llvm_configure,
Expand Down Expand Up @@ -2073,7 +2055,7 @@ Available commands are:
# Query MacPorts for the path to the latest installed version of
# llvm-config that is within the range of supported LLVM versions.
def macports_llvm_config
supported_versions = (3.0 .. 3.5)
supported_versions = (3.6..3.9)
installed_ports = `port installed | egrep -o 'llvm-[^ ]+'`.split
latest_usable_port = installed_ports.sort.select do |fname|
version = fname.match(/-\K.*/)[0].to_f
Expand Down
7 changes: 6 additions & 1 deletion core/compiled_code.rb
Expand Up @@ -44,7 +44,12 @@ def self.of_sender

def jitted?
Rubinius.primitive :compiledcode_jitted_p
raise PrimitiveFailure, "CompiledCode.jitted? primitive failed"
raise PrimitiveFailure, "CompiledCode#jitted? primitive failed"
end

def sample_count
Rubinius.primitive :compiledcode_sample_count
raise PrimitiveFailure, "CompiledCode#sample_count primitive failed"
end

# Returns the CompiledCode object for the currently executing Ruby
Expand Down
2 changes: 2 additions & 0 deletions core/jit.rb
Expand Up @@ -5,6 +5,8 @@ class << self
attr_accessor :enabled
attr_accessor :properties

@enabled = false

alias_method :available?, :available
alias_method :enabled?, :enabled

Expand Down
7 changes: 6 additions & 1 deletion core/proc.rb
Expand Up @@ -96,7 +96,12 @@ def arity
return arity < 0 ? -1 : arity
end

@block.arity
arity = @block.arity
return arity if self.lambda? ||
@block.compiled_code.splat ||
@block.compiled_code.total_args == arity

-arity - 1
end

alias_method :===, :call
Expand Down
37 changes: 1 addition & 36 deletions core/rubinius.rb
Expand Up @@ -232,42 +232,6 @@ def self.dtrace_fire(payload)
raise PrimitiveFailure, "Rubinius.dtrace_fire primitive failed"
end

module Tooling
def self.raw_load(str)
Rubinius.primitive :vm_load_tool
raise PrimitiveFailure, "Tooling.raw_load primitive failed"
end

def self.load(str)
error, reason = raw_load(str)
unless error == true
raise ArgumentError, reason
end

return true
end

def self.available?
Rubinius.primitive :vm_tooling_available_p
raise PrimitiveFailure, "Tooling.available? primitive failed"
end

def self.active?
Rubinius.primitive :vm_tooling_active_p
raise PrimitiveFailure, "Tooling.active? primitive failed"
end

def self.enable
Rubinius.primitive :vm_tooling_enable
raise PrimitiveFailure, "Tooling.enable primitive failed"
end

def self.disable
Rubinius.primitive :vm_tooling_disable
raise PrimitiveFailure, "Tooling.disable primitive failed"
end
end

def self.received_signal(sig)
Signal.run_handler(sig)
end
Expand All @@ -283,6 +247,7 @@ def self.version
end
end

extra << "P" if Rubinius::PROFILER != "none"
extra << "C" if Rubinius::CONCURRENT_GC
extra << "D" if Rubinius::DEBUG_BUILD

Expand Down
7 changes: 2 additions & 5 deletions core/vm.rb
Expand Up @@ -5,11 +5,8 @@ class Rubinius::VM
# Rubinius::VariableScope object that can be used to access the frames
# running information like locals, self, etc.
#
def self.backtrace(frames_to_skip)
Rubinius.primitive :vm_backtrace

# Add the + 1 to skip this frame
backtrace Integer(frames_to_skip) + 1
def self.backtrace(frames_to_skip, *args)
Rubinius.invoke_primitive :vm_backtrace, Integer(frames_to_skip) + 1
end

def self.stats
Expand Down
14 changes: 7 additions & 7 deletions gems_list.txt
@@ -1,4 +1,4 @@
bundler-1.11.2.gem
bundler-1.12.3.gem
daedalus-core-0.5.0.gem
ffi2-generators-0.1.1.gem
json-1.8.3.gem
Expand All @@ -9,17 +9,17 @@ rake-10.5.0.gem
rb-readline-0.5.3.gem
rdoc-4.2.2.gem
redcard-1.1.0.gem
rubinius-ast-3.5.gem
rubinius-ast-3.6.gem
rubinius-bridge-2.2.gem
rubinius-code-3.0.gem
rubinius-compiler-3.3.gem
rubinius-coverage-2.0.3.gem
rubinius-compiler-3.4.gem
rubinius-coverage-2.1.gem
rubinius-debugger-2.4.gem
rubinius-developer_tools-2.0.0.gem
rubinius-instructions-3.0.gem
rubinius-melbourne-3.5.gem
rubinius-processor-3.0.gem
rubinius-profiler-2.0.2.gem
rubinius-profiler-2.1.gem
rubinius-toolset-3.0.gem
rubysl-2.2.0.gem
rubysl-abbrev-2.0.4.gem
Expand All @@ -31,7 +31,7 @@ rubysl-cgi-session-2.1.0.gem
rubysl-cmath-2.0.0.gem
rubysl-complex-2.0.0.gem
rubysl-continuation-2.0.0.gem
rubysl-coverage-2.0.3.gem
rubysl-coverage-2.1.gem
rubysl-csv-2.0.2.gem
rubysl-curses-2.0.1.gem
rubysl-date-2.0.9.gem
Expand Down Expand Up @@ -80,7 +80,7 @@ rubysl-pathname-2.3.gem
rubysl-prettyprint-2.0.3.gem
rubysl-prime-2.0.1.gem
rubysl-profile-2.0.0.gem
rubysl-profiler-2.0.1.gem
rubysl-profiler-2.1.gem
rubysl-pstore-2.0.0.gem
rubysl-pty-2.0.3.gem
rubysl-rational-2.0.1.gem
Expand Down

0 comments on commit 35eaf6c

Please sign in to comment.