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

Unified Diff: runtime/vm/intermediate_language.cc

Issue 23190029: Cleanup of deoptimization environment copying functions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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
« runtime/vm/intermediate_language.h ('K') | « runtime/vm/intermediate_language.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.cc
diff --git a/runtime/vm/intermediate_language.cc b/runtime/vm/intermediate_language.cc
index 06c3d3ac51f12bc46849dcf5088c57c2720fa7ed..1a0742f66c2b69216ae21c713804fd307e96fee2 100644
--- a/runtime/vm/intermediate_language.cc
+++ b/runtime/vm/intermediate_language.cc
@@ -674,6 +674,7 @@ void Instruction::InheritDeoptTarget(Instruction* other) {
void BranchInstr::InheritDeoptTarget(Instruction* other) {
+ ASSERT(env() == NULL);
Instruction::InheritDeoptTarget(other);
comparison()->SetDeoptId(GetDeoptId());
}
@@ -1883,20 +1884,14 @@ Environment* Environment::From(const GrowableArray<Definition*>& definitions,
}
-Environment* Environment::DeepCopy() const {
- return (this == NULL) ? NULL : DeepCopy(Length());
-}
-
-
Environment* Environment::DeepCopy(intptr_t length) const {
ASSERT(length <= values_.length());
- if (this == NULL) return NULL;
Environment* copy =
new Environment(length,
fixed_parameter_count_,
deopt_id_,
function_,
- outer_->DeepCopy());
+ (outer_ == NULL) ? NULL : outer_->DeepCopy());
for (intptr_t i = 0; i < length; ++i) {
copy->values_.Add(values_[i]->Copy());
}
« runtime/vm/intermediate_language.h ('K') | « runtime/vm/intermediate_language.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698