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

Side by Side Diff: runtime/vm/flow_graph_compiler_ia32.cc

Issue 62203018: Remove dead code from IfThenElse and StrictCompare in the compiler. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/flow_graph_compiler_arm.cc ('k') | runtime/vm/flow_graph_compiler_mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32.
6 #if defined(TARGET_ARCH_IA32) 6 #if defined(TARGET_ARCH_IA32)
7 7
8 #include "vm/flow_graph_compiler.h" 8 #include "vm/flow_graph_compiler.h"
9 9
10 #include "vm/ast_printer.h" 10 #include "vm/ast_printer.h"
(...skipping 1424 matching lines...) Expand 10 before | Expand all | Expand 10 after
1435 locs); 1435 locs);
1436 AddStaticCallTarget(function); 1436 AddStaticCallTarget(function);
1437 __ Drop(argument_count); 1437 __ Drop(argument_count);
1438 } 1438 }
1439 1439
1440 1440
1441 void FlowGraphCompiler::EmitEqualityRegConstCompare(Register reg, 1441 void FlowGraphCompiler::EmitEqualityRegConstCompare(Register reg,
1442 const Object& obj, 1442 const Object& obj,
1443 bool needs_number_check, 1443 bool needs_number_check,
1444 intptr_t token_pos) { 1444 intptr_t token_pos) {
1445 if (needs_number_check) { 1445 ASSERT(!needs_number_check ||
1446 if (!obj.IsMint() && !obj.IsDouble() && !obj.IsBigint()) { 1446 (!obj.IsMint() && !obj.IsDouble() && !obj.IsBigint()));
1447 needs_number_check = false;
1448 }
1449 }
1450 1447
1451 if (obj.IsSmi() && (Smi::Cast(obj).Value() == 0)) { 1448 if (obj.IsSmi() && (Smi::Cast(obj).Value() == 0)) {
1452 ASSERT(!needs_number_check); 1449 ASSERT(!needs_number_check);
1453 __ testl(reg, reg); 1450 __ testl(reg, reg);
1454 return; 1451 return;
1455 } 1452 }
1456 1453
1457 if (needs_number_check) { 1454 if (needs_number_check) {
1458 __ pushl(reg); 1455 __ pushl(reg);
1459 __ PushObject(obj); 1456 __ PushObject(obj);
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
1878 __ movups(reg, Address(ESP, 0)); 1875 __ movups(reg, Address(ESP, 0));
1879 __ addl(ESP, Immediate(kFpuRegisterSize)); 1876 __ addl(ESP, Immediate(kFpuRegisterSize));
1880 } 1877 }
1881 1878
1882 1879
1883 #undef __ 1880 #undef __
1884 1881
1885 } // namespace dart 1882 } // namespace dart
1886 1883
1887 #endif // defined TARGET_ARCH_IA32 1884 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_arm.cc ('k') | runtime/vm/flow_graph_compiler_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698