Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(126)

Unified Diff: src/compiler/frame.cc

Issue 1775323002: [turbofan] Frame elision for code stubs (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/frame.h ('k') | src/compiler/frame-elider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/frame.cc
diff --git a/src/compiler/frame.cc b/src/compiler/frame.cc
index ace0f7c8b3f59190fe35c47c3cd67545c3376f05..3d93e1528f503037b5dd54941e9caf97a91a00c4 100644
--- a/src/compiler/frame.cc
+++ b/src/compiler/frame.cc
@@ -13,9 +13,7 @@ namespace internal {
namespace compiler {
Frame::Frame(int fixed_frame_size_in_slots, const CallDescriptor* descriptor)
- : needs_frame_((descriptor != nullptr) &&
- descriptor->RequiresFrameAsIncoming()),
- frame_slot_count_(fixed_frame_size_in_slots),
+ : frame_slot_count_(fixed_frame_size_in_slots),
callee_saved_slot_count_(0),
spill_slot_count_(0),
allocated_registers_(nullptr),
@@ -34,8 +32,13 @@ int Frame::AlignFrame(int alignment) {
return delta;
}
+void FrameAccessState::MarkHasFrame(bool state) {
+ has_frame_ = state;
+ SetFrameAccessToDefault();
+}
+
void FrameAccessState::SetFrameAccessToDefault() {
- if (frame()->needs_frame() && !FLAG_turbo_sp_frame_access) {
+ if (has_frame() && !FLAG_turbo_sp_frame_access) {
SetFrameAccessToFP();
} else {
SetFrameAccessToSP();
@@ -46,7 +49,6 @@ void FrameAccessState::SetFrameAccessToDefault() {
FrameOffset FrameAccessState::GetFrameOffset(int spill_slot) const {
const int frame_offset = FrameSlotToFPOffset(spill_slot);
if (access_frame_with_fp()) {
- DCHECK(frame()->needs_frame());
return FrameOffset::FromFramePointer(frame_offset);
} else {
// No frame. Retrieve all parameters relative to stack pointer.
« no previous file with comments | « src/compiler/frame.h ('k') | src/compiler/frame-elider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698