Module: Truffle

Defined in:
truffle/src/main/ruby/core/truffle/debug.rb,
truffle/src/main/ruby/core/truffle/interop.rb,
truffle/src/main/ruby/core/truffle/runtime.rb,
truffle/src/main/ruby/core/truffle/truffle.rb,
truffle/src/main/ruby/core/truffle/cext/cext.rb,
truffle/src/main/ruby/core/truffle/cext/mkmf.rb,
truffle/src/main/ruby/core/truffle/attachments.rb
more...

Overview

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. This code is released under a tri EPL/GPL/LGPL license. You can use it, redistribute it and/or modify it under the terms of the:

Eclipse Public License version 1.0 GNU General Public License version 2 GNU Lesser General Public License version 2.1

Defined Under Namespace

Modules: Attachments, CExt, Debug, Interop, Runtime

Class Method Summary (collapse)

Class Method Details

+ (Binding) binding_of_caller

Return the Binding of the method which calls this method.

Returns:

  • (Binding)
[View source]

32
# File 'truffle/src/main/ruby/core/truffle/truffle.rb', line 32

define_method :binding_of_caller, Primitive.instance_method(:binding_of_caller)

+ (Boolean) graal?

Tests if the program is using the Graal VM.

Returns:

  • (Boolean)
[View source]

21
22
23
# File 'truffle/src/main/ruby/core/truffle/truffle.rb', line 21

def graal?
  Primitive.graal?
end

+ (String) source_of_caller

Returns the source (such as the file name) of the method which calls this method.

Returns:

  • (String)
[View source]

37
# File 'truffle/src/main/ruby/core/truffle/truffle.rb', line 37

define_method :source_of_caller, Primitive.instance_method(:source_of_caller)

+ (Boolean) substrate?

Tests if this VM is a SubstrateVM build.

Returns:

  • (Boolean)
[View source]

26
27
28
# File 'truffle/src/main/ruby/core/truffle/truffle.rb', line 26

def substrate?
  Primitive.substrate?
end

+ (String) version

The version of Truffle and Graal in use.

Returns:

  • (String)

    a version string such as "0.7", or "undefined" if running on a non-Graal JVM.

[View source]

16
17
18
# File 'truffle/src/main/ruby/core/truffle/truffle.rb', line 16

def version
  Primitive.graal_version
end