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

ruby-changes:45568

From: ko1 <ko1@a...>
Date: Thu, 16 Feb 2017 18:15:30 +0900 (JST)
Subject: [ruby-changes:45568] ko1:r57641 (trunk): use rb_iseq_check() for USE_LAZY_LOAD, too.

ko1	2017-02-16 18:15:26 +0900 (Thu, 16 Feb 2017)

  New Revision: 57641

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

  Log:
    use rb_iseq_check() for USE_LAZY_LOAD, too.

  Modified files:
    trunk/vm_core.h
    trunk/vm_insnhelper.c
Index: vm_core.h
===================================================================
--- vm_core.h	(revision 57640)
+++ vm_core.h	(revision 57641)
@@ -1334,7 +1334,7 @@ static inline const rb_iseq_t * https://github.com/ruby/ruby/blob/trunk/vm_core.h#L1334
 vm_block_iseq(const struct rb_block *block)
 {
     switch (vm_block_type(block)) {
-      case block_type_iseq: return block->as.captured.code.iseq;
+      case block_type_iseq: return rb_iseq_check(block->as.captured.code.iseq);
       case block_type_proc: return vm_proc_iseq(block->as.proc);
       case block_type_ifunc:
       case block_type_symbol: return NULL;
Index: vm_insnhelper.c
===================================================================
--- vm_insnhelper.c	(revision 57640)
+++ vm_insnhelper.c	(revision 57641)
@@ -2562,7 +2562,7 @@ vm_invoke_iseq_block(rb_thread_t *th, rb https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L2562
 		     struct rb_calling_info *calling, const struct rb_call_info *ci,
 		     int is_lambda, const struct rb_captured_block *captured)
 {
-    const rb_iseq_t *iseq = captured->code.iseq;
+    const rb_iseq_t *iseq = rb_iseq_check(captured->code.iseq);
     const int arg_size = iseq->body->param.size;
     VALUE * const rsp = GET_SP() - calling->argc;
     int opt_pc = vm_callee_setup_block_arg(th, calling, ci, iseq, rsp, is_lambda ? arg_setup_lambda : arg_setup_block);

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

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