| OLD | NEW |
| 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 1394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1405 } | 1405 } |
| 1406 | 1406 |
| 1407 if (needs_number_check) { | 1407 if (needs_number_check) { |
| 1408 __ pushl(reg); | 1408 __ pushl(reg); |
| 1409 __ PushObject(obj); | 1409 __ PushObject(obj); |
| 1410 if (is_optimizing()) { | 1410 if (is_optimizing()) { |
| 1411 __ call(&StubCode::OptimizedIdenticalWithNumberCheckLabel()); | 1411 __ call(&StubCode::OptimizedIdenticalWithNumberCheckLabel()); |
| 1412 } else { | 1412 } else { |
| 1413 __ call(&StubCode::UnoptimizedIdenticalWithNumberCheckLabel()); | 1413 __ call(&StubCode::UnoptimizedIdenticalWithNumberCheckLabel()); |
| 1414 } | 1414 } |
| 1415 AddCurrentDescriptor(PcDescriptors::kRuntimeCall, | 1415 if (token_pos != Scanner::kDummyTokenIndex) { |
| 1416 Isolate::kNoDeoptId, | 1416 AddCurrentDescriptor(PcDescriptors::kRuntimeCall, |
| 1417 token_pos); | 1417 Isolate::kNoDeoptId, |
| 1418 token_pos); |
| 1419 } |
| 1418 __ popl(reg); // Discard constant. | 1420 __ popl(reg); // Discard constant. |
| 1419 __ popl(reg); // Restore 'reg'. | 1421 __ popl(reg); // Restore 'reg'. |
| 1420 return; | 1422 return; |
| 1421 } | 1423 } |
| 1422 | 1424 |
| 1423 __ CompareObject(reg, obj); | 1425 __ CompareObject(reg, obj); |
| 1424 } | 1426 } |
| 1425 | 1427 |
| 1426 | 1428 |
| 1427 void FlowGraphCompiler::EmitEqualityRegRegCompare(Register left, | 1429 void FlowGraphCompiler::EmitEqualityRegRegCompare(Register left, |
| 1428 Register right, | 1430 Register right, |
| 1429 bool needs_number_check, | 1431 bool needs_number_check, |
| 1430 intptr_t token_pos) { | 1432 intptr_t token_pos) { |
| 1431 if (needs_number_check) { | 1433 if (needs_number_check) { |
| 1432 __ pushl(left); | 1434 __ pushl(left); |
| 1433 __ pushl(right); | 1435 __ pushl(right); |
| 1434 if (is_optimizing()) { | 1436 if (is_optimizing()) { |
| 1435 __ call(&StubCode::OptimizedIdenticalWithNumberCheckLabel()); | 1437 __ call(&StubCode::OptimizedIdenticalWithNumberCheckLabel()); |
| 1436 } else { | 1438 } else { |
| 1437 __ call(&StubCode::UnoptimizedIdenticalWithNumberCheckLabel()); | 1439 __ call(&StubCode::UnoptimizedIdenticalWithNumberCheckLabel()); |
| 1438 } | 1440 } |
| 1439 AddCurrentDescriptor(PcDescriptors::kRuntimeCall, | 1441 if (token_pos != Scanner::kDummyTokenIndex) { |
| 1440 Isolate::kNoDeoptId, | 1442 AddCurrentDescriptor(PcDescriptors::kRuntimeCall, |
| 1441 token_pos); | 1443 Isolate::kNoDeoptId, |
| 1444 token_pos); |
| 1445 } |
| 1442 // Stub returns result in flags (result of a cmpl, we need ZF computed). | 1446 // Stub returns result in flags (result of a cmpl, we need ZF computed). |
| 1443 __ popl(right); | 1447 __ popl(right); |
| 1444 __ popl(left); | 1448 __ popl(left); |
| 1445 } else { | 1449 } else { |
| 1446 __ cmpl(left, right); | 1450 __ cmpl(left, right); |
| 1447 } | 1451 } |
| 1448 } | 1452 } |
| 1449 | 1453 |
| 1450 | 1454 |
| 1451 // This function must be in sync with FlowGraphCompiler::RecordSafepoint and | 1455 // This function must be in sync with FlowGraphCompiler::RecordSafepoint and |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1828 __ movups(reg, Address(ESP, 0)); | 1832 __ movups(reg, Address(ESP, 0)); |
| 1829 __ addl(ESP, Immediate(kFpuRegisterSize)); | 1833 __ addl(ESP, Immediate(kFpuRegisterSize)); |
| 1830 } | 1834 } |
| 1831 | 1835 |
| 1832 | 1836 |
| 1833 #undef __ | 1837 #undef __ |
| 1834 | 1838 |
| 1835 } // namespace dart | 1839 } // namespace dart |
| 1836 | 1840 |
| 1837 #endif // defined TARGET_ARCH_IA32 | 1841 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |