Index: src/mips64/lithium-codegen-mips64.h |
diff --git a/src/mips64/lithium-codegen-mips64.h b/src/mips64/lithium-codegen-mips64.h |
index b2f8497b86d0a93242735272953c420aaabb5403..d7f37a4a23985a98848af70d4177e2b743fab08c 100644 |
--- a/src/mips64/lithium-codegen-mips64.h |
+++ b/src/mips64/lithium-codegen-mips64.h |
@@ -270,9 +270,6 @@ class LCodeGen: public LCodeGenBase { |
void RecordSafepointWithRegisters(LPointerMap* pointers, |
int arguments, |
Safepoint::DeoptMode mode); |
- void RecordSafepointWithRegistersAndDoubles(LPointerMap* pointers, |
- int arguments, |
- Safepoint::DeoptMode mode); |
void RecordAndWritePosition(int position) V8_OVERRIDE; |
@@ -387,56 +384,24 @@ class LCodeGen: public LCodeGenBase { |
Safepoint::Kind expected_safepoint_kind_; |
- class PushSafepointRegistersScope V8_FINAL BASE_EMBEDDED { |
+ class PushSafepointRegistersScope V8_FINAL BASE_EMBEDDED { |
public: |
- PushSafepointRegistersScope(LCodeGen* codegen, |
- Safepoint::Kind kind) |
+ explicit PushSafepointRegistersScope(LCodeGen* codegen) |
: codegen_(codegen) { |
ASSERT(codegen_->info()->is_calling()); |
ASSERT(codegen_->expected_safepoint_kind_ == Safepoint::kSimple); |
- codegen_->expected_safepoint_kind_ = kind; |
- |
- switch (codegen_->expected_safepoint_kind_) { |
- case Safepoint::kWithRegisters: { |
- StoreRegistersStateStub stub1(codegen_->masm_->isolate(), |
- kDontSaveFPRegs); |
- codegen_->masm_->push(ra); |
- codegen_->masm_->CallStub(&stub1); |
- break; |
- } |
- case Safepoint::kWithRegistersAndDoubles: { |
- StoreRegistersStateStub stub2(codegen_->masm_->isolate(), |
- kSaveFPRegs); |
- codegen_->masm_->push(ra); |
- codegen_->masm_->CallStub(&stub2); |
- break; |
- } |
- default: |
- UNREACHABLE(); |
- } |
+ codegen_->expected_safepoint_kind_ = Safepoint::kWithRegisters; |
+ |
+ StoreRegistersStateStub stub(codegen_->isolate()); |
+ codegen_->masm_->push(ra); |
+ codegen_->masm_->CallStub(&stub); |
} |
~PushSafepointRegistersScope() { |
- Safepoint::Kind kind = codegen_->expected_safepoint_kind_; |
- ASSERT((kind & Safepoint::kWithRegisters) != 0); |
- switch (kind) { |
- case Safepoint::kWithRegisters: { |
- RestoreRegistersStateStub stub1(codegen_->masm_->isolate(), |
- kDontSaveFPRegs); |
- codegen_->masm_->push(ra); |
- codegen_->masm_->CallStub(&stub1); |
- break; |
- } |
- case Safepoint::kWithRegistersAndDoubles: { |
- RestoreRegistersStateStub stub2(codegen_->masm_->isolate(), |
- kSaveFPRegs); |
- codegen_->masm_->push(ra); |
- codegen_->masm_->CallStub(&stub2); |
- break; |
- } |
- default: |
- UNREACHABLE(); |
- } |
+ ASSERT(codegen_->expected_safepoint_kind_ == Safepoint::kWithRegisters); |
+ RestoreRegistersStateStub stub(codegen_->isolate()); |
+ codegen_->masm_->push(ra); |
+ codegen_->masm_->CallStub(&stub); |
codegen_->expected_safepoint_kind_ = Safepoint::kSimple; |
} |