| 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_X87_LITHIUM_CODEGEN_X87_H_ | 5 #ifndef V8_X87_LITHIUM_CODEGEN_X87_H_ |
| 6 #define V8_X87_LITHIUM_CODEGEN_X87_H_ | 6 #define V8_X87_LITHIUM_CODEGEN_X87_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include "src/x87/lithium-x87.h" | 9 #include "src/x87/lithium-x87.h" |
| 10 | 10 |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 Register input, | 170 Register input, |
| 171 Register temporary, | 171 Register temporary, |
| 172 Register temporary2); | 172 Register temporary2); |
| 173 | 173 |
| 174 int GetStackSlotCount() const { return chunk()->spill_slot_count(); } | 174 int GetStackSlotCount() const { return chunk()->spill_slot_count(); } |
| 175 | 175 |
| 176 void AddDeferredCode(LDeferredCode* code) { deferred_.Add(code, zone()); } | 176 void AddDeferredCode(LDeferredCode* code) { deferred_.Add(code, zone()); } |
| 177 | 177 |
| 178 // Code generation passes. Returns true if code generation should | 178 // Code generation passes. Returns true if code generation should |
| 179 // continue. | 179 // continue. |
| 180 void GenerateBodyInstructionPre(LInstruction* instr) OVERRIDE; | 180 void GenerateBodyInstructionPre(LInstruction* instr) override; |
| 181 void GenerateBodyInstructionPost(LInstruction* instr) OVERRIDE; | 181 void GenerateBodyInstructionPost(LInstruction* instr) override; |
| 182 bool GeneratePrologue(); | 182 bool GeneratePrologue(); |
| 183 bool GenerateDeferredCode(); | 183 bool GenerateDeferredCode(); |
| 184 bool GenerateJumpTable(); | 184 bool GenerateJumpTable(); |
| 185 bool GenerateSafepointTable(); | 185 bool GenerateSafepointTable(); |
| 186 | 186 |
| 187 // Generates the custom OSR entrypoint and sets the osr_pc_offset. | 187 // Generates the custom OSR entrypoint and sets the osr_pc_offset. |
| 188 void GenerateOsrPrologue(); | 188 void GenerateOsrPrologue(); |
| 189 | 189 |
| 190 enum SafepointMode { | 190 enum SafepointMode { |
| 191 RECORD_SIMPLE_SAFEPOINT, | 191 RECORD_SIMPLE_SAFEPOINT, |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 void RecordSafepoint(LPointerMap* pointers, | 273 void RecordSafepoint(LPointerMap* pointers, |
| 274 Safepoint::Kind kind, | 274 Safepoint::Kind kind, |
| 275 int arguments, | 275 int arguments, |
| 276 Safepoint::DeoptMode mode); | 276 Safepoint::DeoptMode mode); |
| 277 void RecordSafepoint(LPointerMap* pointers, Safepoint::DeoptMode mode); | 277 void RecordSafepoint(LPointerMap* pointers, Safepoint::DeoptMode mode); |
| 278 void RecordSafepoint(Safepoint::DeoptMode mode); | 278 void RecordSafepoint(Safepoint::DeoptMode mode); |
| 279 void RecordSafepointWithRegisters(LPointerMap* pointers, | 279 void RecordSafepointWithRegisters(LPointerMap* pointers, |
| 280 int arguments, | 280 int arguments, |
| 281 Safepoint::DeoptMode mode); | 281 Safepoint::DeoptMode mode); |
| 282 | 282 |
| 283 void RecordAndWritePosition(int position) OVERRIDE; | 283 void RecordAndWritePosition(int position) override; |
| 284 | 284 |
| 285 static Condition TokenToCondition(Token::Value op, bool is_unsigned); | 285 static Condition TokenToCondition(Token::Value op, bool is_unsigned); |
| 286 void EmitGoto(int block); | 286 void EmitGoto(int block); |
| 287 | 287 |
| 288 // EmitBranch expects to be the last instruction of a block. | 288 // EmitBranch expects to be the last instruction of a block. |
| 289 template<class InstrType> | 289 template<class InstrType> |
| 290 void EmitBranch(InstrType instr, Condition cc); | 290 void EmitBranch(InstrType instr, Condition cc); |
| 291 template<class InstrType> | 291 template<class InstrType> |
| 292 void EmitFalseBranch(InstrType instr, Condition cc); | 292 void EmitFalseBranch(InstrType instr, Condition cc); |
| 293 void EmitNumberUntagDNoSSE2(LNumberUntagD* instr, Register input, | 293 void EmitNumberUntagDNoSSE2(LNumberUntagD* instr, Register input, |
| (...skipping 26 matching lines...) Expand all Loading... |
| 320 void EmitIsConstructCall(Register temp); | 320 void EmitIsConstructCall(Register temp); |
| 321 | 321 |
| 322 // Emits optimized code to deep-copy the contents of statically known | 322 // Emits optimized code to deep-copy the contents of statically known |
| 323 // object graphs (e.g. object literal boilerplate). | 323 // object graphs (e.g. object literal boilerplate). |
| 324 void EmitDeepCopy(Handle<JSObject> object, | 324 void EmitDeepCopy(Handle<JSObject> object, |
| 325 Register result, | 325 Register result, |
| 326 Register source, | 326 Register source, |
| 327 int* offset, | 327 int* offset, |
| 328 AllocationSiteMode mode); | 328 AllocationSiteMode mode); |
| 329 | 329 |
| 330 void EnsureSpaceForLazyDeopt(int space_needed) OVERRIDE; | 330 void EnsureSpaceForLazyDeopt(int space_needed) override; |
| 331 void DoLoadKeyedExternalArray(LLoadKeyed* instr); | 331 void DoLoadKeyedExternalArray(LLoadKeyed* instr); |
| 332 void DoLoadKeyedFixedDoubleArray(LLoadKeyed* instr); | 332 void DoLoadKeyedFixedDoubleArray(LLoadKeyed* instr); |
| 333 void DoLoadKeyedFixedArray(LLoadKeyed* instr); | 333 void DoLoadKeyedFixedArray(LLoadKeyed* instr); |
| 334 void DoStoreKeyedExternalArray(LStoreKeyed* instr); | 334 void DoStoreKeyedExternalArray(LStoreKeyed* instr); |
| 335 void DoStoreKeyedFixedDoubleArray(LStoreKeyed* instr); | 335 void DoStoreKeyedFixedDoubleArray(LStoreKeyed* instr); |
| 336 void DoStoreKeyedFixedArray(LStoreKeyed* instr); | 336 void DoStoreKeyedFixedArray(LStoreKeyed* instr); |
| 337 | 337 |
| 338 template <class T> | 338 template <class T> |
| 339 void EmitVectorLoadICRegisters(T* instr); | 339 void EmitVectorLoadICRegisters(T* instr); |
| 340 | 340 |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 | 437 |
| 438 // Builder that keeps track of safepoints in the code. The table | 438 // Builder that keeps track of safepoints in the code. The table |
| 439 // itself is emitted at the end of the generated code. | 439 // itself is emitted at the end of the generated code. |
| 440 SafepointTableBuilder safepoints_; | 440 SafepointTableBuilder safepoints_; |
| 441 | 441 |
| 442 // Compiler from a set of parallel moves to a sequential list of moves. | 442 // Compiler from a set of parallel moves to a sequential list of moves. |
| 443 LGapResolver resolver_; | 443 LGapResolver resolver_; |
| 444 | 444 |
| 445 Safepoint::Kind expected_safepoint_kind_; | 445 Safepoint::Kind expected_safepoint_kind_; |
| 446 | 446 |
| 447 class PushSafepointRegistersScope FINAL BASE_EMBEDDED { | 447 class PushSafepointRegistersScope final BASE_EMBEDDED { |
| 448 public: | 448 public: |
| 449 explicit PushSafepointRegistersScope(LCodeGen* codegen) | 449 explicit PushSafepointRegistersScope(LCodeGen* codegen) |
| 450 : codegen_(codegen) { | 450 : codegen_(codegen) { |
| 451 DCHECK(codegen_->expected_safepoint_kind_ == Safepoint::kSimple); | 451 DCHECK(codegen_->expected_safepoint_kind_ == Safepoint::kSimple); |
| 452 codegen_->masm_->PushSafepointRegisters(); | 452 codegen_->masm_->PushSafepointRegisters(); |
| 453 codegen_->expected_safepoint_kind_ = Safepoint::kWithRegisters; | 453 codegen_->expected_safepoint_kind_ = Safepoint::kWithRegisters; |
| 454 DCHECK(codegen_->info()->is_calling()); | 454 DCHECK(codegen_->info()->is_calling()); |
| 455 } | 455 } |
| 456 | 456 |
| 457 ~PushSafepointRegistersScope() { | 457 ~PushSafepointRegistersScope() { |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 503 Label exit_; | 503 Label exit_; |
| 504 Label* external_exit_; | 504 Label* external_exit_; |
| 505 Label done_; | 505 Label done_; |
| 506 int instruction_index_; | 506 int instruction_index_; |
| 507 LCodeGen::X87Stack x87_stack_; | 507 LCodeGen::X87Stack x87_stack_; |
| 508 }; | 508 }; |
| 509 | 509 |
| 510 } } // namespace v8::internal | 510 } } // namespace v8::internal |
| 511 | 511 |
| 512 #endif // V8_X87_LITHIUM_CODEGEN_X87_H_ | 512 #endif // V8_X87_LITHIUM_CODEGEN_X87_H_ |
| OLD | NEW |