### Home Classes Methods

### In Files

- ext/libv8/arch.rb

### Methods

- #arm?
- #libv8_arch
- #rubinius?
- #x64?
- #x86_64_from_arch_flag
- #x86_64_from_build_cpu
- #x86_64_from_byte_length

### Files

- Makefile

### Class/Module Index

Quicksearch

- Libv8
- Libv8::Arch
- Libv8::Builder
- Libv8::Checkout
- Libv8::Compiler
- Libv8::Location
- Libv8::Location::MkmfContext
- Libv8::Location::System
- Libv8::Location::System::NotFoundError
- Libv8::Location::Vendor
- Libv8::Location::Vendor::ArchiveNotFound
- Libv8::Make
- Libv8::Paths

No matching classes.

# Libv8::Arch

### Public Instance Methods

arm?() click to toggle source

    # File ext/libv8/arch.rb, line 32
    def arm?
      RbConfig::MAKEFILE_CONFIG['build_cpu'] =~ /^arm/
    end

libv8_arch() click to toggle source

    # File ext/libv8/arch.rb, line 36
    def libv8_arch
      if arm? then "arm"
      elsif x64? then "x64"
      else "ia32"
      end
    end

rubinius?() click to toggle source

    # File ext/libv8/arch.rb, line 19
    def rubinius?
      Object.const_defined?(:RUBY_ENGINE) && RUBY_ENGINE == "rbx"
    end

x64?() click to toggle source

TODO fix false positive on 64-bit ARM

    # File ext/libv8/arch.rb, line 24
    def x64?
      if rubinius?
        x86_64_from_build_cpu || x86_64_from_arch_flag
      else
        x86_64_from_byte_length
      end
    end

x86_64_from_arch_flag() click to toggle source

    # File ext/libv8/arch.rb, line 15
    def x86_64_from_arch_flag
      RbConfig::MAKEFILE_CONFIG['ARCH_FLAG'] =~ /x86_64/
    end

x86_64_from_build_cpu() click to toggle source

    # File ext/libv8/arch.rb, line 7
    def x86_64_from_build_cpu
      RbConfig::MAKEFILE_CONFIG['build_cpu'] == 'x86_64'
    end

x86_64_from_byte_length() click to toggle source

    # File ext/libv8/arch.rb, line 11
    def x86_64_from_byte_length
      ['foo'].pack('p').size == 8
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.