るりまサーチ

最速Rubyリファレンスマニュアル検索!
253件ヒット [1-100件を表示] (0.117秒)
トップページ > クエリ:i[x] > クエリ:instructions[x]

別のキーワード

  1. _builtin to_i
  2. fiddle to_i
  3. matrix elements_to_i
  4. ipaddr to_i
  5. csv to_i

検索結果

<< 1 2 3 > >>

REXML::Element#instructions -> [REXML::Instraction] (24301.0)

すべての instruction 子ノードの配列を返します。

...すべての instruction 子ノードの配列を返します。

返される配列は freeze されます。...

RubyVM::InstructionSequence.compile_file(file, options = nil) -> RubyVM::InstructionSequence (12500.0)

引数 file で指定した Ruby のソースコードを元にコンパイル済みの RubyVM::InstructionSequence オブジェクトを作成して返します。

...file で指定した Ruby のソースコードを元にコンパイル済みの
RubyVM::InstructionSequence オブジェクトを作成して返します。

RubyVM::InstructionSequence.compile とは異なり、file、path などの
メタデータは自動的に取得します。

@param file...
...tions コンパイル時のオプションを true、false、Hash オブ
ジェクトのいずれかで指定します。詳細は
RubyVM::InstructionSequence.compile_option= を参照
してください。

# /tmp/hello.rb
puts "Hello, world!"

# i...
...rb
RubyVM::InstructionSequence.compile_file("/tmp/hello.rb")
# => <RubyVM::InstructionSequence:<main>@/tmp/hello.rb>

@see RubyVM::InstructionSequence.compile...

RubyVM::InstructionSequence.load_from_binary(binary) -> RubyVM::InstructionSequence (12400.0)

RubyVM::InstructionSequence#to_binaryにより作られたバイナリフォーマットの文字列からiseqのオブジェクトをロードします。

...RubyVM::InstructionSequence#to_binaryにより作られたバイナリフォーマットの文字列からiseqのオブジェクトをロードします。

このローダーは検証機構をもっておらず、壊れたり改変されたバイナリを読み込むと深刻な問題を引き起...
...りません。自分が変換したバイナリデータを使うべきです。

//emlist[例][ruby]{
i
seq = RubyVM::InstructionSequence.compile('num = 1 + 2')
binary = iseq.to_binary
RubyVM::InstructionSequence.load_from_binary(binary).eval # => 3
//}

@see RubyVM::InstructionSequence#to_binary...

RubyVM::InstructionSequence.load_from_binary_extra_data(binary) -> String (12300.0)

バイナリフォーマットの文字列から埋め込まれたextra_dataを取り出します。

...埋め込まれたextra_dataを取り出します。

//emlist[例][ruby]{
i
seq = 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::InstructionSequence#inspect -> String (12200.0)

self の情報をラベルとパスを含んだ人間に読みやすい文字列にして返します。

...んだ人間に読みやすい文字列にして返します。

//emlist[例][ruby]{
i
seq = RubyVM::InstructionSequence.compile('num = 1 + 2')
i
seq.inspect # => "<RubyVM::InstructionSequence:<compiled>@<compiled>>"
//}

@see RubyVM::InstructionSequence#label,
RubyVM::InstructionSequence#path...

絞り込み条件を変える

RubyVM::InstructionSequence#to_binary(extra_data = nil) -> String (12200.0)

バイナリフォーマットでシリアライズされたiseqのデータを文字列として返します。 RubyVM::InstructionSequence.load_from_binary メソッドでバイナリデータに対応するiseqオブジェクトを作れます。

...れたiseqのデータを文字列として返します。
RubyVM::InstructionSequence.load_from_binary メソッドでバイナリデータに対応するiseqオブジェクトを作れます。

引数の extra_data はバイナリデータと共に保存されます。
RubyVM::InstructionSequence...
....load_from_binary_extra_data メソッドでこの文字列にアクセス出来ます。

注意: 変換後のバイナリデータはポータブルではありません。 to_binary で得たバイナリデータは他のマシンに移動できません。他のバージョンや他のアーキ...
...テクチャのRubyで作られたバイナリデータは使用できません。

//emlist[例][ruby]{
i
seq = RubyVM::InstructionSequence.compile('num = 1 + 2')
i
seq.to_binary("extra_data")

# ※表示の都合上改行しているが実際は改行はない
# => "YARB\x02\x00\x00\x00\x03\x00\x00...

RubyVM::InstructionSequence#first_lineno -> Integer (12100.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 (12000.0)

Ruby の Virtual Machine のコンパイル済みの命令シーケンスを表すクラスです。

...Ruby の Virtual Machine のコンパイル済みの命令シーケンスを表すクラスです。

Method、Proc オブジェクトや Ruby のソースコードを表す文字列
から VM の命令シーケンスを得る事ができます。また、
RubyVM::InstructionSequence オブジェク...
...コンパイラの設定を
扱う必要がありますが、Ruby の VM がどのように働くかを知るのに有用です。

VM の命令シーケンスの一覧はRuby のソースコード中の insns.def から参照で
きます。

* https://github.com/ruby/ruby/blob/master/insns.def...

RubyVM::InstructionSequence.compile(source, file = nil, path = nil, line = 1, options = nil) -> RubyVM::InstructionSequence (9600.0)

引数 source で指定した Ruby のソースコードを元にコンパイル済みの RubyVM::InstructionSequence オブジェクトを作成して返します。

...にコンパイル済みの
RubyVM::InstructionSequence オブジェクトを作成して返します。

@param source Ruby のソースコードを文字列で指定します。

@param file ファイル名を文字列で指定します。

@param path 引数 file の絶対パスファイル名を...
...

@param line 引数 source の 1 行目の行番号を指定します。

@param options コンパイル時のオプションを true、false、Hash オブ
ジェクトのいずれかで指定します。詳細は
RubyVM::InstructionSequence.compile_option= を参...
...
してください。

RubyVM::InstructionSequence.compile("a = 1 + 2")
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>

@see RubyVM::InstructionSequence.compile_file...

TracePoint#instruction_sequence -> RubyVM::InstructionSequence (9300.0)

script_compiledイベント発生時にコンパイルされた RubyVM::InstructionSequenceインスタンスを返します。

...script_compiledイベント発生時にコンパイルされた
RubyVM::InstructionSequenceインスタンスを返します。

//emlist[例][ruby]{
TracePoint.new(:script_compiled) do |tp|
p tp.instruction_sequence # => <RubyVM::InstructionSequence:block in <main>@(eval):1>
end.enable do
eval...
...("puts 'hello'")
end
//}

@raise RuntimeError :script_compiled イベントのための
イベントフックの外側で実行した場合に発生します。...

絞り込み条件を変える

RubyVM::InstructionSequence.compile_option -> Hash (9106.0)

命令シーケンスのコンパイル時のデフォルトの最適化オプションを Hash で返 します。

...//emlist[例][ruby]{
require "pp"
pp RubyVM::InstructionSequence.compile_option

# => {:inline_const_cache=>true,
# :peephole_optimization=>true,
# :tailcall_optimization=>false,
# :specialized_instruction=>true,
# :operands_unification=>true,
# :instructions_unification=>false,
# :stack_caching=>f...
...alse,
# :trace_instruction=>true,
# :frozen_string_literal=>false,
# :debug_frozen_string_literal=>false,
# :coverage_enabled=>true,
# :debug_level=>0}
//}

@see RubyVM::InstructionSequence.compile_option=...
<< 1 2 3 > >>