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

Unified Diff: runtime/vm/intermediate_language.cc

Issue 595673002: Reduce number of times a deopt-id is computed. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 3 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 | « 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
===================================================================
--- runtime/vm/intermediate_language.cc (revision 40715)
+++ runtime/vm/intermediate_language.cc (working copy)
@@ -66,6 +66,7 @@
const ZoneGrowableArray<const ICData*>& ic_data_array) const {
// The deopt_id can be outside the range of the IC data array for
// computations added in the optimizing compiler.
+ ASSERT(deopt_id_ != Isolate::kNoDeoptId);
if (deopt_id_ < ic_data_array.length()) {
return ic_data_array[deopt_id_];
}
@@ -2682,6 +2683,7 @@
bool needs_number_check)
: ComparisonInstr(token_pos, kind, left, right),
needs_number_check_(needs_number_check) {
+ deopt_id_ = Isolate::Current()->GetNextDeoptId();
ASSERT((kind == Token::kEQ_STRICT) || (kind == Token::kNE_STRICT));
}
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698