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

Unified Diff: src/crankshaft/lithium.cc

Issue 1708583002: Revert of More simplification and unification of frame handling (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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/crankshaft/lithium.h ('k') | src/crankshaft/mips/lithium-codegen-mips.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/lithium.cc
diff --git a/src/crankshaft/lithium.cc b/src/crankshaft/lithium.cc
index 677639095a522f64a9729a6100ad5f8472df79d6..82ad6962be43e121badea6907aa1e62f9b5010f2 100644
--- a/src/crankshaft/lithium.cc
+++ b/src/crankshaft/lithium.cc
@@ -246,9 +246,22 @@
stream->Add("}");
}
+
+int StackSlotOffset(int index) {
+ if (index >= 0) {
+ // Local or spill slot. Skip the frame pointer, function, and
+ // context in the fixed part of the frame.
+ return -(index + 1) * kPointerSize -
+ StandardFrameConstants::kFixedFrameSizeFromFp;
+ } else {
+ // Incoming parameter. Skip the return address.
+ return -(index + 1) * kPointerSize + kFPOnStackSize + kPCOnStackSize;
+ }
+}
+
+
LChunk::LChunk(CompilationInfo* info, HGraph* graph)
- : base_frame_slots_(StandardFrameConstants::kFixedFrameSize / kPointerSize),
- current_frame_slots_(base_frame_slots_),
+ : spill_slot_count_(0),
info_(info),
graph_(graph),
instructions_(32, info->zone()),
@@ -256,6 +269,7 @@
inlined_functions_(1, info->zone()),
deprecation_dependencies_(32, info->zone()),
stability_dependencies_(8, info->zone()) {}
+
LLabel* LChunk::GetLabel(int block_id) const {
HBasicBlock* block = graph_->blocks()->at(block_id);
@@ -481,9 +495,9 @@
while (!iterator.Done()) {
if (info()->saves_caller_doubles()) {
if (kDoubleSize == kPointerSize * 2) {
- current_frame_slots_ += 2;
+ spill_slot_count_ += 2;
} else {
- current_frame_slots_++;
+ spill_slot_count_++;
}
}
iterator.Advance();
« no previous file with comments | « src/crankshaft/lithium.h ('k') | src/crankshaft/mips/lithium-codegen-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698