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

Unified Diff: runtime/vm/opt_code_generator_ia32.cc

Issue 10020058: Fix a crash when optimizing instance field increment: if the increment operation gets interrupted b… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 8 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 | « no previous file | tests/language/src/ExceptionInIncrement.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/opt_code_generator_ia32.cc
===================================================================
--- runtime/vm/opt_code_generator_ia32.cc (revision 6435)
+++ runtime/vm/opt_code_generator_ia32.cc (working copy)
@@ -1445,7 +1445,12 @@
VisitLoadOne(node->receiver(), EBX);
__ pushl(EBX); // Duplicate receiver (preserve for setter).
const ICData& ic_data = node->ICDataAtId(node->id());
- if (ic_data.NumberOfChecks() == 0) {
+ // Deoptimize if either this node has naver been visited before or
regis 2012/04/11 22:13:04 naver -> never
srdjan 2012/04/11 22:16:37 Done.
+ // if the classes collected at getter and setter do not match (can happen
+ // if the increment is 'interrupted' by an exception).
+ if ((ic_data.NumberOfChecks() == 0) ||
+ !HaveSameClassesInICData(node->ICDataAtId(node->getter_id()),
+ node->ICDataAtId(node->setter_id()))) {
// Deoptimization point for this node is after receiver has been
// pushed twice on stack and before the getter (above) was executed.
DeoptimizationBlob* deopt_blob =
« no previous file with comments | « no previous file | tests/language/src/ExceptionInIncrement.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698