OLD | NEW |
1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 2008 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 ASSERT(!cgen()->has_valid_frame() || cgen()->HasValidEntryRegisters()); | 136 ASSERT(!cgen()->has_valid_frame() || cgen()->HasValidEntryRegisters()); |
137 | 137 |
138 if (cgen()->has_valid_frame()) { | 138 if (cgen()->has_valid_frame()) { |
139 if (direction_ != FORWARD_ONLY) cgen()->frame()->ForgetTypeInfo(); | 139 if (direction_ != FORWARD_ONLY) cgen()->frame()->ForgetTypeInfo(); |
140 // If there is a current frame we can use it on the fall through. | 140 // If there is a current frame we can use it on the fall through. |
141 if (!entry_frame_set_) { | 141 if (!entry_frame_set_) { |
142 entry_frame_ = *cgen()->frame(); | 142 entry_frame_ = *cgen()->frame(); |
143 entry_frame_set_ = true; | 143 entry_frame_set_ = true; |
144 } else { | 144 } else { |
145 cgen()->frame()->MergeTo(&entry_frame_); | 145 cgen()->frame()->MergeTo(&entry_frame_); |
| 146 // On fall through we may have to merge both ways. |
| 147 if (direction_ != FORWARD_ONLY) { |
| 148 // This will not need to adjust the virtual frame entries that are |
| 149 // register allocated since that was done above and they now match. |
| 150 // But it does need to adjust the entry_frame_ of this jump target |
| 151 // to make it potentially less optimistic. Later code can branch back |
| 152 // to this jump target and we need to assert that that code does not |
| 153 // have weaker assumptions about types. |
| 154 entry_frame_.MergeTo(cgen()->frame()); |
| 155 } |
146 } | 156 } |
147 } else { | 157 } else { |
148 // If there is no current frame we must have an entry frame which we can | 158 // If there is no current frame we must have an entry frame which we can |
149 // copy. | 159 // copy. |
150 ASSERT(entry_frame_set_); | 160 ASSERT(entry_frame_set_); |
151 RegisterFile empty; | 161 RegisterFile empty; |
152 cgen()->SetFrame(new VirtualFrame(&entry_frame_), &empty); | 162 cgen()->SetFrame(new VirtualFrame(&entry_frame_), &empty); |
153 } | 163 } |
154 | 164 |
155 __ bind(&entry_label_); | 165 __ bind(&entry_label_); |
156 } | 166 } |
157 | 167 |
158 | 168 |
159 #undef __ | 169 #undef __ |
160 | 170 |
161 | 171 |
162 } } // namespace v8::internal | 172 } } // namespace v8::internal |
163 | 173 |
164 #endif // V8_TARGET_ARCH_ARM | 174 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |