| 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_CRANKSHAFT_MIPS64_LITHIUM_CODEGEN_MIPS_H_ | 5 #ifndef V8_CRANKSHAFT_MIPS64_LITHIUM_CODEGEN_MIPS_H_ |
| 6 #define V8_CRANKSHAFT_MIPS64_LITHIUM_CODEGEN_MIPS_H_ | 6 #define V8_CRANKSHAFT_MIPS64_LITHIUM_CODEGEN_MIPS_H_ |
| 7 | 7 |
| 8 #include "src/ast/scopes.h" | 8 #include "src/ast/scopes.h" |
| 9 #include "src/crankshaft/lithium-codegen.h" | 9 #include "src/crankshaft/lithium-codegen.h" |
| 10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h" | 10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h" |
| (...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 // itself is emitted at the end of the generated code. | 353 // itself is emitted at the end of the generated code. |
| 354 SafepointTableBuilder safepoints_; | 354 SafepointTableBuilder safepoints_; |
| 355 | 355 |
| 356 // Compiler from a set of parallel moves to a sequential list of moves. | 356 // Compiler from a set of parallel moves to a sequential list of moves. |
| 357 LGapResolver resolver_; | 357 LGapResolver resolver_; |
| 358 | 358 |
| 359 Safepoint::Kind expected_safepoint_kind_; | 359 Safepoint::Kind expected_safepoint_kind_; |
| 360 | 360 |
| 361 class PushSafepointRegistersScope final BASE_EMBEDDED { | 361 class PushSafepointRegistersScope final BASE_EMBEDDED { |
| 362 public: | 362 public: |
| 363 explicit PushSafepointRegistersScope(LCodeGen* codegen) | 363 explicit PushSafepointRegistersScope(LCodeGen* codegen); |
| 364 : codegen_(codegen) { | |
| 365 DCHECK(codegen_->info()->is_calling()); | |
| 366 DCHECK(codegen_->expected_safepoint_kind_ == Safepoint::kSimple); | |
| 367 codegen_->expected_safepoint_kind_ = Safepoint::kWithRegisters; | |
| 368 | 364 |
| 369 StoreRegistersStateStub stub(codegen_->isolate()); | 365 ~PushSafepointRegistersScope(); |
| 370 codegen_->masm_->push(ra); | |
| 371 codegen_->masm_->CallStub(&stub); | |
| 372 } | |
| 373 | |
| 374 ~PushSafepointRegistersScope() { | |
| 375 DCHECK(codegen_->expected_safepoint_kind_ == Safepoint::kWithRegisters); | |
| 376 RestoreRegistersStateStub stub(codegen_->isolate()); | |
| 377 codegen_->masm_->push(ra); | |
| 378 codegen_->masm_->CallStub(&stub); | |
| 379 codegen_->expected_safepoint_kind_ = Safepoint::kSimple; | |
| 380 } | |
| 381 | 366 |
| 382 private: | 367 private: |
| 383 LCodeGen* codegen_; | 368 LCodeGen* codegen_; |
| 384 }; | 369 }; |
| 385 | 370 |
| 386 friend class LDeferredCode; | 371 friend class LDeferredCode; |
| 387 friend class LEnvironment; | 372 friend class LEnvironment; |
| 388 friend class SafepointGenerator; | 373 friend class SafepointGenerator; |
| 389 DISALLOW_COPY_AND_ASSIGN(LCodeGen); | 374 DISALLOW_COPY_AND_ASSIGN(LCodeGen); |
| 390 }; | 375 }; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 417 Label entry_; | 402 Label entry_; |
| 418 Label exit_; | 403 Label exit_; |
| 419 Label* external_exit_; | 404 Label* external_exit_; |
| 420 int instruction_index_; | 405 int instruction_index_; |
| 421 }; | 406 }; |
| 422 | 407 |
| 423 } // namespace internal | 408 } // namespace internal |
| 424 } // namespace v8 | 409 } // namespace v8 |
| 425 | 410 |
| 426 #endif // V8_CRANKSHAFT_MIPS64_LITHIUM_CODEGEN_MIPS_H_ | 411 #endif // V8_CRANKSHAFT_MIPS64_LITHIUM_CODEGEN_MIPS_H_ |
| OLD | NEW |