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

Unified Diff: runtime/vm/opt_code_generator_ia32.cc

Issue 8451010: Fix issue 5564152 (VM crash): stack at exit of method was incorrect. Smi equality with Mint was c... (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 9 years, 1 month 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/object.cc ('k') | no next file » | 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 1159)
+++ runtime/vm/opt_code_generator_ia32.cc (working copy)
@@ -1599,6 +1599,8 @@
// when compared with double).
// This code will be more optimized once we collect types for two arguments.
void OptimizingCodeGenerator::GenerateSmiEquality(ComparisonNode* node) {
+ const Bool& bool_true = Bool::ZoneHandle(Bool::True());
+ const Bool& bool_false = Bool::ZoneHandle(Bool::False());
ASSERT((node->kind() == Token::kEQ) || (node->kind() == Token::kNE));
CodeGenInfo left_info(node->left());
CodeGenInfo right_info(node->right());
@@ -1656,8 +1658,8 @@
node->token_index(),
kNumberOfArguments,
kNoArgumentNames);
- __ pushl(EAX);
- __ jmp(&done, Assembler::kNearJump);
+ __ CompareObject(EAX, bool_true);
+ // Fall through to evaluate result.
}
__ Bind(&evaluate_comparison);
// Condition is set by a previous comparison operation.
@@ -1668,8 +1670,6 @@
GenerateConditionalJumps(*(node->info()), condition);
node->info()->set_labels_used(true);
} else {
- const Bool& bool_true = Bool::ZoneHandle(Bool::True());
- const Bool& bool_false = Bool::ZoneHandle(Bool::False());
Label true_label;
__ j(condition, &true_label, Assembler::kNearJump);
__ PushObject(bool_false);
« no previous file with comments | « runtime/vm/object.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698