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

ruby-changes:50276

From: nobu <ko1@a...>
Date: Tue, 13 Feb 2018 18:34:47 +0900 (JST)
Subject: [ruby-changes:50276] nobu:r62394 (trunk): vm_insnhelper.c: rb_autoloading_value flag

nobu	2018-02-13 18:34:43 +0900 (Tue, 13 Feb 2018)

  New Revision: 62394

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

  Log:
    vm_insnhelper.c: rb_autoloading_value flag
    
    * vm_insnhelper.c (vm_get_ev_const): add flag argument of
      `rb_autoloading_value`.
    
    * constant.h (rb_autoloading_value): moved the declaration from
      vm_core.h for `rb_const_flag_t`.  [ruby-core:85516] [Bug #14469]

  Modified files:
    trunk/constant.h
    trunk/vm_core.h
    trunk/vm_insnhelper.c
Index: vm_insnhelper.c
===================================================================
--- vm_insnhelper.c	(revision 62393)
+++ vm_insnhelper.c	(revision 62394)
@@ -841,7 +841,7 @@ vm_get_ev_const(rb_execution_context_t * https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L841
 			if (am == klass) break;
 			am = klass;
 			if (is_defined) return 1;
-			if (rb_autoloading_value(klass, id, &av)) return av;
+			if (rb_autoloading_value(klass, id, &av, NULL)) return av;
 			rb_autoload_load(klass, id);
 			goto search_continue;
 		    }
Index: vm_core.h
===================================================================
--- vm_core.h	(revision 62393)
+++ vm_core.h	(revision 62394)
@@ -1592,8 +1592,6 @@ void rb_vm_register_special_exception_st https://github.com/ruby/ruby/blob/trunk/vm_core.h#L1592
 
 void rb_gc_mark_machine_stack(const rb_execution_context_t *ec);
 
-int rb_autoloading_value(VALUE mod, ID id, VALUE* value);
-
 void rb_vm_rewrite_cref(rb_cref_t *node, VALUE old_klass, VALUE new_klass, rb_cref_t **new_cref_ptr);
 
 const rb_callable_method_entry_t *rb_vm_frame_method_entry(const rb_control_frame_t *cfp);
Index: constant.h
===================================================================
--- constant.h	(revision 62393)
+++ constant.h	(revision 62394)
@@ -46,5 +46,6 @@ int rb_public_const_defined(VALUE klass, https://github.com/ruby/ruby/blob/trunk/constant.h#L46
 int rb_public_const_defined_at(VALUE klass, ID id);
 int rb_public_const_defined_from(VALUE klass, ID id);
 rb_const_entry_t *rb_const_lookup(VALUE klass, ID id);
+int rb_autoloading_value(VALUE mod, ID id, VALUE *value, rb_const_flag_t *flag);
 
 #endif /* CONSTANT_H */

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

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