| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 } | 76 } |
| 77 | 77 |
| 78 // Simple accessors. | 78 // Simple accessors. |
| 79 MacroAssembler* masm() const { return masm_; } | 79 MacroAssembler* masm() const { return masm_; } |
| 80 CompilationInfo* info() const { return info_; } | 80 CompilationInfo* info() const { return info_; } |
| 81 Isolate* isolate() const { return info_->isolate(); } | 81 Isolate* isolate() const { return info_->isolate(); } |
| 82 Factory* factory() const { return isolate()->factory(); } | 82 Factory* factory() const { return isolate()->factory(); } |
| 83 Heap* heap() const { return isolate()->heap(); } | 83 Heap* heap() const { return isolate()->heap(); } |
| 84 Zone* zone() const { return zone_; } | 84 Zone* zone() const { return zone_; } |
| 85 | 85 |
| 86 // TODO(svenpanne) Use this consistently. | |
| 87 int LookupDestination(int block_id) const { | 86 int LookupDestination(int block_id) const { |
| 88 return chunk()->LookupDestination(block_id); | 87 return chunk()->LookupDestination(block_id); |
| 89 } | 88 } |
| 90 | 89 |
| 91 bool IsNextEmittedBlock(int block_id) const { | 90 bool IsNextEmittedBlock(int block_id) const { |
| 92 return LookupDestination(block_id) == GetNextEmittedBlock(); | 91 return LookupDestination(block_id) == GetNextEmittedBlock(); |
| 93 } | 92 } |
| 94 | 93 |
| 95 bool NeedsEagerFrame() const { | 94 bool NeedsEagerFrame() const { |
| 96 return GetStackSlotCount() > 0 || | 95 return GetStackSlotCount() > 0 || |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 LOperand* value, | 149 LOperand* value, |
| 151 IntegerSignedness signedness); | 150 IntegerSignedness signedness); |
| 152 | 151 |
| 153 void DoDeferredTaggedToI(LTaggedToI* instr); | 152 void DoDeferredTaggedToI(LTaggedToI* instr); |
| 154 void DoDeferredTaggedToINoSSE2(LTaggedToINoSSE2* instr); | 153 void DoDeferredTaggedToINoSSE2(LTaggedToINoSSE2* instr); |
| 155 void DoDeferredMathAbsTaggedHeapNumber(LMathAbs* instr); | 154 void DoDeferredMathAbsTaggedHeapNumber(LMathAbs* instr); |
| 156 void DoDeferredStackCheck(LStackCheck* instr); | 155 void DoDeferredStackCheck(LStackCheck* instr); |
| 157 void DoDeferredRandom(LRandom* instr); | 156 void DoDeferredRandom(LRandom* instr); |
| 158 void DoDeferredStringCharCodeAt(LStringCharCodeAt* instr); | 157 void DoDeferredStringCharCodeAt(LStringCharCodeAt* instr); |
| 159 void DoDeferredStringCharFromCode(LStringCharFromCode* instr); | 158 void DoDeferredStringCharFromCode(LStringCharFromCode* instr); |
| 159 void DoDeferredAllocateObject(LAllocateObject* instr); |
| 160 void DoDeferredAllocate(LAllocate* instr); | 160 void DoDeferredAllocate(LAllocate* instr); |
| 161 void DoDeferredInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr, | 161 void DoDeferredInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr, |
| 162 Label* map_check); | 162 Label* map_check); |
| 163 | 163 |
| 164 void DoCheckMapCommon(Register reg, Handle<Map> map, LInstruction* instr); | 164 void DoCheckMapCommon(Register reg, Handle<Map> map, LInstruction* instr); |
| 165 | 165 |
| 166 // Parallel move support. | 166 // Parallel move support. |
| 167 void DoParallelMove(LParallelMove* move); | 167 void DoParallelMove(LParallelMove* move); |
| 168 void DoGap(LGap* instr); | 168 void DoGap(LGap* instr); |
| 169 | 169 |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 Safepoint::DeoptMode mode); | 310 Safepoint::DeoptMode mode); |
| 311 void RecordSafepoint(LPointerMap* pointers, Safepoint::DeoptMode mode); | 311 void RecordSafepoint(LPointerMap* pointers, Safepoint::DeoptMode mode); |
| 312 void RecordSafepoint(Safepoint::DeoptMode mode); | 312 void RecordSafepoint(Safepoint::DeoptMode mode); |
| 313 void RecordSafepointWithRegisters(LPointerMap* pointers, | 313 void RecordSafepointWithRegisters(LPointerMap* pointers, |
| 314 int arguments, | 314 int arguments, |
| 315 Safepoint::DeoptMode mode); | 315 Safepoint::DeoptMode mode); |
| 316 void RecordPosition(int position); | 316 void RecordPosition(int position); |
| 317 | 317 |
| 318 static Condition TokenToCondition(Token::Value op, bool is_unsigned); | 318 static Condition TokenToCondition(Token::Value op, bool is_unsigned); |
| 319 void EmitGoto(int block); | 319 void EmitGoto(int block); |
| 320 void EmitBranch(int left_block, int right_block, Condition cc); | 320 template<class InstrType> |
| 321 void EmitBranch(InstrType instr, Condition cc); |
| 321 void EmitNumberUntagD( | 322 void EmitNumberUntagD( |
| 322 Register input, | 323 Register input, |
| 323 Register temp, | 324 Register temp, |
| 324 XMMRegister result, | 325 XMMRegister result, |
| 325 bool allow_undefined_as_nan, | 326 bool allow_undefined_as_nan, |
| 326 bool deoptimize_on_minus_zero, | 327 bool deoptimize_on_minus_zero, |
| 327 LEnvironment* env, | 328 LEnvironment* env, |
| 328 NumberUntagDMode mode = NUMBER_CANDIDATE_IS_ANY_TAGGED); | 329 NumberUntagDMode mode = NUMBER_CANDIDATE_IS_ANY_TAGGED); |
| 329 | 330 |
| 330 void EmitNumberUntagDNoSSE2( | 331 void EmitNumberUntagDNoSSE2( |
| (...skipping 18 matching lines...) Expand all Loading... |
| 349 Condition EmitIsObject(Register input, | 350 Condition EmitIsObject(Register input, |
| 350 Register temp1, | 351 Register temp1, |
| 351 Label* is_not_object, | 352 Label* is_not_object, |
| 352 Label* is_object); | 353 Label* is_object); |
| 353 | 354 |
| 354 // Emits optimized code for %_IsString(x). Preserves input register. | 355 // Emits optimized code for %_IsString(x). Preserves input register. |
| 355 // Returns the condition on which a final split to | 356 // Returns the condition on which a final split to |
| 356 // true and false label should be made, to optimize fallthrough. | 357 // true and false label should be made, to optimize fallthrough. |
| 357 Condition EmitIsString(Register input, | 358 Condition EmitIsString(Register input, |
| 358 Register temp1, | 359 Register temp1, |
| 359 Label* is_not_string); | 360 Label* is_not_string, |
| 361 SmiCheck check_needed); |
| 360 | 362 |
| 361 // Emits optimized code for %_IsConstructCall(). | 363 // Emits optimized code for %_IsConstructCall(). |
| 362 // Caller should branch on equal condition. | 364 // Caller should branch on equal condition. |
| 363 void EmitIsConstructCall(Register temp); | 365 void EmitIsConstructCall(Register temp); |
| 364 | 366 |
| 365 void EmitLoadFieldOrConstantFunction(Register result, | 367 void EmitLoadFieldOrConstantFunction(Register result, |
| 366 Register object, | 368 Register object, |
| 367 Handle<Map> type, | 369 Handle<Map> type, |
| 368 Handle<String> name, | 370 Handle<String> name, |
| 369 LEnvironment* env); | 371 LEnvironment* env); |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 475 LCodeGen* codegen_; | 477 LCodeGen* codegen_; |
| 476 Label entry_; | 478 Label entry_; |
| 477 Label exit_; | 479 Label exit_; |
| 478 Label* external_exit_; | 480 Label* external_exit_; |
| 479 int instruction_index_; | 481 int instruction_index_; |
| 480 }; | 482 }; |
| 481 | 483 |
| 482 } } // namespace v8::internal | 484 } } // namespace v8::internal |
| 483 | 485 |
| 484 #endif // V8_IA32_LITHIUM_CODEGEN_IA32_H_ | 486 #endif // V8_IA32_LITHIUM_CODEGEN_IA32_H_ |
| OLD | NEW |