Feature #971

Reinstate RubyVM::InstructionSequence::load

Added by lobster_johnson (Alexander Staubo) over 3 years ago. Updated about 1 year ago.

[ruby-core:21087]
Status:Rejected Start date:01/03/2009
Priority:Normal Due date:
Assignee:ko1 (Koichi Sasada) % Done:

0%

Category:core
Target version:1.9.2

Description

Currently the definition of the load method in iseq.c is commented out "because there is no verifier". The fact that InstructionSequence::compile.to_a has no assembling counterpart that can turn the serialized output back into an iseq object greatly restricts the usefulness InstructionSequence. For example, there is no way to disassemble a method, send it over the network and then assemble it again. The method should be re-enabled even though there is no verifier yet.

iseq.patch - Patch for iseq.c (798 Bytes) lobster_johnson (Alexander Staubo), 01/18/2009 10:32 pm

History

Updated by yugui (Yuki Sonoda) over 3 years ago

  • Priority changed from High to Normal
  • Target version changed from 1.9.1 RC2 to 2.0.0

Updated by lobster_johnson (Alexander Staubo) over 3 years ago

Here's the patch that would make me happy.

Updated by ko1 (Koichi Sasada) over 3 years ago

Alexander Staubo wrote::
> Currently the definition of the load method in iseq.c is commented out "because there is no verifier". The fact that InstructionSequence::compile.to_a has no assembling counterpart that can turn the serialized output back into an iseq object greatly restricts the usefulness InstructionSequence. For example, there is no way to disassemble a method, send it over the network and then assemble it again. The method should be re-enabled even though there is no verifier yet.

You can write an extension in C with "ruby_iseq_load()".

Note that I can't guarantee the compatibility of bytecode set and
format.  In fact, some instructions may changed in 1.9.2 because of lack
of functionality.

-- 
// SASADA Koichi at atdot dot net

Updated by ko1 (Koichi Sasada) over 3 years ago

SASADA Koichi wrote::
> You can write an extension in C with "ruby_iseq_load()".

...

Why "ruby_" instead of "rb_"?  This function is for C Extension or ruby
core.  Not for outside Ruby.

I think this API should be "rb_iseq_load()".

Nobu, do you know the reason?

-- 
// SASADA Koichi at atdot dot net

Updated by ko1 (Koichi Sasada) over 3 years ago

  • Assignee set to ko1 (Koichi Sasada)
  • Target version changed from 2.0.0 to 1.9.2

Updated by ko1 (Koichi Sasada) about 2 years ago

  • Status changed from Open to Rejected

Also available in: Atom PDF