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

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

Issue 2249002: Fix jump targets on ARM to merge virtual frames (really this time).... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 7 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/arm/ic-arm.cc ('k') | src/arm/macro-assembler-arm.h » ('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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 __ jmp(&entry_label_); 62 __ jmp(&entry_label_);
63 } 63 }
64 64
65 65
66 void JumpTarget::DoBranch(Condition cc, Hint ignored) { 66 void JumpTarget::DoBranch(Condition cc, Hint ignored) {
67 ASSERT(cgen()->has_valid_frame()); 67 ASSERT(cgen()->has_valid_frame());
68 68
69 if (entry_frame_set_) { 69 if (entry_frame_set_) {
70 // Backward branch. We have an expected frame to merge to on the 70 // Backward branch. We have an expected frame to merge to on the
71 // backward edge. 71 // backward edge.
72 if (cc == al) { 72 cgen()->frame()->MergeTo(&entry_frame_, cc);
73 cgen()->frame()->MergeTo(&entry_frame_);
74 } else {
75 // We can't do conditional merges yet so you have to ensure that all
76 // conditional branches to the JumpTarget have the same virtual frame.
77 ASSERT(cgen()->frame()->Equals(&entry_frame_));
78 }
79 } else { 73 } else {
80 // Clone the current frame to use as the expected one at the target. 74 // Clone the current frame to use as the expected one at the target.
81 set_entry_frame(cgen()->frame()); 75 set_entry_frame(cgen()->frame());
82 } 76 }
83 __ b(cc, &entry_label_); 77 __ b(cc, &entry_label_);
78 if (cc == al) {
79 cgen()->DeleteFrame();
80 }
84 } 81 }
85 82
86 83
87 void JumpTarget::Call() { 84 void JumpTarget::Call() {
88 // Call is used to push the address of the catch block on the stack as 85 // Call is used to push the address of the catch block on the stack as
89 // a return address when compiling try/catch and try/finally. We 86 // a return address when compiling try/catch and try/finally. We
90 // fully spill the frame before making the call. The expected frame 87 // fully spill the frame before making the call. The expected frame
91 // at the label (which should be the only one) is the spilled current 88 // at the label (which should be the only one) is the spilled current
92 // frame plus an in-memory return address. The "fall-through" frame 89 // frame plus an in-memory return address. The "fall-through" frame
93 // at the return site is the spilled current frame. 90 // at the return site is the spilled current frame.
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 __ bind(&entry_label_); 130 __ bind(&entry_label_);
134 } 131 }
135 132
136 133
137 #undef __ 134 #undef __
138 135
139 136
140 } } // namespace v8::internal 137 } } // namespace v8::internal
141 138
142 #endif // V8_TARGET_ARCH_ARM 139 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/ic-arm.cc ('k') | src/arm/macro-assembler-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698