Index: src/compiler.cc |
diff --git a/src/compiler.cc b/src/compiler.cc |
index b9e13c166172595b298ae227348f5a40a35dca20..af2c78cf74a0d68593e666a59ba67d5fca9509e7 100644 |
--- a/src/compiler.cc |
+++ b/src/compiler.cc |
@@ -243,6 +243,33 @@ bool CompilationInfo::ShouldSelfOptimize() { |
} |
+void CompilationInfo::ProcessFeedbackSlots() { |
+ // Scope analysis must have been done. |
+ if (function()->slot_count() >= 0) { |
mvstanton
2014/01/30 15:13:41
turn this to an assedrt.
mvstanton
2014/01/30 17:37:41
Done.
|
+ // The work was already done. |
+ return; |
+ } |
+ |
+ if (function()->slot_nodes() == NULL) { |
+ function()->set_slot_count(0); |
+ return; |
+ } |
+ |
+ int current_slot = 0; |
+ for (int i = 0; i < function()->slot_nodes()->length(); i++) { |
+ FeedbackSlotInterface* slot_interface = |
+ function()->slot_nodes()->at(i); |
+ int count = slot_interface->GetFeedbackSlotCount(isolate()); |
+ if (count > 0) { |
+ slot_interface->SetFirstFeedbackSlot(current_slot); |
+ current_slot += count; |
+ } |
+ } |
+ |
+ function()->set_slot_count(current_slot); |
+} |
+ |
+ |
class HOptimizedGraphBuilderWithPositions: public HOptimizedGraphBuilder { |
public: |
explicit HOptimizedGraphBuilderWithPositions(CompilationInfo* info) |