Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(254)

Side by Side Diff: src/hydrogen-instructions.cc

Issue 16365004: Don't force representations in the loop builder. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/hydrogen.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2480 matching lines...) Expand 10 before | Expand all | Expand 10 after
2491 stream->Add("B%d", SuccessorAt(0)->block_id()); 2491 stream->Add("B%d", SuccessorAt(0)->block_id());
2492 } 2492 }
2493 2493
2494 2494
2495 void HCompareIDAndBranch::InferRepresentation(HInferRepresentation* h_infer) { 2495 void HCompareIDAndBranch::InferRepresentation(HInferRepresentation* h_infer) {
2496 Representation left_rep = left()->representation(); 2496 Representation left_rep = left()->representation();
2497 Representation right_rep = right()->representation(); 2497 Representation right_rep = right()->representation();
2498 Representation observed_left = observed_input_representation(0); 2498 Representation observed_left = observed_input_representation(0);
2499 Representation observed_right = observed_input_representation(1); 2499 Representation observed_right = observed_input_representation(1);
2500 2500
2501 Representation rep = Representation::Smi(); 2501 Representation rep = Representation::None();
2502 if (observed_left.IsInteger32() && observed_right.IsInteger32()) { 2502 rep = rep.generalize(observed_left);
2503 rep = rep.generalize(observed_right);
2504 if (rep.IsNone() || rep.IsSmiOrInteger32()) {
2503 if (!left_rep.IsTagged()) rep = rep.generalize(left_rep); 2505 if (!left_rep.IsTagged()) rep = rep.generalize(left_rep);
2504 if (!right_rep.IsTagged()) rep = rep.generalize(right_rep); 2506 if (!right_rep.IsTagged()) rep = rep.generalize(right_rep);
2505 } else { 2507 } else {
2506 rep = Representation::Double(); 2508 rep = Representation::Double();
2507 } 2509 }
2508 2510
2509 if (rep.IsDouble()) { 2511 if (rep.IsDouble()) {
2510 // According to the ES5 spec (11.9.3, 11.8.5), Equality comparisons (==, === 2512 // According to the ES5 spec (11.9.3, 11.8.5), Equality comparisons (==, ===
2511 // and !=) have special handling of undefined, e.g. undefined == undefined 2513 // and !=) have special handling of undefined, e.g. undefined == undefined
2512 // is 'true'. Relational comparisons have a different semantic, first 2514 // is 'true'. Relational comparisons have a different semantic, first
(...skipping 1289 matching lines...) Expand 10 before | Expand all | Expand 10 after
3802 case kBackingStore: 3804 case kBackingStore:
3803 if (!name_.is_null()) stream->Add(*String::cast(*name_)->ToCString()); 3805 if (!name_.is_null()) stream->Add(*String::cast(*name_)->ToCString());
3804 stream->Add("[backing-store]"); 3806 stream->Add("[backing-store]");
3805 break; 3807 break;
3806 } 3808 }
3807 3809
3808 stream->Add("@%d", offset()); 3810 stream->Add("@%d", offset());
3809 } 3811 }
3810 3812
3811 } } // namespace v8::internal 3813 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698