* compile.c (iseq_ibf_dump): dump extra data just string length.
* sample/iseq_loader.rb: add using RubyVM::InstructionSequence.from_binary_format_extra_data method (commented out). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
278d90a255
commit
ddba2014c6
@ -1,3 +1,11 @@
|
|||||||
|
Wed Dec 9 00:24:33 2015 Koichi Sasada <ko1@atdot.net>
|
||||||
|
|
||||||
|
* compile.c (iseq_ibf_dump): dump extra data just string length.
|
||||||
|
|
||||||
|
* sample/iseq_loader.rb: add using
|
||||||
|
RubyVM::InstructionSequence.from_binary_format_extra_data method
|
||||||
|
(commented out).
|
||||||
|
|
||||||
Mon Dec 9 00:21:19 2015 Yuki Nishijima <mail@yukinishijima.net>
|
Mon Dec 9 00:21:19 2015 Yuki Nishijima <mail@yukinishijima.net>
|
||||||
|
|
||||||
* gems/bundled_gems: Upgrade the did_you_mean gem to 1.0.0.rc1
|
* gems/bundled_gems: Upgrade the did_you_mean gem to 1.0.0.rc1
|
||||||
|
@ -8116,7 +8116,7 @@ iseq_ibf_dump(const rb_iseq_t *iseq, VALUE opt)
|
|||||||
if (RTEST(opt)) {
|
if (RTEST(opt)) {
|
||||||
VALUE opt_str = opt;
|
VALUE opt_str = opt;
|
||||||
const char *ptr = StringValuePtr(opt_str);
|
const char *ptr = StringValuePtr(opt_str);
|
||||||
header.extra_size = RSTRING_LENINT(opt_str) + 1;
|
header.extra_size = RSTRING_LENINT(opt_str);
|
||||||
ibf_dump_write(dump, ptr, header.extra_size);
|
ibf_dump_write(dump, ptr, header.extra_size);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -70,7 +70,10 @@ class RubyVM::InstructionSequence
|
|||||||
$ISEQ_LOADER_LOADED += 1
|
$ISEQ_LOADER_LOADED += 1
|
||||||
STDERR.puts "[ISEQ_LOADER] #{Process.pid} load #{fname} from #{iseq_key}" if COMPILE_DEBUG
|
STDERR.puts "[ISEQ_LOADER] #{Process.pid} load #{fname} from #{iseq_key}" if COMPILE_DEBUG
|
||||||
binary = read_compiled_iseq(fname, iseq_key)
|
binary = read_compiled_iseq(fname, iseq_key)
|
||||||
RubyVM::InstructionSequence.from_binary_format(binary)
|
iseq = RubyVM::InstructionSequence.from_binary_format(binary)
|
||||||
|
# p [extra_data(iseq.path), RubyVM::InstructionSequence.from_binary_format_extra_data(binary)]
|
||||||
|
# raise unless extra_data(iseq.path) == RubyVM::InstructionSequence.from_binary_format_extra_data(binary)
|
||||||
|
iseq
|
||||||
elsif COMPILE_IF_NOT_COMPILED
|
elsif COMPILE_IF_NOT_COMPILED
|
||||||
compile_and_save_iseq(fname, iseq_key)
|
compile_and_save_iseq(fname, iseq_key)
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user