| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 SafepointMode safepoint_mode); | 261 SafepointMode safepoint_mode); |
| 262 | 262 |
| 263 void RegisterEnvironmentForDeoptimization(LEnvironment* environment, | 263 void RegisterEnvironmentForDeoptimization(LEnvironment* environment, |
| 264 Safepoint::DeoptMode mode); | 264 Safepoint::DeoptMode mode); |
| 265 void DeoptimizeIf(Condition cc, | 265 void DeoptimizeIf(Condition cc, |
| 266 LEnvironment* environment, | 266 LEnvironment* environment, |
| 267 Deoptimizer::BailoutType bailout_type); | 267 Deoptimizer::BailoutType bailout_type); |
| 268 void DeoptimizeIf(Condition cc, LEnvironment* environment); | 268 void DeoptimizeIf(Condition cc, LEnvironment* environment); |
| 269 void ApplyCheckIf(Condition cc, LBoundsCheck* check); | 269 void ApplyCheckIf(Condition cc, LBoundsCheck* check); |
| 270 | 270 |
| 271 bool DeoptEveryNTimes() { |
| 272 return FLAG_deopt_every_n_times != 0 && !info()->IsStub(); |
| 273 } |
| 274 |
| 271 void AddToTranslation(LEnvironment* environment, | 275 void AddToTranslation(LEnvironment* environment, |
| 272 Translation* translation, | 276 Translation* translation, |
| 273 LOperand* op, | 277 LOperand* op, |
| 274 bool is_tagged, | 278 bool is_tagged, |
| 275 bool is_uint32, | 279 bool is_uint32, |
| 276 int* object_index_pointer, | 280 int* object_index_pointer, |
| 277 int* dematerialized_index_pointer); | 281 int* dematerialized_index_pointer); |
| 278 void RegisterDependentCodeForEmbeddedMaps(Handle<Code> code); | 282 void RegisterDependentCodeForEmbeddedMaps(Handle<Code> code); |
| 279 void PopulateDeoptimizationData(Handle<Code> code); | 283 void PopulateDeoptimizationData(Handle<Code> code); |
| 280 int DefineDeoptimizationLiteral(Handle<Object> literal); | 284 int DefineDeoptimizationLiteral(Handle<Object> literal); |
| 281 | 285 |
| 282 void PopulateDeoptimizationLiteralsWithInlinedFunctions(); | 286 void PopulateDeoptimizationLiteralsWithInlinedFunctions(); |
| 283 | 287 |
| 284 Register ToRegister(int index) const; | 288 Register ToRegister(int index) const; |
| 285 XMMRegister ToDoubleRegister(int index) const; | 289 XMMRegister ToDoubleRegister(int index) const; |
| 286 X87Register ToX87Register(int index) const; | 290 X87Register ToX87Register(int index) const; |
| 287 int32_t ToRepresentation(LConstantOperand* op, const Representation& r) const; | 291 int32_t ToRepresentation(LConstantOperand* op, const Representation& r) const; |
| 288 int32_t ToInteger32(LConstantOperand* op) const; | 292 int32_t ToInteger32(LConstantOperand* op) const; |
| 289 ExternalReference ToExternalReference(LConstantOperand* op) const; | 293 ExternalReference ToExternalReference(LConstantOperand* op) const; |
| 290 | 294 |
| 291 Operand BuildFastArrayOperand(LOperand* elements_pointer, | 295 Operand BuildFastArrayOperand(LOperand* elements_pointer, |
| 292 LOperand* key, | 296 LOperand* key, |
| 293 Representation key_representation, | 297 Representation key_representation, |
| 294 ElementsKind elements_kind, | 298 ElementsKind elements_kind, |
| 295 uint32_t offset, | 299 uint32_t offset, |
| 296 uint32_t additional_index = 0); | 300 uint32_t additional_index = 0); |
| 297 | 301 |
| 302 Operand BuildSeqStringOperand(Register string, |
| 303 LOperand* index, |
| 304 String::Encoding encoding); |
| 305 |
| 298 void EmitIntegerMathAbs(LMathAbs* instr); | 306 void EmitIntegerMathAbs(LMathAbs* instr); |
| 299 | 307 |
| 300 // Support for recording safepoint and position information. | 308 // Support for recording safepoint and position information. |
| 301 void RecordSafepoint(LPointerMap* pointers, | 309 void RecordSafepoint(LPointerMap* pointers, |
| 302 Safepoint::Kind kind, | 310 Safepoint::Kind kind, |
| 303 int arguments, | 311 int arguments, |
| 304 Safepoint::DeoptMode mode); | 312 Safepoint::DeoptMode mode); |
| 305 void RecordSafepoint(LPointerMap* pointers, Safepoint::DeoptMode mode); | 313 void RecordSafepoint(LPointerMap* pointers, Safepoint::DeoptMode mode); |
| 306 void RecordSafepoint(Safepoint::DeoptMode mode); | 314 void RecordSafepoint(Safepoint::DeoptMode mode); |
| 307 void RecordSafepointWithRegisters(LPointerMap* pointers, | 315 void RecordSafepointWithRegisters(LPointerMap* pointers, |
| 308 int arguments, | 316 int arguments, |
| 309 Safepoint::DeoptMode mode); | 317 Safepoint::DeoptMode mode); |
| 310 | 318 |
| 311 void RecordAndWritePosition(int position) V8_OVERRIDE; | 319 void RecordAndWritePosition(int position) V8_OVERRIDE; |
| 312 | 320 |
| 313 static Condition TokenToCondition(Token::Value op, bool is_unsigned); | 321 static Condition TokenToCondition(Token::Value op, bool is_unsigned); |
| 314 void EmitGoto(int block); | 322 void EmitGoto(int block); |
| 323 |
| 324 // EmitBranch expects to be the last instruction of a block. |
| 315 template<class InstrType> | 325 template<class InstrType> |
| 316 void EmitBranch(InstrType instr, Condition cc); | 326 void EmitBranch(InstrType instr, Condition cc); |
| 317 template<class InstrType> | 327 template<class InstrType> |
| 318 void EmitFalseBranch(InstrType instr, Condition cc); | 328 void EmitFalseBranch(InstrType instr, Condition cc); |
| 319 void EmitNumberUntagD( | 329 void EmitNumberUntagD( |
| 320 Register input, | 330 Register input, |
| 321 Register temp, | 331 Register temp, |
| 322 XMMRegister result, | 332 XMMRegister result, |
| 323 bool allow_undefined_as_nan, | 333 bool allow_undefined_as_nan, |
| 324 bool deoptimize_on_minus_zero, | 334 bool deoptimize_on_minus_zero, |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 528 Label exit_; | 538 Label exit_; |
| 529 Label* external_exit_; | 539 Label* external_exit_; |
| 530 Label done_; | 540 Label done_; |
| 531 int instruction_index_; | 541 int instruction_index_; |
| 532 LCodeGen::X87Stack x87_stack_; | 542 LCodeGen::X87Stack x87_stack_; |
| 533 }; | 543 }; |
| 534 | 544 |
| 535 } } // namespace v8::internal | 545 } } // namespace v8::internal |
| 536 | 546 |
| 537 #endif // V8_IA32_LITHIUM_CODEGEN_IA32_H_ | 547 #endif // V8_IA32_LITHIUM_CODEGEN_IA32_H_ |
| OLD | NEW |