| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 1495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1506 if (CheckFlag(kBailoutOnMinusZero)) stream->Add(" -0?"); | 1506 if (CheckFlag(kBailoutOnMinusZero)) stream->Add(" -0?"); |
| 1507 if (CheckFlag(kAllowUndefinedAsNaN)) stream->Add(" allow-undefined-as-nan"); | 1507 if (CheckFlag(kAllowUndefinedAsNaN)) stream->Add(" allow-undefined-as-nan"); |
| 1508 } | 1508 } |
| 1509 | 1509 |
| 1510 | 1510 |
| 1511 HValue* HUnaryMathOperation::Canonicalize() { | 1511 HValue* HUnaryMathOperation::Canonicalize() { |
| 1512 if (op() == kMathFloor) { | 1512 if (op() == kMathFloor) { |
| 1513 // If the input is integer32 then we replace the floor instruction | 1513 // If the input is integer32 then we replace the floor instruction |
| 1514 // with its input. This happens before the representation changes are | 1514 // with its input. This happens before the representation changes are |
| 1515 // introduced. | 1515 // introduced. |
| 1516 |
| 1517 // TODO(2205): The above comment is lying. All of this happens |
| 1518 // *after* representation changes are introduced. We should check |
| 1519 // for value->IsChange() and react accordingly if yes. |
| 1520 |
| 1516 if (value()->representation().IsInteger32()) return value(); | 1521 if (value()->representation().IsInteger32()) return value(); |
| 1517 | 1522 |
| 1518 #if defined(V8_TARGET_ARCH_ARM) || defined(V8_TARGET_ARCH_IA32) || \ | 1523 #if defined(V8_TARGET_ARCH_ARM) || defined(V8_TARGET_ARCH_IA32) || \ |
| 1519 defined(V8_TARGET_ARCH_X64) | 1524 defined(V8_TARGET_ARCH_X64) |
| 1520 if (value()->IsDiv() && (value()->UseCount() == 1)) { | 1525 if (value()->IsDiv() && (value()->UseCount() == 1)) { |
| 1521 // TODO(2038): Implement this optimization for non ARM architectures. | 1526 // TODO(2038): Implement this optimization for non ARM architectures. |
| 1522 HDiv* hdiv = HDiv::cast(value()); | 1527 HDiv* hdiv = HDiv::cast(value()); |
| 1523 HValue* left = hdiv->left(); | 1528 HValue* left = hdiv->left(); |
| 1524 HValue* right = hdiv->right(); | 1529 HValue* right = hdiv->right(); |
| 1525 // Try to simplify left and right values of the division. | 1530 // Try to simplify left and right values of the division. |
| (...skipping 2313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3839 case kBackingStore: | 3844 case kBackingStore: |
| 3840 if (!name_.is_null()) stream->Add(*String::cast(*name_)->ToCString()); | 3845 if (!name_.is_null()) stream->Add(*String::cast(*name_)->ToCString()); |
| 3841 stream->Add("[backing-store]"); | 3846 stream->Add("[backing-store]"); |
| 3842 break; | 3847 break; |
| 3843 } | 3848 } |
| 3844 | 3849 |
| 3845 stream->Add("@%d", offset()); | 3850 stream->Add("@%d", offset()); |
| 3846 } | 3851 } |
| 3847 | 3852 |
| 3848 } } // namespace v8::internal | 3853 } } // namespace v8::internal |
| OLD | NEW |