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

Side by Side Diff: src/jump-target.cc

Issue 60044: When computing pairwise merges of frame elements, we should allow... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 8 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 | « 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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 FrameElement* JumpTarget::Combine(FrameElement* left, FrameElement* right) { 95 FrameElement* JumpTarget::Combine(FrameElement* left, FrameElement* right) {
96 // Given a pair of non-null frame element pointers, return one of 96 // Given a pair of non-null frame element pointers, return one of
97 // them as an entry frame candidate or null if they are 97 // them as an entry frame candidate or null if they are
98 // incompatible. 98 // incompatible.
99 99
100 // If either is invalid, the result is. 100 // If either is invalid, the result is.
101 if (!left->is_valid()) return left; 101 if (!left->is_valid()) return left;
102 if (!right->is_valid()) return right; 102 if (!right->is_valid()) return right;
103 103
104 // If they have the same value, the result is the same. (Exception: 104 // If they have the same value, the result is the same. (Exception:
105 // bidirectional frames cannot have constants or copies.) If either 105 // bidirectional frames cannot have constants or copies.) If either
William Hesse 2009/04/02 11:34:30 Update comment.
106 // is unsynced, the result is. 106 // is unsynced, the result is.
107 if (left->is_memory() && right->is_memory()) return left; 107 if (left->is_memory() && right->is_memory()) return left;
108 108
109 if (left->is_register() && right->is_register() && 109 if (left->is_register() && right->is_register() &&
110 left->reg().is(right->reg())) { 110 left->reg().is(right->reg())) {
111 if (!left->is_synced()) { 111 if (!left->is_synced()) {
112 return left; 112 return left;
113 } else { 113 } else {
114 return right; 114 return right;
115 } 115 }
116 } 116 }
117 117
118 if (direction_ == FORWARD_ONLY && 118 if (left->is_constant() &&
119 left->is_constant() &&
120 right->is_constant() && 119 right->is_constant() &&
121 left->handle().is_identical_to(right->handle())) { 120 left->handle().is_identical_to(right->handle())) {
122 if (!left->is_synced()) { 121 if (!left->is_synced()) {
123 return left; 122 return left;
124 } else { 123 } else {
125 return right; 124 return right;
126 } 125 }
127 } 126 }
128 127
129 if (direction_ == FORWARD_ONLY && 128 if (left->is_copy() &&
130 left->is_copy() &&
131 right->is_copy() && 129 right->is_copy() &&
132 left->index() == right->index()) { 130 left->index() == right->index()) {
133 if (!left->is_synced()) { 131 if (!left->is_synced()) {
134 return left; 132 return left;
135 } else { 133 } else {
136 return right; 134 return right;
137 } 135 }
138 } 136 }
139 137
140 // Otherwise they are incompatible and we will reallocate them. 138 // Otherwise they are incompatible and we will reallocate them.
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after
712 temp.CopyTo(this); 710 temp.CopyTo(this);
713 temp.Reset(); // So the destructor does not deallocate virtual frames. 711 temp.Reset(); // So the destructor does not deallocate virtual frames.
714 712
715 #ifdef DEBUG 713 #ifdef DEBUG
716 is_shadowing_ = false; 714 is_shadowing_ = false;
717 #endif 715 #endif
718 } 716 }
719 717
720 718
721 } } // namespace v8::internal 719 } } // 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