[前][次][番号順一覧][スレッド一覧]

ruby-changes:49476

From: mame <ko1@a...>
Date: Thu, 4 Jan 2018 13:44:22 +0900 (JST)
Subject: [ruby-changes:49476] mame:r61591 (trunk): iseq.c (rb_iseq_new_with_opt): handle the case where node is imemo_func

mame	2018-01-04 13:44:16 +0900 (Thu, 04 Jan 2018)

  New Revision: 61591

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61591

  Log:
    iseq.c (rb_iseq_new_with_opt): handle the case where node is imemo_func

  Modified files:
    trunk/iseq.c
Index: iseq.c
===================================================================
--- iseq.c	(revision 61590)
+++ iseq.c	(revision 61591)
@@ -519,9 +519,11 @@ rb_iseq_new_with_opt(const NODE *node, V https://github.com/ruby/ruby/blob/trunk/iseq.c#L519
 {
     /* TODO: argument check */
     rb_iseq_t *iseq = iseq_alloc();
+    const rb_code_range_t *code_range = NULL;
 
     if (!option) option = &COMPILE_OPTION_DEFAULT;
-    prepare_iseq_build(iseq, name, path, realpath, first_lineno, node ? &node->nd_loc : NULL, parent, type, option);
+    if (node && !imemo_type_p((VALUE)node, imemo_ifunc)) code_range = &node->nd_loc;
+    prepare_iseq_build(iseq, name, path, realpath, first_lineno, code_range, parent, type, option);
 
     rb_iseq_compile_node(iseq, node);
     finish_iseq_build(iseq);

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]