[macruby-changes] [2876] MacRuby/trunk/parse.y

source_changes at macosforge.org source_changes at macosforge.org
Wed Oct 21 13:47:02 PDT 2009


Revision: 2876
          http://trac.macosforge.org/projects/ruby/changeset/2876
Author:   lsansonetti at apple.com
Date:     2009-10-21 13:47:01 -0700 (Wed, 21 Oct 2009)
Log Message:
-----------
simplify some branches

Modified Paths:
--------------
    MacRuby/trunk/parse.y

Modified: MacRuby/trunk/parse.y
===================================================================
--- MacRuby/trunk/parse.y	2009-10-21 20:46:32 UTC (rev 2875)
+++ MacRuby/trunk/parse.y	2009-10-21 20:47:01 UTC (rev 2876)
@@ -5140,29 +5140,22 @@
 NODE*
 rb_compile_string(const char *f, VALUE s, int line)
 {
-    VALUE volatile vparser = rb_parser_new();
-
-    return rb_parser_compile_string(vparser, f, s, line);
+    return rb_parser_compile_string(rb_parser_new(), f, s, line);
 }
 
 NODE*
-rb_parser_compile_string(volatile VALUE vparser, const char *f, VALUE s, int line)
+rb_parser_compile_string(VALUE vparser, const char *f, VALUE s, int line)
 {
     struct parser_params *parser;
-    NODE *node;
-    volatile VALUE tmp;
-
     Data_Get_Struct(vparser, struct parser_params, parser);
+
     lex_gets = CLASS_OF(s) == rb_cByteString ? lex_get_bstr : lex_get_str;
     lex_gets_ptr = 0;
     GC_WB(&lex_input, s);
     lex_pbeg = lex_p = lex_pend = 0;
     compile_for_eval = rb_parse_in_eval();
 
-    node = yycompile(parser, f, line);
-    tmp = vparser; /* prohibit tail call optimization */
-
-    return node;
+    return yycompile(parser, f, line);
 }
 
 NODE*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20091021/5686245e/attachment-0001.html>


More information about the macruby-changes mailing list