| 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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 | 141 |
| 142 int GetStackSlotCount() const { return chunk()->spill_slot_count(); } | 142 int GetStackSlotCount() const { return chunk()->spill_slot_count(); } |
| 143 | 143 |
| 144 void AddDeferredCode(LDeferredCode* code) { deferred_.Add(code, zone()); } | 144 void AddDeferredCode(LDeferredCode* code) { deferred_.Add(code, zone()); } |
| 145 | 145 |
| 146 void SaveCallerDoubles(); | 146 void SaveCallerDoubles(); |
| 147 void RestoreCallerDoubles(); | 147 void RestoreCallerDoubles(); |
| 148 | 148 |
| 149 // Code generation passes. Returns true if code generation should | 149 // Code generation passes. Returns true if code generation should |
| 150 // continue. | 150 // continue. |
| 151 void GenerateBodyInstructionPre(LInstruction* instr) OVERRIDE; | 151 void GenerateBodyInstructionPre(LInstruction* instr) override; |
| 152 void GenerateBodyInstructionPost(LInstruction* instr) OVERRIDE; | 152 void GenerateBodyInstructionPost(LInstruction* instr) override; |
| 153 bool GeneratePrologue(); | 153 bool GeneratePrologue(); |
| 154 bool GenerateDeferredCode(); | 154 bool GenerateDeferredCode(); |
| 155 bool GenerateJumpTable(); | 155 bool GenerateJumpTable(); |
| 156 bool GenerateSafepointTable(); | 156 bool GenerateSafepointTable(); |
| 157 | 157 |
| 158 // Generates the custom OSR entrypoint and sets the osr_pc_offset. | 158 // Generates the custom OSR entrypoint and sets the osr_pc_offset. |
| 159 void GenerateOsrPrologue(); | 159 void GenerateOsrPrologue(); |
| 160 | 160 |
| 161 enum SafepointMode { | 161 enum SafepointMode { |
| 162 RECORD_SIMPLE_SAFEPOINT, | 162 RECORD_SIMPLE_SAFEPOINT, |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 void RecordSafepoint(LPointerMap* pointers, | 246 void RecordSafepoint(LPointerMap* pointers, |
| 247 Safepoint::Kind kind, | 247 Safepoint::Kind kind, |
| 248 int arguments, | 248 int arguments, |
| 249 Safepoint::DeoptMode mode); | 249 Safepoint::DeoptMode mode); |
| 250 void RecordSafepoint(LPointerMap* pointers, Safepoint::DeoptMode mode); | 250 void RecordSafepoint(LPointerMap* pointers, Safepoint::DeoptMode mode); |
| 251 void RecordSafepoint(Safepoint::DeoptMode mode); | 251 void RecordSafepoint(Safepoint::DeoptMode mode); |
| 252 void RecordSafepointWithRegisters(LPointerMap* pointers, | 252 void RecordSafepointWithRegisters(LPointerMap* pointers, |
| 253 int arguments, | 253 int arguments, |
| 254 Safepoint::DeoptMode mode); | 254 Safepoint::DeoptMode mode); |
| 255 | 255 |
| 256 void RecordAndWritePosition(int position) OVERRIDE; | 256 void RecordAndWritePosition(int position) override; |
| 257 | 257 |
| 258 static Condition TokenToCondition(Token::Value op, bool is_unsigned); | 258 static Condition TokenToCondition(Token::Value op, bool is_unsigned); |
| 259 void EmitGoto(int block); | 259 void EmitGoto(int block); |
| 260 | 260 |
| 261 // EmitBranch expects to be the last instruction of a block. | 261 // EmitBranch expects to be the last instruction of a block. |
| 262 template<class InstrType> | 262 template<class InstrType> |
| 263 void EmitBranch(InstrType instr, Condition cc); | 263 void EmitBranch(InstrType instr, Condition cc); |
| 264 template<class InstrType> | 264 template<class InstrType> |
| 265 void EmitFalseBranch(InstrType instr, Condition cc); | 265 void EmitFalseBranch(InstrType instr, Condition cc); |
| 266 void EmitNumberUntagD(LNumberUntagD* instr, Register input, Register temp, | 266 void EmitNumberUntagD(LNumberUntagD* instr, Register input, Register temp, |
| (...skipping 25 matching lines...) Expand all Loading... |
| 292 void EmitIsConstructCall(Register temp); | 292 void EmitIsConstructCall(Register temp); |
| 293 | 293 |
| 294 // Emits optimized code to deep-copy the contents of statically known | 294 // Emits optimized code to deep-copy the contents of statically known |
| 295 // object graphs (e.g. object literal boilerplate). | 295 // object graphs (e.g. object literal boilerplate). |
| 296 void EmitDeepCopy(Handle<JSObject> object, | 296 void EmitDeepCopy(Handle<JSObject> object, |
| 297 Register result, | 297 Register result, |
| 298 Register source, | 298 Register source, |
| 299 int* offset, | 299 int* offset, |
| 300 AllocationSiteMode mode); | 300 AllocationSiteMode mode); |
| 301 | 301 |
| 302 void EnsureSpaceForLazyDeopt(int space_needed) OVERRIDE; | 302 void EnsureSpaceForLazyDeopt(int space_needed) override; |
| 303 void DoLoadKeyedExternalArray(LLoadKeyed* instr); | 303 void DoLoadKeyedExternalArray(LLoadKeyed* instr); |
| 304 void DoLoadKeyedFixedDoubleArray(LLoadKeyed* instr); | 304 void DoLoadKeyedFixedDoubleArray(LLoadKeyed* instr); |
| 305 void DoLoadKeyedFixedArray(LLoadKeyed* instr); | 305 void DoLoadKeyedFixedArray(LLoadKeyed* instr); |
| 306 void DoStoreKeyedExternalArray(LStoreKeyed* instr); | 306 void DoStoreKeyedExternalArray(LStoreKeyed* instr); |
| 307 void DoStoreKeyedFixedDoubleArray(LStoreKeyed* instr); | 307 void DoStoreKeyedFixedDoubleArray(LStoreKeyed* instr); |
| 308 void DoStoreKeyedFixedArray(LStoreKeyed* instr); | 308 void DoStoreKeyedFixedArray(LStoreKeyed* instr); |
| 309 | 309 |
| 310 template <class T> | 310 template <class T> |
| 311 void EmitVectorLoadICRegisters(T* instr); | 311 void EmitVectorLoadICRegisters(T* instr); |
| 312 | 312 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 340 | 340 |
| 341 // Builder that keeps track of safepoints in the code. The table | 341 // Builder that keeps track of safepoints in the code. The table |
| 342 // itself is emitted at the end of the generated code. | 342 // itself is emitted at the end of the generated code. |
| 343 SafepointTableBuilder safepoints_; | 343 SafepointTableBuilder safepoints_; |
| 344 | 344 |
| 345 // Compiler from a set of parallel moves to a sequential list of moves. | 345 // Compiler from a set of parallel moves to a sequential list of moves. |
| 346 LGapResolver resolver_; | 346 LGapResolver resolver_; |
| 347 | 347 |
| 348 Safepoint::Kind expected_safepoint_kind_; | 348 Safepoint::Kind expected_safepoint_kind_; |
| 349 | 349 |
| 350 class PushSafepointRegistersScope FINAL BASE_EMBEDDED { | 350 class PushSafepointRegistersScope final BASE_EMBEDDED { |
| 351 public: | 351 public: |
| 352 explicit PushSafepointRegistersScope(LCodeGen* codegen) | 352 explicit PushSafepointRegistersScope(LCodeGen* codegen) |
| 353 : codegen_(codegen) { | 353 : codegen_(codegen) { |
| 354 DCHECK(codegen_->expected_safepoint_kind_ == Safepoint::kSimple); | 354 DCHECK(codegen_->expected_safepoint_kind_ == Safepoint::kSimple); |
| 355 codegen_->masm_->PushSafepointRegisters(); | 355 codegen_->masm_->PushSafepointRegisters(); |
| 356 codegen_->expected_safepoint_kind_ = Safepoint::kWithRegisters; | 356 codegen_->expected_safepoint_kind_ = Safepoint::kWithRegisters; |
| 357 DCHECK(codegen_->info()->is_calling()); | 357 DCHECK(codegen_->info()->is_calling()); |
| 358 } | 358 } |
| 359 | 359 |
| 360 ~PushSafepointRegistersScope() { | 360 ~PushSafepointRegistersScope() { |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 402 Label entry_; | 402 Label entry_; |
| 403 Label exit_; | 403 Label exit_; |
| 404 Label* external_exit_; | 404 Label* external_exit_; |
| 405 Label done_; | 405 Label done_; |
| 406 int instruction_index_; | 406 int instruction_index_; |
| 407 }; | 407 }; |
| 408 | 408 |
| 409 } } // namespace v8::internal | 409 } } // namespace v8::internal |
| 410 | 410 |
| 411 #endif // V8_IA32_LITHIUM_CODEGEN_IA32_H_ | 411 #endif // V8_IA32_LITHIUM_CODEGEN_IA32_H_ |
| OLD | NEW |