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

Unified Diff: runtime/vm/intermediate_language.cc

Issue 26823006: Record a correct deoptimization environment for slow-path code. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Use an environment value's representation to decide its size. Created 7 years, 2 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
Index: runtime/vm/intermediate_language.cc
diff --git a/runtime/vm/intermediate_language.cc b/runtime/vm/intermediate_language.cc
index a75ba71867215d926d681901a156354bed1b6452..4593571730e22adf99e4720376cd22e004046c15 100644
--- a/runtime/vm/intermediate_language.cc
+++ b/runtime/vm/intermediate_language.cc
@@ -1923,8 +1923,16 @@ Environment* Environment::DeepCopy(intptr_t length) const {
deopt_id_,
function_,
(outer_ == NULL) ? NULL : outer_->DeepCopy());
+ if (locations_ != NULL) {
+ Location* new_locations =
+ Isolate::Current()->current_zone()->Alloc<Location>(length);
+ copy->set_locations(new_locations);
+ }
for (intptr_t i = 0; i < length; ++i) {
copy->values_.Add(values_[i]->Copy());
+ if (locations_ != NULL) {
+ copy->locations_[i] = locations_[i];
+ }
}
return copy;
}

Powered by Google App Engine
This is Rietveld 408576698