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

Unified Diff: vm/opt_code_generator_ia32.cc

Issue 8873044: Fix crash from issue 744: evaluate left first before deopt happens (strict comparison). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 9 years 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/opt_code_generator_ia32.cc
===================================================================
--- vm/opt_code_generator_ia32.cc (revision 2292)
+++ vm/opt_code_generator_ia32.cc (working copy)
@@ -1943,12 +1943,11 @@
(node->kind() == Token::kNE_STRICT)) {
const Bool& bool_true = Bool::ZoneHandle(Bool::True());
const Bool& bool_false = Bool::ZoneHandle(Bool::False());
+ // Note that evaluation of right may cause deoptimization, therefore left
+ // must be on stack when evaluating right.
siva 2011/12/09 01:24:56 There seems to be other such cases in GenerateLogi
srdjan 2011/12/09 01:30:25 Will do and it will be part of the next CL.
if (node->right()->IsLiteralNode()) {
VisitLoadOne(node->left(), EAX);
__ CompareObject(EAX, node->right()->AsLiteralNode()->literal());
- } else if (node->left()->IsLiteralNode()) {
- VisitLoadOne(node->right(), EAX);
- __ CompareObject(EAX, node->left()->AsLiteralNode()->literal());
} else {
VisitLoadTwo(node->left(), node->right(), EAX, EDX);
__ cmpl(EAX, EDX);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698