| 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 1351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1362 } | 1362 } |
| 1363 | 1363 |
| 1364 if (needs_number_check) { | 1364 if (needs_number_check) { |
| 1365 __ pushl(reg); | 1365 __ pushl(reg); |
| 1366 __ PushObject(obj); | 1366 __ PushObject(obj); |
| 1367 if (is_optimizing()) { | 1367 if (is_optimizing()) { |
| 1368 __ Call(*StubCode::OptimizedIdenticalWithNumberCheck_entry()); | 1368 __ Call(*StubCode::OptimizedIdenticalWithNumberCheck_entry()); |
| 1369 } else { | 1369 } else { |
| 1370 __ Call(*StubCode::UnoptimizedIdenticalWithNumberCheck_entry()); | 1370 __ Call(*StubCode::UnoptimizedIdenticalWithNumberCheck_entry()); |
| 1371 } | 1371 } |
| 1372 if (token_pos != Scanner::kNoSourcePos) { | 1372 if (token_pos >= 0) { |
| 1373 AddCurrentDescriptor(RawPcDescriptors::kRuntimeCall, | 1373 AddCurrentDescriptor(RawPcDescriptors::kRuntimeCall, |
| 1374 Thread::kNoDeoptId, | 1374 Thread::kNoDeoptId, |
| 1375 token_pos); | 1375 token_pos); |
| 1376 } | 1376 } |
| 1377 // Stub returns result in flags (result of a cmpl, we need ZF computed). | 1377 // Stub returns result in flags (result of a cmpl, we need ZF computed). |
| 1378 __ popl(reg); // Discard constant. | 1378 __ popl(reg); // Discard constant. |
| 1379 __ popl(reg); // Restore 'reg'. | 1379 __ popl(reg); // Restore 'reg'. |
| 1380 } else { | 1380 } else { |
| 1381 __ CompareObject(reg, obj); | 1381 __ CompareObject(reg, obj); |
| 1382 } | 1382 } |
| 1383 return EQUAL; | 1383 return EQUAL; |
| 1384 } | 1384 } |
| 1385 | 1385 |
| 1386 | 1386 |
| 1387 Condition FlowGraphCompiler::EmitEqualityRegRegCompare(Register left, | 1387 Condition FlowGraphCompiler::EmitEqualityRegRegCompare(Register left, |
| 1388 Register right, | 1388 Register right, |
| 1389 bool needs_number_check, | 1389 bool needs_number_check, |
| 1390 intptr_t token_pos) { | 1390 intptr_t token_pos) { |
| 1391 if (needs_number_check) { | 1391 if (needs_number_check) { |
| 1392 __ pushl(left); | 1392 __ pushl(left); |
| 1393 __ pushl(right); | 1393 __ pushl(right); |
| 1394 if (is_optimizing()) { | 1394 if (is_optimizing()) { |
| 1395 __ Call(*StubCode::OptimizedIdenticalWithNumberCheck_entry()); | 1395 __ Call(*StubCode::OptimizedIdenticalWithNumberCheck_entry()); |
| 1396 } else { | 1396 } else { |
| 1397 __ Call(*StubCode::UnoptimizedIdenticalWithNumberCheck_entry()); | 1397 __ Call(*StubCode::UnoptimizedIdenticalWithNumberCheck_entry()); |
| 1398 } | 1398 } |
| 1399 if (token_pos != Scanner::kNoSourcePos) { | 1399 if (token_pos >= 0) { |
| 1400 AddCurrentDescriptor(RawPcDescriptors::kRuntimeCall, | 1400 AddCurrentDescriptor(RawPcDescriptors::kRuntimeCall, |
| 1401 Thread::kNoDeoptId, | 1401 Thread::kNoDeoptId, |
| 1402 token_pos); | 1402 token_pos); |
| 1403 } | 1403 } |
| 1404 // Stub returns result in flags (result of a cmpl, we need ZF computed). | 1404 // Stub returns result in flags (result of a cmpl, we need ZF computed). |
| 1405 __ popl(right); | 1405 __ popl(right); |
| 1406 __ popl(left); | 1406 __ popl(left); |
| 1407 } else { | 1407 } else { |
| 1408 __ cmpl(left, right); | 1408 __ cmpl(left, right); |
| 1409 } | 1409 } |
| (...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1839 __ movups(reg, Address(ESP, 0)); | 1839 __ movups(reg, Address(ESP, 0)); |
| 1840 __ addl(ESP, Immediate(kFpuRegisterSize)); | 1840 __ addl(ESP, Immediate(kFpuRegisterSize)); |
| 1841 } | 1841 } |
| 1842 | 1842 |
| 1843 | 1843 |
| 1844 #undef __ | 1844 #undef __ |
| 1845 | 1845 |
| 1846 } // namespace dart | 1846 } // namespace dart |
| 1847 | 1847 |
| 1848 #endif // defined TARGET_ARCH_IA32 | 1848 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |