| OLD | NEW | 
|---|
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_ARM64_LITHIUM_CODEGEN_ARM64_H_ | 5 #ifndef V8_ARM64_LITHIUM_CODEGEN_ARM64_H_ | 
| 6 #define V8_ARM64_LITHIUM_CODEGEN_ARM64_H_ | 6 #define V8_ARM64_LITHIUM_CODEGEN_ARM64_H_ | 
| 7 | 7 | 
| 8 #include "src/arm64/lithium-arm64.h" | 8 #include "src/arm64/lithium-arm64.h" | 
| 9 | 9 | 
| 10 #include "src/arm64/lithium-gap-resolver-arm64.h" | 10 #include "src/arm64/lithium-gap-resolver-arm64.h" | 
| (...skipping 26 matching lines...) Expand all  Loading... | 
| 37         frame_is_built_(false), | 37         frame_is_built_(false), | 
| 38         safepoints_(info->zone()), | 38         safepoints_(info->zone()), | 
| 39         resolver_(this), | 39         resolver_(this), | 
| 40         expected_safepoint_kind_(Safepoint::kSimple), | 40         expected_safepoint_kind_(Safepoint::kSimple), | 
| 41         after_push_argument_(false), | 41         after_push_argument_(false), | 
| 42         inlined_arguments_(false) { | 42         inlined_arguments_(false) { | 
| 43     PopulateDeoptimizationLiteralsWithInlinedFunctions(); | 43     PopulateDeoptimizationLiteralsWithInlinedFunctions(); | 
| 44   } | 44   } | 
| 45 | 45 | 
| 46   ~LCodeGen() { | 46   ~LCodeGen() { | 
| 47     ASSERT(!after_push_argument_ || inlined_arguments_); | 47     DCHECK(!after_push_argument_ || inlined_arguments_); | 
| 48   } | 48   } | 
| 49 | 49 | 
| 50   // Simple accessors. | 50   // Simple accessors. | 
| 51   Scope* scope() const { return scope_; } | 51   Scope* scope() const { return scope_; } | 
| 52 | 52 | 
| 53   int LookupDestination(int block_id) const { | 53   int LookupDestination(int block_id) const { | 
| 54     return chunk()->LookupDestination(block_id); | 54     return chunk()->LookupDestination(block_id); | 
| 55   } | 55   } | 
| 56 | 56 | 
| 57   bool IsNextEmittedBlock(int block_id) const { | 57   bool IsNextEmittedBlock(int block_id) const { | 
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 380   // jssp is modified and we never know if we are in a block after or before | 380   // jssp is modified and we never know if we are in a block after or before | 
| 381   // the pop of the arguments (which restores jssp). | 381   // the pop of the arguments (which restores jssp). | 
| 382   bool inlined_arguments_; | 382   bool inlined_arguments_; | 
| 383 | 383 | 
| 384   int old_position_; | 384   int old_position_; | 
| 385 | 385 | 
| 386   class PushSafepointRegistersScope BASE_EMBEDDED { | 386   class PushSafepointRegistersScope BASE_EMBEDDED { | 
| 387    public: | 387    public: | 
| 388     explicit PushSafepointRegistersScope(LCodeGen* codegen) | 388     explicit PushSafepointRegistersScope(LCodeGen* codegen) | 
| 389         : codegen_(codegen) { | 389         : codegen_(codegen) { | 
| 390       ASSERT(codegen_->info()->is_calling()); | 390       DCHECK(codegen_->info()->is_calling()); | 
| 391       ASSERT(codegen_->expected_safepoint_kind_ == Safepoint::kSimple); | 391       DCHECK(codegen_->expected_safepoint_kind_ == Safepoint::kSimple); | 
| 392       codegen_->expected_safepoint_kind_ = Safepoint::kWithRegisters; | 392       codegen_->expected_safepoint_kind_ = Safepoint::kWithRegisters; | 
| 393 | 393 | 
| 394       UseScratchRegisterScope temps(codegen_->masm_); | 394       UseScratchRegisterScope temps(codegen_->masm_); | 
| 395       // Preserve the value of lr which must be saved on the stack (the call to | 395       // Preserve the value of lr which must be saved on the stack (the call to | 
| 396       // the stub will clobber it). | 396       // the stub will clobber it). | 
| 397       Register to_be_pushed_lr = | 397       Register to_be_pushed_lr = | 
| 398           temps.UnsafeAcquire(StoreRegistersStateStub::to_be_pushed_lr()); | 398           temps.UnsafeAcquire(StoreRegistersStateStub::to_be_pushed_lr()); | 
| 399       codegen_->masm_->Mov(to_be_pushed_lr, lr); | 399       codegen_->masm_->Mov(to_be_pushed_lr, lr); | 
| 400       StoreRegistersStateStub stub(codegen_->isolate()); | 400       StoreRegistersStateStub stub(codegen_->isolate()); | 
| 401       codegen_->masm_->CallStub(&stub); | 401       codegen_->masm_->CallStub(&stub); | 
| 402     } | 402     } | 
| 403 | 403 | 
| 404     ~PushSafepointRegistersScope() { | 404     ~PushSafepointRegistersScope() { | 
| 405       ASSERT(codegen_->expected_safepoint_kind_ == Safepoint::kWithRegisters); | 405       DCHECK(codegen_->expected_safepoint_kind_ == Safepoint::kWithRegisters); | 
| 406       RestoreRegistersStateStub stub(codegen_->isolate()); | 406       RestoreRegistersStateStub stub(codegen_->isolate()); | 
| 407       codegen_->masm_->CallStub(&stub); | 407       codegen_->masm_->CallStub(&stub); | 
| 408       codegen_->expected_safepoint_kind_ = Safepoint::kSimple; | 408       codegen_->expected_safepoint_kind_ = Safepoint::kSimple; | 
| 409     } | 409     } | 
| 410 | 410 | 
| 411    private: | 411    private: | 
| 412     LCodeGen* codegen_; | 412     LCodeGen* codegen_; | 
| 413   }; | 413   }; | 
| 414 | 414 | 
| 415   friend class LDeferredCode; | 415   friend class LDeferredCode; | 
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 468 | 468 | 
| 469  protected: | 469  protected: | 
| 470   MacroAssembler* masm() const { return codegen_->masm(); } | 470   MacroAssembler* masm() const { return codegen_->masm(); } | 
| 471 | 471 | 
| 472   LCodeGen* codegen_; | 472   LCodeGen* codegen_; | 
| 473 }; | 473 }; | 
| 474 | 474 | 
| 475 } }  // namespace v8::internal | 475 } }  // namespace v8::internal | 
| 476 | 476 | 
| 477 #endif  // V8_ARM64_LITHIUM_CODEGEN_ARM64_H_ | 477 #endif  // V8_ARM64_LITHIUM_CODEGEN_ARM64_H_ | 
| OLD | NEW | 
|---|