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

ruby-changes:36644

From: normal <ko1@a...>
Date: Sat, 6 Dec 2014 06:49:56 +0900 (JST)
Subject: [ruby-changes:36644] normal:r48725 (trunk): compile.c (rb_iseq_build_from_ary): remove misc handling

normal	2014-12-06 06:49:42 +0900 (Sat, 06 Dec 2014)

  New Revision: 48725

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

  Log:
    compile.c (rb_iseq_build_from_ary): remove misc handling
    
    iseq->local_size is calculated, too, along with stack_size and
    param.size, meaning there is no need to blindly load values in
    the misc hash passed to us.

  Modified files:
    trunk/ChangeLog
    trunk/compile.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 48724)
+++ ChangeLog	(revision 48725)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sat Dec  6 06:48:03 2014  Eric Wong  <e@8...>
+
+	* compile.c (rb_iseq_build_from_ary): remove misc handling
+
 Sat Dec  6 06:14:23 2014  Vit Ondruch  <vondruch@r...>
 
 	* configure.in (RUBY_LIB_VERSION): Fix --with-ruby-version
Index: compile.c
===================================================================
--- compile.c	(revision 48724)
+++ compile.c	(revision 48725)
@@ -6072,13 +6072,10 @@ rb_iseq_build_from_ary(rb_iseq_t *iseq, https://github.com/ruby/ruby/blob/trunk/compile.c#L6072
 	}
     }
 
-#define MISC_PARAM(D,F) do { \
-    if (!int_param(D, misc, SYM(F))) { \
-	rb_raise(rb_eTypeError, "misc field missing: %s", #F); \
-    } } while (0)
-    MISC_PARAM(&iseq->local_size, local_size);
-    /* iseq->stack_size and iseq->param.size are calculated */
-#undef MISC_PARAM
+    /*
+     * we currently ignore misc params,
+     * local_size, stack_size and param.size are all calculated
+     */
 
 #define INT_PARAM(F) int_param(&iseq->param.F, params, SYM(F))
     if (INT_PARAM(lead_num)) {

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

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