Class: Myco::CodeLoader::BytecodeLoader

Inherits:
AbstractLoader show all
Defined in:
lib/myco/code_loader.rb

Instance Attribute Summary

Attributes inherited from AbstractLoader

#ast, #block_environment, #compiled_code, #constant_scope, #filename, #generator, #line, #receiver, #string, #variable_scope

Instance Method Summary collapse

Methods inherited from AbstractLoader

#bind_to, #compile, #initialize, #is_rb?, #load, #make_ast, #make_block_environment, #make_generator, #make_string

Constructor Details

This class inherits a constructor from Myco::CodeLoader::AbstractLoader

Instance Method Details

#emit_rb!Object



300
# File 'lib/myco/code_loader.rb', line 300

def emit_rb!;  nil end

#emit_rbc!Object



301
# File 'lib/myco/code_loader.rb', line 301

def emit_rbc!; nil end

#is_rbc?Boolean

Returns:

  • (Boolean)


298
# File 'lib/myco/code_loader.rb', line 298

def is_rbc?; true end

#make_compiled_codeObject



303
304
305
306
307
308
309
310
311
312
# File 'lib/myco/code_loader.rb', line 303

def make_compiled_code
  begin
    @compiled_code = primitive_load_file \
      @filename, Rubinius::Signature, Rubinius::RUBY_LIB_VERSION
  rescue Rubinius::InvalidRBC => e
    warn e.message
    File.delete @filename
    raise e
  end
end