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_ARM_LITHIUM_CODEGEN_ARM_H_ | 5 #ifndef V8_ARM_LITHIUM_CODEGEN_ARM_H_ |
6 #define V8_ARM_LITHIUM_CODEGEN_ARM_H_ | 6 #define V8_ARM_LITHIUM_CODEGEN_ARM_H_ |
7 | 7 |
8 #include "src/arm/lithium-arm.h" | 8 #include "src/arm/lithium-arm.h" |
9 | 9 |
10 #include "src/arm/lithium-gap-resolver-arm.h" | 10 #include "src/arm/lithium-gap-resolver-arm.h" |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 | 162 |
163 int GetStackSlotCount() const { return chunk()->spill_slot_count(); } | 163 int GetStackSlotCount() const { return chunk()->spill_slot_count(); } |
164 | 164 |
165 void AddDeferredCode(LDeferredCode* code) { deferred_.Add(code, zone()); } | 165 void AddDeferredCode(LDeferredCode* code) { deferred_.Add(code, zone()); } |
166 | 166 |
167 void SaveCallerDoubles(); | 167 void SaveCallerDoubles(); |
168 void RestoreCallerDoubles(); | 168 void RestoreCallerDoubles(); |
169 | 169 |
170 // Code generation passes. Returns true if code generation should | 170 // Code generation passes. Returns true if code generation should |
171 // continue. | 171 // continue. |
172 void GenerateBodyInstructionPre(LInstruction* instr) OVERRIDE; | 172 void GenerateBodyInstructionPre(LInstruction* instr) override; |
173 bool GeneratePrologue(); | 173 bool GeneratePrologue(); |
174 bool GenerateDeferredCode(); | 174 bool GenerateDeferredCode(); |
175 bool GenerateJumpTable(); | 175 bool GenerateJumpTable(); |
176 bool GenerateSafepointTable(); | 176 bool GenerateSafepointTable(); |
177 | 177 |
178 // Generates the custom OSR entrypoint and sets the osr_pc_offset. | 178 // Generates the custom OSR entrypoint and sets the osr_pc_offset. |
179 void GenerateOsrPrologue(); | 179 void GenerateOsrPrologue(); |
180 | 180 |
181 enum SafepointMode { | 181 enum SafepointMode { |
182 RECORD_SIMPLE_SAFEPOINT, | 182 RECORD_SIMPLE_SAFEPOINT, |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 void RecordSafepoint(LPointerMap* pointers, | 258 void RecordSafepoint(LPointerMap* pointers, |
259 Safepoint::Kind kind, | 259 Safepoint::Kind kind, |
260 int arguments, | 260 int arguments, |
261 Safepoint::DeoptMode mode); | 261 Safepoint::DeoptMode mode); |
262 void RecordSafepoint(LPointerMap* pointers, Safepoint::DeoptMode mode); | 262 void RecordSafepoint(LPointerMap* pointers, Safepoint::DeoptMode mode); |
263 void RecordSafepoint(Safepoint::DeoptMode mode); | 263 void RecordSafepoint(Safepoint::DeoptMode mode); |
264 void RecordSafepointWithRegisters(LPointerMap* pointers, | 264 void RecordSafepointWithRegisters(LPointerMap* pointers, |
265 int arguments, | 265 int arguments, |
266 Safepoint::DeoptMode mode); | 266 Safepoint::DeoptMode mode); |
267 | 267 |
268 void RecordAndWritePosition(int position) OVERRIDE; | 268 void RecordAndWritePosition(int position) override; |
269 | 269 |
270 static Condition TokenToCondition(Token::Value op, bool is_unsigned); | 270 static Condition TokenToCondition(Token::Value op, bool is_unsigned); |
271 void EmitGoto(int block); | 271 void EmitGoto(int block); |
272 | 272 |
273 // EmitBranch expects to be the last instruction of a block. | 273 // EmitBranch expects to be the last instruction of a block. |
274 template<class InstrType> | 274 template<class InstrType> |
275 void EmitBranch(InstrType instr, Condition condition); | 275 void EmitBranch(InstrType instr, Condition condition); |
276 template<class InstrType> | 276 template<class InstrType> |
277 void EmitFalseBranch(InstrType instr, Condition condition); | 277 void EmitFalseBranch(InstrType instr, Condition condition); |
278 void EmitNumberUntagD(LNumberUntagD* instr, Register input, | 278 void EmitNumberUntagD(LNumberUntagD* instr, Register input, |
(...skipping 28 matching lines...) Expand all Loading... |
307 void EmitIsConstructCall(Register temp1, Register temp2); | 307 void EmitIsConstructCall(Register temp1, Register temp2); |
308 | 308 |
309 // Emits optimized code to deep-copy the contents of statically known | 309 // Emits optimized code to deep-copy the contents of statically known |
310 // object graphs (e.g. object literal boilerplate). | 310 // object graphs (e.g. object literal boilerplate). |
311 void EmitDeepCopy(Handle<JSObject> object, | 311 void EmitDeepCopy(Handle<JSObject> object, |
312 Register result, | 312 Register result, |
313 Register source, | 313 Register source, |
314 int* offset, | 314 int* offset, |
315 AllocationSiteMode mode); | 315 AllocationSiteMode mode); |
316 | 316 |
317 void EnsureSpaceForLazyDeopt(int space_needed) OVERRIDE; | 317 void EnsureSpaceForLazyDeopt(int space_needed) override; |
318 void DoLoadKeyedExternalArray(LLoadKeyed* instr); | 318 void DoLoadKeyedExternalArray(LLoadKeyed* instr); |
319 void DoLoadKeyedFixedDoubleArray(LLoadKeyed* instr); | 319 void DoLoadKeyedFixedDoubleArray(LLoadKeyed* instr); |
320 void DoLoadKeyedFixedArray(LLoadKeyed* instr); | 320 void DoLoadKeyedFixedArray(LLoadKeyed* instr); |
321 void DoStoreKeyedExternalArray(LStoreKeyed* instr); | 321 void DoStoreKeyedExternalArray(LStoreKeyed* instr); |
322 void DoStoreKeyedFixedDoubleArray(LStoreKeyed* instr); | 322 void DoStoreKeyedFixedDoubleArray(LStoreKeyed* instr); |
323 void DoStoreKeyedFixedArray(LStoreKeyed* instr); | 323 void DoStoreKeyedFixedArray(LStoreKeyed* instr); |
324 | 324 |
325 template <class T> | 325 template <class T> |
326 void EmitVectorLoadICRegisters(T* instr); | 326 void EmitVectorLoadICRegisters(T* instr); |
327 | 327 |
328 ZoneList<LEnvironment*> deoptimizations_; | 328 ZoneList<LEnvironment*> deoptimizations_; |
329 ZoneList<Deoptimizer::JumpTableEntry> jump_table_; | 329 ZoneList<Deoptimizer::JumpTableEntry> jump_table_; |
330 ZoneList<Handle<Object> > deoptimization_literals_; | 330 ZoneList<Handle<Object> > deoptimization_literals_; |
331 int inlined_function_count_; | 331 int inlined_function_count_; |
332 Scope* const scope_; | 332 Scope* const scope_; |
333 TranslationBuffer translations_; | 333 TranslationBuffer translations_; |
334 ZoneList<LDeferredCode*> deferred_; | 334 ZoneList<LDeferredCode*> deferred_; |
335 int osr_pc_offset_; | 335 int osr_pc_offset_; |
336 bool frame_is_built_; | 336 bool frame_is_built_; |
337 | 337 |
338 // Builder that keeps track of safepoints in the code. The table | 338 // Builder that keeps track of safepoints in the code. The table |
339 // itself is emitted at the end of the generated code. | 339 // itself is emitted at the end of the generated code. |
340 SafepointTableBuilder safepoints_; | 340 SafepointTableBuilder safepoints_; |
341 | 341 |
342 // Compiler from a set of parallel moves to a sequential list of moves. | 342 // Compiler from a set of parallel moves to a sequential list of moves. |
343 LGapResolver resolver_; | 343 LGapResolver resolver_; |
344 | 344 |
345 Safepoint::Kind expected_safepoint_kind_; | 345 Safepoint::Kind expected_safepoint_kind_; |
346 | 346 |
347 class PushSafepointRegistersScope FINAL BASE_EMBEDDED { | 347 class PushSafepointRegistersScope final BASE_EMBEDDED { |
348 public: | 348 public: |
349 explicit PushSafepointRegistersScope(LCodeGen* codegen) | 349 explicit PushSafepointRegistersScope(LCodeGen* codegen) |
350 : codegen_(codegen) { | 350 : codegen_(codegen) { |
351 DCHECK(codegen_->info()->is_calling()); | 351 DCHECK(codegen_->info()->is_calling()); |
352 DCHECK(codegen_->expected_safepoint_kind_ == Safepoint::kSimple); | 352 DCHECK(codegen_->expected_safepoint_kind_ == Safepoint::kSimple); |
353 codegen_->expected_safepoint_kind_ = Safepoint::kWithRegisters; | 353 codegen_->expected_safepoint_kind_ = Safepoint::kWithRegisters; |
354 codegen_->masm_->PushSafepointRegisters(); | 354 codegen_->masm_->PushSafepointRegisters(); |
355 } | 355 } |
356 | 356 |
357 ~PushSafepointRegistersScope() { | 357 ~PushSafepointRegistersScope() { |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 LCodeGen* codegen_; | 397 LCodeGen* codegen_; |
398 Label entry_; | 398 Label entry_; |
399 Label exit_; | 399 Label exit_; |
400 Label* external_exit_; | 400 Label* external_exit_; |
401 int instruction_index_; | 401 int instruction_index_; |
402 }; | 402 }; |
403 | 403 |
404 } } // namespace v8::internal | 404 } } // namespace v8::internal |
405 | 405 |
406 #endif // V8_ARM_LITHIUM_CODEGEN_ARM_H_ | 406 #endif // V8_ARM_LITHIUM_CODEGEN_ARM_H_ |
OLD | NEW |