[macruby-changes] [1744] MacRuby/branches/fp-optimized-experimental/compiler.cpp
source_changes at macosforge.org
source_changes at macosforge.org
Thu Jun 4 19:00:30 PDT 2009
Revision: 1744
http://trac.macosforge.org/projects/ruby/changeset/1744
Author: pthomson at apple.com
Date: 2009-06-04 19:00:28 -0700 (Thu, 04 Jun 2009)
Log Message:
-----------
Fixed some evil bugs related to old assumptions we were making regarding optimizations.
Modified Paths:
--------------
MacRuby/branches/fp-optimized-experimental/compiler.cpp
Modified: MacRuby/branches/fp-optimized-experimental/compiler.cpp
===================================================================
--- MacRuby/branches/fp-optimized-experimental/compiler.cpp 2009-06-05 01:57:07 UTC (rev 1743)
+++ MacRuby/branches/fp-optimized-experimental/compiler.cpp 2009-06-05 02:00:28 UTC (rev 1744)
@@ -1780,7 +1780,7 @@
return pn;
}
}
- else {
+ else if (!(leftIsFixFloatConstant || rightIsFixFloatConstant)){
// Either one or both of the operands was not a fixable constant.
Value *is_redefined_val = new LoadInst(is_redefined, "", bb);
Value *isOpRedefined = new ICmpInst(ICmpInst::ICMP_EQ,
@@ -1844,7 +1844,7 @@
unboxedLeft = ConstantInt::get(RubyObjTy, leftLong);
}
else {
- unboxedLeft = BinaryOperator::CreateAShr(leftVal, oneVal, "", bb);
+ unboxedLeft = BinaryOperator::CreateAShr(leftVal, twoVal, "", bb);
}
Value *unboxedRight;
@@ -1852,7 +1852,7 @@
unboxedRight = ConstantInt::get(RubyObjTy, rightLong);
}
else {
- unboxedRight = BinaryOperator::CreateAShr(rightVal, oneVal, "", bb);
+ unboxedRight = BinaryOperator::CreateAShr(rightVal, twoVal, "", bb);
}
Value *opVal;
@@ -1904,7 +1904,7 @@
BasicBlock *then3BB;
if (result_is_fixnum) {
- Value *shift = BinaryOperator::CreateShl(opVal, oneVal, "", bb);
+ Value *shift = BinaryOperator::CreateShl(opVal, twoVal, "", bb);
thenVal = BinaryOperator::CreateOr(shift, oneVal, "", bb);
// Is result fixable?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090604/b24c4373/attachment.html>
More information about the macruby-changes
mailing list