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

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

Issue 549079: Support for MIPS in architecture independent files.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 11 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
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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 } 106 }
107 107
108 // Emit a jump to the target. There must be a current frame at the 108 // Emit a jump to the target. There must be a current frame at the
109 // jump and there will be no current frame after the jump. 109 // jump and there will be no current frame after the jump.
110 virtual void Jump(); 110 virtual void Jump();
111 virtual void Jump(Result* arg); 111 virtual void Jump(Result* arg);
112 112
113 // Emit a conditional branch to the target. There must be a current 113 // Emit a conditional branch to the target. There must be a current
114 // frame at the branch. The current frame will fall through to the 114 // frame at the branch. The current frame will fall through to the
115 // code after the branch. 115 // code after the branch.
116 #ifndef V8_TARGET_ARCH_MIPS
Søren Thygesen Gjesse 2010/01/19 22:59:12 Like in codegen.h having a platform specific #ifde
Alexandre 2010/01/22 23:08:42 Same comment (see codegen.h). We need this on MIPS
116 virtual void Branch(Condition cc, Hint hint = no_hint); 117 virtual void Branch(Condition cc, Hint hint = no_hint);
117 virtual void Branch(Condition cc, Result* arg, Hint hint = no_hint); 118 virtual void Branch(Condition cc, Result* arg, Hint hint = no_hint);
119 #else
120 virtual void Branch(Condition cc, Hint hint = no_hint, Register src1 = zero_re g, const Operand& src2 = Operand(zero_reg));
Søren Thygesen Gjesse 2010/01/19 22:59:12 Long line, see http://google-styleguide.googlecode
Alexandre 2010/01/22 23:08:42 Style issue fixed. On 2010/01/19 22:59:12, Søren G
121 virtual void Branch(Condition cc, Result* arg, Hint hint = no_hint, Register s rc1 = zero_reg, const Operand& src2 = Operand(zero_reg));
122 #endif
118 123
119 // Bind a jump target. If there is no current frame at the binding 124 // Bind a jump target. If there is no current frame at the binding
120 // site, there must be at least one frame reaching via a forward 125 // site, there must be at least one frame reaching via a forward
121 // jump. 126 // jump.
122 virtual void Bind(); 127 virtual void Bind();
123 virtual void Bind(Result* arg); 128 virtual void Bind(Result* arg);
124 129
125 // Emit a call to a jump target. There must be a current frame at 130 // Emit a call to a jump target. There must be a current frame at
126 // the call. The frame at the target is the same as the current 131 // the call. The frame at the target is the same as the current
127 // frame except for an extra return address on top of it. The frame 132 // frame except for an extra return address on top of it. The frame
(...skipping 18 matching lines...) Expand all
146 // jumps to the block. Set when the jump target is bound, but may 151 // jumps to the block. Set when the jump target is bound, but may
147 // or may not be set for forward-only blocks. 152 // or may not be set for forward-only blocks.
148 VirtualFrame* entry_frame_; 153 VirtualFrame* entry_frame_;
149 154
150 // The actual entry label of the block. 155 // The actual entry label of the block.
151 Label entry_label_; 156 Label entry_label_;
152 157
153 // Implementations of Jump, Branch, and Bind with all arguments and 158 // Implementations of Jump, Branch, and Bind with all arguments and
154 // return values using the virtual frame. 159 // return values using the virtual frame.
155 void DoJump(); 160 void DoJump();
161 #ifndef V8_TARGET_ARCH_MIPS
Søren Thygesen Gjesse 2010/01/19 22:59:12 See above.
156 void DoBranch(Condition cc, Hint hint); 162 void DoBranch(Condition cc, Hint hint);
163 #else
164 void DoBranch(Condition cc, Hint hint, Register src1 = zero_reg, const Operand & src2 = Operand(zero_reg));
Søren Thygesen Gjesse 2010/01/19 22:59:12 See above.
165 #endif
157 void DoBind(); 166 void DoBind();
158 167
159 private: 168 private:
160 static bool compiling_deferred_code_; 169 static bool compiling_deferred_code_;
161 170
162 // Add a virtual frame reaching this labeled block via a forward jump, 171 // Add a virtual frame reaching this labeled block via a forward jump,
163 // and a corresponding merge code label. 172 // and a corresponding merge code label.
164 void AddReachingFrame(VirtualFrame* frame); 173 void AddReachingFrame(VirtualFrame* frame);
165 174
166 // Perform initialization required during entry frame computation 175 // Perform initialization required during entry frame computation
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 // overwritten, without deallocating pointed-to virtual frames. 211 // overwritten, without deallocating pointed-to virtual frames.
203 void CopyTo(BreakTarget* destination); 212 void CopyTo(BreakTarget* destination);
204 213
205 // Emit a jump to the target. There must be a current frame at the 214 // Emit a jump to the target. There must be a current frame at the
206 // jump and there will be no current frame after the jump. 215 // jump and there will be no current frame after the jump.
207 virtual void Jump(); 216 virtual void Jump();
208 virtual void Jump(Result* arg); 217 virtual void Jump(Result* arg);
209 218
210 // Emit a conditional branch to the target. There must be a current 219 // Emit a conditional branch to the target. There must be a current
211 // frame at the branch. The current frame will fall through to the 220 // frame at the branch. The current frame will fall through to the
212 // code after the branch. 221 // code after the branch.
Søren Thygesen Gjesse 2010/01/19 22:59:12 See above.
222 #ifndef V8_TARGET_ARCH_MIPS
213 virtual void Branch(Condition cc, Hint hint = no_hint); 223 virtual void Branch(Condition cc, Hint hint = no_hint);
214 virtual void Branch(Condition cc, Result* arg, Hint hint = no_hint); 224 virtual void Branch(Condition cc, Result* arg, Hint hint = no_hint);
225 #else
226 virtual void Branch(Condition cc, Hint hint = no_hint,
227 Register src1 = zero_reg, const Operand& src2 = Operand(zero_reg));
228 virtual void Branch(Condition cc, Result* arg, Hint hint = no_hint,
229 Register src1 = zero_reg, const Operand& src2 = Operand(zero_reg));
230 #endif
215 231
216 // Bind a break target. If there is no current frame at the binding 232 // Bind a break target. If there is no current frame at the binding
217 // site, there must be at least one frame reaching via a forward 233 // site, there must be at least one frame reaching via a forward
218 // jump. 234 // jump.
219 virtual void Bind(); 235 virtual void Bind();
220 virtual void Bind(Result* arg); 236 virtual void Bind(Result* arg);
221 237
222 // Setter for expected height. 238 // Setter for expected height.
223 void set_expected_height(int expected) { expected_height_ = expected; } 239 void set_expected_height(int expected) { expected_height_ = expected; }
224 240
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 bool is_shadowing_; 286 bool is_shadowing_;
271 #endif 287 #endif
272 288
273 DISALLOW_COPY_AND_ASSIGN(ShadowTarget); 289 DISALLOW_COPY_AND_ASSIGN(ShadowTarget);
274 }; 290 };
275 291
276 292
277 } } // namespace v8::internal 293 } } // namespace v8::internal
278 294
279 #endif // V8_JUMP_TARGET_H_ 295 #endif // V8_JUMP_TARGET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698