[macruby-changes] [4875] MacRuby/trunk/parse.y
source_changes at macosforge.org
source_changes at macosforge.org
Wed Nov 3 18:07:12 PDT 2010
Revision: 4875
http://trac.macosforge.org/projects/ruby/changeset/4875
Author: lsansonetti at apple.com
Date: 2010-11-03 18:07:10 -0700 (Wed, 03 Nov 2010)
Log Message:
-----------
remove useless range literal optimization
Modified Paths:
--------------
MacRuby/trunk/parse.y
Modified: MacRuby/trunk/parse.y
===================================================================
--- MacRuby/trunk/parse.y 2010-11-03 02:15:01 UTC (rev 4874)
+++ MacRuby/trunk/parse.y 2010-11-04 01:07:10 UTC (rev 4875)
@@ -1999,14 +1999,7 @@
/*%%%*/
value_expr($1);
value_expr($3);
- if (nd_type($1) == NODE_LIT && FIXNUM_P($1->nd_lit) &&
- nd_type($3) == NODE_LIT && FIXNUM_P($3->nd_lit)) {
- GC_WB(&$1->nd_lit, GC_RETAIN(rb_range_new($1->nd_lit, $3->nd_lit, Qfalse)));
- $$ = $1;
- }
- else {
- $$ = NEW_DOT2($1, $3);
- }
+ $$ = NEW_DOT2($1, $3);
/*%
$$ = dispatch2(dot2, $1, $3);
%*/
@@ -2016,14 +2009,7 @@
/*%%%*/
value_expr($1);
value_expr($3);
- if (nd_type($1) == NODE_LIT && FIXNUM_P($1->nd_lit) &&
- nd_type($3) == NODE_LIT && FIXNUM_P($3->nd_lit)) {
- GC_WB(&$1->nd_lit, GC_RETAIN(rb_range_new($1->nd_lit, $3->nd_lit, Qtrue)));
- $$ = $1;
- }
- else {
- $$ = NEW_DOT3($1, $3);
- }
+ $$ = NEW_DOT3($1, $3);
/*%
$$ = dispatch2(dot3, $1, $3);
%*/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20101103/05bbd040/attachment.html>
More information about the macruby-changes
mailing list