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

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

Issue 125045: First round of JumpTarget simplification. Remove dead functions... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 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 | « no previous file | src/ia32/codegen-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 cgen()->frame()->SpillAll(); 142 cgen()->frame()->SpillAll();
143 VirtualFrame* target_frame = new VirtualFrame(cgen()->frame()); 143 VirtualFrame* target_frame = new VirtualFrame(cgen()->frame());
144 target_frame->Adjust(1); 144 target_frame->Adjust(1);
145 // We do not expect a call with a preconfigured entry frame. 145 // We do not expect a call with a preconfigured entry frame.
146 ASSERT(entry_frame_ == NULL); 146 ASSERT(entry_frame_ == NULL);
147 AddReachingFrame(target_frame); 147 AddReachingFrame(target_frame);
148 __ bl(&merge_labels_.last()); 148 __ bl(&merge_labels_.last());
149 } 149 }
150 150
151 151
152 void JumpTarget::DoBind(int mergable_elements) { 152 void JumpTarget::DoBind() {
153 ASSERT(!is_bound()); 153 ASSERT(!is_bound());
154 154
155 // Live non-frame registers are not allowed at the start of a basic 155 // Live non-frame registers are not allowed at the start of a basic
156 // block. 156 // block.
157 ASSERT(!cgen()->has_valid_frame() || cgen()->HasValidEntryRegisters()); 157 ASSERT(!cgen()->has_valid_frame() || cgen()->HasValidEntryRegisters());
158 158
159 if (direction_ == FORWARD_ONLY) { 159 if (direction_ == FORWARD_ONLY) {
160 // A simple case: no forward jumps and no possible backward jumps. 160 // A simple case: no forward jumps and no possible backward jumps.
161 if (!is_linked()) { 161 if (!is_linked()) {
162 // The stack pointer can be floating above the top of the 162 // The stack pointer can be floating above the top of the
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 bool had_fall_through = false; 200 bool had_fall_through = false;
201 if (cgen()->has_valid_frame()) { 201 if (cgen()->has_valid_frame()) {
202 had_fall_through = true; 202 had_fall_through = true;
203 AddReachingFrame(cgen()->frame()); // Return value ignored. 203 AddReachingFrame(cgen()->frame()); // Return value ignored.
204 RegisterFile empty; 204 RegisterFile empty;
205 cgen()->SetFrame(NULL, &empty); 205 cgen()->SetFrame(NULL, &empty);
206 } 206 }
207 207
208 // Compute the frame to use for entry to the block. 208 // Compute the frame to use for entry to the block.
209 if (entry_frame_ == NULL) { 209 if (entry_frame_ == NULL) {
210 ComputeEntryFrame(mergable_elements); 210 ComputeEntryFrame();
211 } 211 }
212 212
213 // Some moves required to merge to an expected frame require purely 213 // Some moves required to merge to an expected frame require purely
214 // frame state changes, and do not require any code generation. 214 // frame state changes, and do not require any code generation.
215 // Perform those first to increase the possibility of finding equal 215 // Perform those first to increase the possibility of finding equal
216 // frames below. 216 // frames below.
217 for (int i = 0; i < reaching_frames_.length(); i++) { 217 for (int i = 0; i < reaching_frames_.length(); i++) {
218 if (reaching_frames_[i] != NULL) { 218 if (reaching_frames_[i] != NULL) {
219 reaching_frames_[i]->PrepareMergeTo(entry_frame_); 219 reaching_frames_[i]->PrepareMergeTo(entry_frame_);
220 } 220 }
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 cgen()->frame()->MergeTo(entry_frame_); 315 cgen()->frame()->MergeTo(entry_frame_);
316 } 316 }
317 317
318 __ bind(&entry_label_); 318 __ bind(&entry_label_);
319 } 319 }
320 320
321 #undef __ 321 #undef __
322 322
323 323
324 } } // namespace v8::internal 324 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/ia32/codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698