Index: src/hydrogen-instructions.cc |
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc |
index 7c419dc8144fe0ea3bb89dad4e4f809fa7ecaba1..45e2578b4b8460ee7309f97311846251c7ddcaf3 100644 |
--- a/src/hydrogen-instructions.cc |
+++ b/src/hydrogen-instructions.cc |
@@ -2289,6 +2289,21 @@ void HSimulate::PrintDataTo(StringStream* stream) { |
} |
+void HSimulate::ReplayEnvironment(HEnvironment* env) { |
+ ASSERT(env != NULL); |
+ env->set_ast_id(ast_id()); |
+ env->Drop(pop_count()); |
+ for (int i = values()->length() - 1; i >= 0; --i) { |
+ HValue* value = values()->at(i); |
+ if (HasAssignedIndexAt(i)) { |
+ env->Bind(GetAssignedIndexAt(i), value); |
+ } else { |
+ env->Push(value); |
+ } |
+ } |
+} |
+ |
+ |
// Replay captured objects by replacing all captured objects with the |
// same capture id in the current and all outer environments. |
void HCapturedObject::ReplayEnvironment(HEnvironment* env) { |