From 9581954a964c6b20bafd133a19da3e27aa135dce Mon Sep 17 00:00:00 2001 From: normal Date: Wed, 3 Dec 2014 22:16:58 +0000 Subject: mostly fix rb_iseq_load This allows reporters commenters of [Feature #8543] to load instruction sequences directly. Some test cases are still failing but documented in test/-ext-/iseq_load/test_iseq_load.rb. * compile.c (rb_iseq_build_from_exception): entry->sp is unsigned (iseq_build_callinfo_from_hash): account for kw_arg (iseq_build_from_ary_body): update for r35459 (CHECK_STRING, CHECK_INTEGER): remove unused checks (int_param): new function for checking new `params' hash (iseq_build_kw): new function for loading rb_iseq_param_keyword (rb_iseq_build_from_ary): account for `misc' entry and general structure changes [Feature #8543] * iseq.c (CHECK_HASH): new macro (for `misc' and `param' entries) (iseq_load): account for `misc' and `params' hashes (iseq_data_to_ary): add final opt to arg_opt_labels, fix kw support, account for unsigned entry->sp * ext/-test-/iseq_load/iseq_load.c: new ext for test * ext/-test-/iseq_load/extconf.rb: ditto * test/-ext-/iseq_load/test_iseq_load.rb: new test git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- iseq.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'iseq.h') diff --git a/iseq.h b/iseq.h index bf3a714e9d..2dec51585d 100644 --- a/iseq.h +++ b/iseq.h @@ -18,7 +18,8 @@ RUBY_SYMBOL_EXPORT_BEGIN VALUE rb_iseq_compile_node(VALUE self, NODE *node); int rb_iseq_translate_threaded_code(rb_iseq_t *iseq); VALUE *rb_iseq_original_iseq(rb_iseq_t *iseq); -VALUE rb_iseq_build_from_ary(rb_iseq_t *iseq, VALUE locals, VALUE args, +VALUE rb_iseq_build_from_ary(rb_iseq_t *iseq, VALUE misc, + VALUE locals, VALUE args, VALUE exception, VALUE body); /* iseq.c */ -- cgit v1.2.3