別のキーワード
クラス
- RubyVM (34)
-
RubyVM
:: AbstractSyntaxTree :: Node (42) -
RubyVM
:: InstructionSequence (225) - TracePoint (6)
モジュール
- ObjectSpace (11)
-
RubyVM
:: AbstractSyntaxTree (24) -
RubyVM
:: MJIT (18)
キーワード
- AbstractSyntaxTree (6)
-
DEFAULT
_ PARAMS (11) -
INSTRUCTION
_ NAMES (11) - InstructionSequence (11)
- MJIT (6)
-
NEWS for Ruby 2
. 0 . 0 (11) -
NEWS for Ruby 2
. 3 . 0 (9) -
NEWS for Ruby 2
. 4 . 0 (8) -
NEWS for Ruby 2
. 5 . 0 (7) -
NEWS for Ruby 2
. 6 . 0 (6) -
NEWS for Ruby 2
. 7 . 0 (5) - Node (6)
- OPTS (11)
-
absolute
_ path (11) -
base
_ label (11) - children (6)
- compile (11)
-
compile
_ file (11) -
compile
_ option (11) -
compile
_ option= (11) -
count
_ tdata _ objects (11) - disasm (22)
- disassemble (22)
- enabled? (6)
- eval (11)
-
first
_ column (6) -
first
_ lineno (17) - inspect (17)
-
instruction
_ sequence (6) - label (11)
-
last
_ column (6) -
last
_ lineno (6) -
load
_ from _ binary (9) -
load
_ from _ binary _ extra _ data (9) - new (11)
- of (19)
- parse (8)
-
parse
_ file (8) - path (11)
- pause (6)
-
resolve
_ feature _ path (1) - resume (6)
-
to
_ a (11) -
to
_ binary (9) - type (6)
検索結果
先頭5件
-
RubyVM
:: MJIT . resume -> bool (3028.0) -
RubyVM::MJIT.pause で一時停止した JIT を再開します。
...
RubyVM::MJIT.pause で一時停止した JIT を再開します。
@return 再開したときは true を、すでに動いているときは false を返します。
@raise RuntimeError JIT が有効ではないときに発生します。
@raise RuntimeError JIT の再開に失敗した時に発......生します。
@see RubyVM::MJIT.enabled?, RubyVM::MJIT.pause... -
RubyVM
:: InstructionSequence # inspect -> String (3024.0) -
self の情報をラベルとパスを含んだ人間に読みやすい文字列にして返します。
...んだ人間に読みやすい文字列にして返します。
//emlist[例][ruby]{
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
iseq.inspect # => "<RubyVM::InstructionSequence:<compiled>@<compiled>>"
//}
@see RubyVM::InstructionSequence#label,
RubyVM::InstructionSequence#path... -
RubyVM
:: AbstractSyntaxTree :: Node # children -> Array (3018.0) -
self の子ノードを配列で返します。
...type によって異なります。
戻り値は、ほかの RubyVM::AbstractSyntaxTree::Node のインスタンスや nil を含みます。
//emlist[][ruby]{
node = RubyVM::AbstractSyntaxTree.parse('1 + 2')
p node.children
# => [[], nil, #<RubyVM::AbstractSyntaxTree::Node:OPCALL@1:0-1:5>]
//}... -
RubyVM
:: InstructionSequence # disasm -> String (3018.0) -
self が表す命令シーケンスを人間が読める形式の文字列に変換して返します。
...f が表す命令シーケンスを人間が読める形式の文字列に変換して返します。
puts RubyVM::InstructionSequence.compile('1 + 2').disasm
出力:
== disasm: <RubyVM::InstructionSequence:<compiled>@<compiled>>==========
0000 trace 1......( 1)
0002 putobject 1
0004 putobject 2
0006 opt_plus <ic:1>
0008 leave
@see RubyVM::InstructionSequence.disasm... -
RubyVM
:: InstructionSequence # disassemble -> String (3018.0) -
self が表す命令シーケンスを人間が読める形式の文字列に変換して返します。
...f が表す命令シーケンスを人間が読める形式の文字列に変換して返します。
puts RubyVM::InstructionSequence.compile('1 + 2').disasm
出力:
== disasm: <RubyVM::InstructionSequence:<compiled>@<compiled>>==========
0000 trace 1......( 1)
0002 putobject 1
0004 putobject 2
0006 opt_plus <ic:1>
0008 leave
@see RubyVM::InstructionSequence.disasm... -
RubyVM
:: InstructionSequence . compile _ option=(options) (3018.0) -
命令シーケンスのコンパイル時のデフォルトの最適化オプションを引数 options で指定します。
...compile、.compile_file メソッドの実行の際に option 引数を指定し
た場合はその実行のみ最適化オプションを変更する事もできます。
@see RubyVM::InstructionSequence.new,
RubyVM::InstructionSequence.compile,
RubyVM::InstructionSequence.compile_file... -
RubyVM
:: InstructionSequence . load _ from _ binary _ extra _ data(binary) -> String (3018.0) -
バイナリフォーマットの文字列から埋め込まれたextra_dataを取り出します。
...埋め込まれたextra_dataを取り出します。
//emlist[例][ruby]{
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
binary = iseq.to_binary("extra_data")
RubyVM::InstructionSequence.load_from_binary_extra_data(binary) # => extra_data
//}
@see RubyVM::InstructionSequence#to_binary... -
RubyVM
:: AbstractSyntaxTree :: Node (3016.0) -
RubyVM::AbstractSyntaxTree.parse によって作られる抽象構文木を表すクラスです。
...RubyVM::AbstractSyntaxTree.parse によって作られる抽象構文木を表すクラスです。
このクラスは MRI の実装の詳細を表します。... -
RubyVM
:: AbstractSyntaxTree (3012.0) -
Ruby のコードをパースして得られる抽象構文木を扱うモジュールです。
...Ruby のコードをパースして得られる抽象構文木を扱うモジュールです。
抽象構文木はRubyVM::AbstractSyntaxTree::Nodeクラスのインスタンスとして表されます。
このモジュールはMRIの抽象構文木の実装の詳細を表します。
このモ......し安定したAPIやMRI以外の実装で抽象構文木を扱いたい場合、
parser gem (https://github.com/whitequark/parser)や
Ripperの使用を検討してください。
もし RubyVM::AbstractSyntaxTree のAPIを安定にしたい場合、14844 での議論に参加してください。... -
RubyVM
:: AbstractSyntaxTree :: Node # inspect -> String (3012.0) -
self のデバッグ用の情報を含んだ文字列を返します。
...self のデバッグ用の情報を含んだ文字列を返します。
//emlist[][ruby]{
node = RubyVM::AbstractSyntaxTree.parse('1 + 1')
puts node.inspect
# => #<RubyVM::AbstractSyntaxTree::Node:SCOPE@1:0-1:5>
//}... -
RubyVM
:: InstructionSequence # first _ lineno -> Integer (3012.0) -
self が表す命令シーケンスの 1 行目の行番号を返します。
...の 1 行目の行番号を返します。
例1:irb で実行した場合
RubyVM::InstructionSequence.compile('num = 1 + 2').first_lineno
# => 1
例2:
# /tmp/method.rb
require "foo-library"
def foo
p :foo
end
RubyVM::InstructionSequence.of(method(:foo)).first_lineno
# => 2... -
RubyVM
:: InstructionSequence . compile _ option -> Hash (3012.0) -
命令シーケンスのコンパイル時のデフォルトの最適化オプションを Hash で返 します。
...シーケンスのコンパイル時のデフォルトの最適化オプションを Hash で返
します。
//emlist[例][ruby]{
require "pp"
pp RubyVM::InstructionSequence.compile_option
# => {:inline_const_cache=>true,
# :peephole_optimization=>true,
# :tailcall_optimization=>false,
# :special......>true,
# :operands_unification=>true,
# :instructions_unification=>false,
# :stack_caching=>false,
# :trace_instruction=>true,
# :frozen_string_literal=>false,
# :debug_frozen_string_literal=>false,
# :coverage_enabled=>true,
# :debug_level=>0}
//}
@see RubyVM::InstructionSequence.compile_option=...