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

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

Issue 18130004: Split IdenticalWithNumberCheck in two versions: once called from unoptimized code the other called… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 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 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 "lib/error.h" 10 #include "lib/error.h"
(...skipping 1414 matching lines...) Expand 10 before | Expand all | Expand 10 after
1425 1425
1426 if (obj.IsSmi() && (Smi::Cast(obj).Value() == 0)) { 1426 if (obj.IsSmi() && (Smi::Cast(obj).Value() == 0)) {
1427 ASSERT(!needs_number_check); 1427 ASSERT(!needs_number_check);
1428 __ testl(reg, reg); 1428 __ testl(reg, reg);
1429 return; 1429 return;
1430 } 1430 }
1431 1431
1432 if (needs_number_check) { 1432 if (needs_number_check) {
1433 __ pushl(reg); 1433 __ pushl(reg);
1434 __ PushObject(obj); 1434 __ PushObject(obj);
1435 __ call(&StubCode::IdenticalWithNumberCheckLabel()); 1435 if (is_optimizing()) {
1436 __ call(&StubCode::OptimizedIdenticalWithNumberCheckLabel());
1437 } else {
1438 __ call(&StubCode::UnoptimizedIdenticalWithNumberCheckLabel());
1439 }
1436 AddCurrentDescriptor(PcDescriptors::kRuntimeCall, 1440 AddCurrentDescriptor(PcDescriptors::kRuntimeCall,
1437 Isolate::kNoDeoptId, 1441 Isolate::kNoDeoptId,
1438 token_pos); 1442 token_pos);
1439 __ popl(reg); // Discard constant. 1443 __ popl(reg); // Discard constant.
1440 __ popl(reg); // Restore 'reg'. 1444 __ popl(reg); // Restore 'reg'.
1441 return; 1445 return;
1442 } 1446 }
1443 1447
1444 __ CompareObject(reg, obj); 1448 __ CompareObject(reg, obj);
1445 } 1449 }
1446 1450
1447 1451
1448 void FlowGraphCompiler::EmitEqualityRegRegCompare(Register left, 1452 void FlowGraphCompiler::EmitEqualityRegRegCompare(Register left,
1449 Register right, 1453 Register right,
1450 bool needs_number_check, 1454 bool needs_number_check,
1451 intptr_t token_pos) { 1455 intptr_t token_pos) {
1452 if (needs_number_check) { 1456 if (needs_number_check) {
1453 __ pushl(left); 1457 __ pushl(left);
1454 __ pushl(right); 1458 __ pushl(right);
1455 __ call(&StubCode::IdenticalWithNumberCheckLabel()); 1459 if (is_optimizing()) {
1460 __ call(&StubCode::OptimizedIdenticalWithNumberCheckLabel());
1461 } else {
1462 __ call(&StubCode::UnoptimizedIdenticalWithNumberCheckLabel());
1463 }
1456 AddCurrentDescriptor(PcDescriptors::kRuntimeCall, 1464 AddCurrentDescriptor(PcDescriptors::kRuntimeCall,
1457 Isolate::kNoDeoptId, 1465 Isolate::kNoDeoptId,
1458 token_pos); 1466 token_pos);
1459 // Stub returns result in flags (result of a cmpl, we need ZF computed). 1467 // Stub returns result in flags (result of a cmpl, we need ZF computed).
1460 __ popl(right); 1468 __ popl(right);
1461 __ popl(left); 1469 __ popl(left);
1462 } else { 1470 } else {
1463 __ cmpl(left, right); 1471 __ cmpl(left, right);
1464 } 1472 }
1465 } 1473 }
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
1892 __ movups(reg, Address(ESP, 0)); 1900 __ movups(reg, Address(ESP, 0));
1893 __ addl(ESP, Immediate(kFpuRegisterSize)); 1901 __ addl(ESP, Immediate(kFpuRegisterSize));
1894 } 1902 }
1895 1903
1896 1904
1897 #undef __ 1905 #undef __
1898 1906
1899 } // namespace dart 1907 } // namespace dart
1900 1908
1901 #endif // defined TARGET_ARCH_IA32 1909 #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