Chromium Code Reviews| Index: src/x64/lithium-codegen-x64.h |
| diff --git a/src/x64/lithium-codegen-x64.h b/src/x64/lithium-codegen-x64.h |
| index e068f14b5ad94c833b5b17a3019a00846ada9e14..7d601cdfb06eb0e0adc72a9b8457310faa477395 100644 |
| --- a/src/x64/lithium-codegen-x64.h |
| +++ b/src/x64/lithium-codegen-x64.h |
| @@ -63,6 +63,7 @@ class LCodeGen BASE_EMBEDDED { |
| deferred_(8, info->zone()), |
| osr_pc_offset_(-1), |
| last_lazy_deopt_pc_(0), |
| + frame_is_built_(false), |
| safepoints_(info->zone()), |
| resolver_(this), |
| expected_safepoint_kind_(Safepoint::kSimple) { |
| @@ -77,6 +78,15 @@ class LCodeGen BASE_EMBEDDED { |
| Heap* heap() const { return isolate()->heap(); } |
| Zone* zone() const { return zone_; } |
| + bool NeedsEagerFrame() const { |
| + return GetStackSlotCount() > 0 || |
| + info()->is_non_deferred_calling() || |
| + !info()->IsStub(); |
| + } |
| + bool NeedsDeferredFrame() const { |
| + return !NeedsEagerFrame() && info()->is_deferred_calling(); |
| + } |
| + |
| // Support for converting LOperands to assembler types. |
| Register ToRegister(LOperand* op) const; |
| XMMRegister ToDoubleRegister(LOperand* op) const; |
| @@ -110,7 +120,7 @@ class LCodeGen BASE_EMBEDDED { |
| Label* map_check); |
| void DoCheckMapCommon(Register reg, Handle<Map> map, |
| - CompareMapMode mode, LEnvironment* env); |
| + CompareMapMode mode, LInstruction* instr); |
| // Parallel move support. |
| void DoParallelMove(LParallelMove* move); |
| @@ -158,7 +168,7 @@ class LCodeGen BASE_EMBEDDED { |
| Register scratch); |
| int GetStackSlotCount() const { return chunk()->spill_slot_count(); } |
| - int GetParameterCount() const { return scope()->num_parameters(); } |
| + int GetParameterCount() const { return info()->num_parameters(); } |
| void Abort(const char* reason); |
| void Comment(const char* format, ...); |
| @@ -327,11 +337,15 @@ class LCodeGen BASE_EMBEDDED { |
| int* offset); |
| struct JumpTableEntry { |
| - explicit inline JumpTableEntry(Address entry) |
| + explicit inline JumpTableEntry(Address entry, bool frame, bool is_lazy) |
|
Jakob Kummerow
2012/11/28 16:28:22
nit: no need for explicit
danno
2012/11/30 16:23:24
Done.
|
| : label(), |
| - address(entry) { } |
| + address(entry), |
| + needs_frame(frame), |
| + is_lazy_deopt(is_lazy) { } |
| Label label; |
| Address address; |
| + bool needs_frame; |
| + bool is_lazy_deopt; |
| }; |
| void EnsureSpaceForLazyDeopt(int space_needed); |
| @@ -360,6 +374,7 @@ class LCodeGen BASE_EMBEDDED { |
| ZoneList<LDeferredCode*> deferred_; |
| int osr_pc_offset_; |
| int last_lazy_deopt_pc_; |
| + bool frame_is_built_; |
| // Builder that keeps track of safepoints in the code. The table |
| // itself is emitted at the end of the generated code. |
| @@ -374,6 +389,7 @@ class LCodeGen BASE_EMBEDDED { |
| public: |
| explicit PushSafepointRegistersScope(LCodeGen* codegen) |
| : codegen_(codegen) { |
| + ASSERT(codegen_->info()->is_calling()); |
| ASSERT(codegen_->expected_safepoint_kind_ == Safepoint::kSimple); |
| codegen_->masm_->PushSafepointRegisters(); |
| codegen_->expected_safepoint_kind_ = Safepoint::kWithRegisters; |