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

Side by Side Diff: src/hydrogen.cc

Issue 8574036: Re-added missing return in HInferRepresentation::TryChange. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 1 month 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 | « no previous file | 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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 1660 matching lines...) Expand 10 before | Expand all | Expand 10 after
1671 int double_count = use_count[Representation::kDouble]; 1671 int double_count = use_count[Representation::kDouble];
1672 int int32_count = use_count[Representation::kInteger32]; 1672 int int32_count = use_count[Representation::kInteger32];
1673 int non_tagged_count = double_count + int32_count; 1673 int non_tagged_count = double_count + int32_count;
1674 1674
1675 // If a non-loop phi has tagged uses, don't convert it to untagged. 1675 // If a non-loop phi has tagged uses, don't convert it to untagged.
1676 if (value->IsPhi() && !value->block()->IsLoopHeader() && tagged_count > 0) { 1676 if (value->IsPhi() && !value->block()->IsLoopHeader() && tagged_count > 0) {
1677 return Representation::None(); 1677 return Representation::None();
1678 } 1678 }
1679 1679
1680 // Prefer unboxing over boxing, the latter is more expensive. 1680 // Prefer unboxing over boxing, the latter is more expensive.
1681 if (tagged_count > non_tagged_count) Representation::None(); 1681 if (tagged_count > non_tagged_count) return Representation::None();
1682 1682
1683 // Prefer Integer32 over Double, if possible. 1683 // Prefer Integer32 over Double, if possible.
1684 if (int32_count > 0 && value->IsConvertibleToInteger()) { 1684 if (int32_count > 0 && value->IsConvertibleToInteger()) {
1685 return Representation::Integer32(); 1685 return Representation::Integer32();
1686 } 1686 }
1687 1687
1688 if (double_count > 0) return Representation::Double(); 1688 if (double_count > 0) return Representation::Double();
1689 1689
1690 return Representation::None(); 1690 return Representation::None();
1691 } 1691 }
(...skipping 5402 matching lines...) Expand 10 before | Expand all | Expand 10 after
7094 } 7094 }
7095 } 7095 }
7096 7096
7097 #ifdef DEBUG 7097 #ifdef DEBUG
7098 if (graph_ != NULL) graph_->Verify(false); // No full verify. 7098 if (graph_ != NULL) graph_->Verify(false); // No full verify.
7099 if (allocator_ != NULL) allocator_->Verify(); 7099 if (allocator_ != NULL) allocator_->Verify();
7100 #endif 7100 #endif
7101 } 7101 }
7102 7102
7103 } } // namespace v8::internal 7103 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698