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 3285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3296 return false; | 3296 return false; |
3297 } | 3297 } |
3298 | 3298 |
3299 | 3299 |
3300 void HCompareHoleAndBranch::InferRepresentation( | 3300 void HCompareHoleAndBranch::InferRepresentation( |
3301 HInferRepresentationPhase* h_infer) { | 3301 HInferRepresentationPhase* h_infer) { |
3302 ChangeRepresentation(value()->representation()); | 3302 ChangeRepresentation(value()->representation()); |
3303 } | 3303 } |
3304 | 3304 |
3305 | 3305 |
| 3306 bool HCompareNumericAndBranch::KnownSuccessorBlock(HBasicBlock** block) { |
| 3307 if (left() == right() && |
| 3308 left()->representation().IsSmiOrInteger32()) { |
| 3309 *block = (token() == Token::EQ || |
| 3310 token() == Token::EQ_STRICT || |
| 3311 token() == Token::LTE || |
| 3312 token() == Token::GTE) |
| 3313 ? FirstSuccessor() : SecondSuccessor(); |
| 3314 return true; |
| 3315 } |
| 3316 *block = NULL; |
| 3317 return false; |
| 3318 } |
| 3319 |
| 3320 |
3306 bool HCompareMinusZeroAndBranch::KnownSuccessorBlock(HBasicBlock** block) { | 3321 bool HCompareMinusZeroAndBranch::KnownSuccessorBlock(HBasicBlock** block) { |
3307 if (FLAG_fold_constants && value()->IsConstant()) { | 3322 if (FLAG_fold_constants && value()->IsConstant()) { |
3308 HConstant* constant = HConstant::cast(value()); | 3323 HConstant* constant = HConstant::cast(value()); |
3309 if (constant->HasDoubleValue()) { | 3324 if (constant->HasDoubleValue()) { |
3310 *block = IsMinusZero(constant->DoubleValue()) | 3325 *block = IsMinusZero(constant->DoubleValue()) |
3311 ? FirstSuccessor() : SecondSuccessor(); | 3326 ? FirstSuccessor() : SecondSuccessor(); |
3312 return true; | 3327 return true; |
3313 } | 3328 } |
3314 } | 3329 } |
3315 if (value()->representation().IsSmiOrInteger32()) { | 3330 if (value()->representation().IsSmiOrInteger32()) { |
(...skipping 1406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4722 break; | 4737 break; |
4723 case kExternalMemory: | 4738 case kExternalMemory: |
4724 stream->Add("[external-memory]"); | 4739 stream->Add("[external-memory]"); |
4725 break; | 4740 break; |
4726 } | 4741 } |
4727 | 4742 |
4728 stream->Add("@%d", offset()); | 4743 stream->Add("@%d", offset()); |
4729 } | 4744 } |
4730 | 4745 |
4731 } } // namespace v8::internal | 4746 } } // namespace v8::internal |
OLD | NEW |