OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_IA32_LITHIUM_CODEGEN_IA32_H_ | 5 #ifndef V8_IA32_LITHIUM_CODEGEN_IA32_H_ |
6 #define V8_IA32_LITHIUM_CODEGEN_IA32_H_ | 6 #define V8_IA32_LITHIUM_CODEGEN_IA32_H_ |
7 | 7 |
8 #include "src/ia32/lithium-ia32.h" | 8 #include "src/ia32/lithium-ia32.h" |
9 | 9 |
10 #include "src/base/logging.h" | 10 #include "src/base/logging.h" |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 int formal_parameter_count, | 202 int formal_parameter_count, |
203 int arity, | 203 int arity, |
204 LInstruction* instr, | 204 LInstruction* instr, |
205 EDIState edi_state); | 205 EDIState edi_state); |
206 | 206 |
207 void RecordSafepointWithLazyDeopt(LInstruction* instr, | 207 void RecordSafepointWithLazyDeopt(LInstruction* instr, |
208 SafepointMode safepoint_mode); | 208 SafepointMode safepoint_mode); |
209 | 209 |
210 void RegisterEnvironmentForDeoptimization(LEnvironment* environment, | 210 void RegisterEnvironmentForDeoptimization(LEnvironment* environment, |
211 Safepoint::DeoptMode mode); | 211 Safepoint::DeoptMode mode); |
212 void DeoptimizeIf(Condition cc, | 212 void DeoptimizeIf(Condition cc, LInstruction* instr, |
213 LEnvironment* environment, | |
214 Deoptimizer::BailoutType bailout_type); | 213 Deoptimizer::BailoutType bailout_type); |
215 void DeoptimizeIf(Condition cc, LEnvironment* environment); | 214 void DeoptimizeIf(Condition cc, LInstruction* instr); |
216 | 215 |
217 bool DeoptEveryNTimes() { | 216 bool DeoptEveryNTimes() { |
218 return FLAG_deopt_every_n_times != 0 && !info()->IsStub(); | 217 return FLAG_deopt_every_n_times != 0 && !info()->IsStub(); |
219 } | 218 } |
220 | 219 |
221 void AddToTranslation(LEnvironment* environment, | 220 void AddToTranslation(LEnvironment* environment, |
222 Translation* translation, | 221 Translation* translation, |
223 LOperand* op, | 222 LOperand* op, |
224 bool is_tagged, | 223 bool is_tagged, |
225 bool is_uint32, | 224 bool is_uint32, |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 void RecordAndWritePosition(int position) OVERRIDE; | 261 void RecordAndWritePosition(int position) OVERRIDE; |
263 | 262 |
264 static Condition TokenToCondition(Token::Value op, bool is_unsigned); | 263 static Condition TokenToCondition(Token::Value op, bool is_unsigned); |
265 void EmitGoto(int block); | 264 void EmitGoto(int block); |
266 | 265 |
267 // EmitBranch expects to be the last instruction of a block. | 266 // EmitBranch expects to be the last instruction of a block. |
268 template<class InstrType> | 267 template<class InstrType> |
269 void EmitBranch(InstrType instr, Condition cc); | 268 void EmitBranch(InstrType instr, Condition cc); |
270 template<class InstrType> | 269 template<class InstrType> |
271 void EmitFalseBranch(InstrType instr, Condition cc); | 270 void EmitFalseBranch(InstrType instr, Condition cc); |
272 void EmitNumberUntagD( | 271 void EmitNumberUntagD(LNumberUntagD* instr, Register input, Register temp, |
273 Register input, | 272 XMMRegister result, NumberUntagDMode mode); |
274 Register temp, | |
275 XMMRegister result, | |
276 bool allow_undefined_as_nan, | |
277 bool deoptimize_on_minus_zero, | |
278 LEnvironment* env, | |
279 NumberUntagDMode mode = NUMBER_CANDIDATE_IS_ANY_TAGGED); | |
280 | 273 |
281 // Emits optimized code for typeof x == "y". Modifies input register. | 274 // Emits optimized code for typeof x == "y". Modifies input register. |
282 // Returns the condition on which a final split to | 275 // Returns the condition on which a final split to |
283 // true and false label should be made, to optimize fallthrough. | 276 // true and false label should be made, to optimize fallthrough. |
284 Condition EmitTypeofIs(LTypeofIsAndBranch* instr, Register input); | 277 Condition EmitTypeofIs(LTypeofIsAndBranch* instr, Register input); |
285 | 278 |
286 // Emits optimized code for %_IsObject(x). Preserves input register. | 279 // Emits optimized code for %_IsObject(x). Preserves input register. |
287 // Returns the condition on which a final split to | 280 // Returns the condition on which a final split to |
288 // true and false label should be made, to optimize fallthrough. | 281 // true and false label should be made, to optimize fallthrough. |
289 Condition EmitIsObject(Register input, | 282 Condition EmitIsObject(Register input, |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
414 Label entry_; | 407 Label entry_; |
415 Label exit_; | 408 Label exit_; |
416 Label* external_exit_; | 409 Label* external_exit_; |
417 Label done_; | 410 Label done_; |
418 int instruction_index_; | 411 int instruction_index_; |
419 }; | 412 }; |
420 | 413 |
421 } } // namespace v8::internal | 414 } } // namespace v8::internal |
422 | 415 |
423 #endif // V8_IA32_LITHIUM_CODEGEN_IA32_H_ | 416 #endif // V8_IA32_LITHIUM_CODEGEN_IA32_H_ |
OLD | NEW |