| 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_ARM. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM. |
| 6 #if defined(TARGET_ARCH_ARM) | 6 #if defined(TARGET_ARCH_ARM) |
| 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 1390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1401 ASSERT(!obj.IsMint() && !obj.IsDouble() && !obj.IsBigint()); | 1401 ASSERT(!obj.IsMint() && !obj.IsDouble() && !obj.IsBigint()); |
| 1402 __ Push(reg); | 1402 __ Push(reg); |
| 1403 __ PushObject(obj); | 1403 __ PushObject(obj); |
| 1404 if (is_optimizing()) { | 1404 if (is_optimizing()) { |
| 1405 __ BranchLinkPatchable( | 1405 __ BranchLinkPatchable( |
| 1406 *StubCode::OptimizedIdenticalWithNumberCheck_entry()); | 1406 *StubCode::OptimizedIdenticalWithNumberCheck_entry()); |
| 1407 } else { | 1407 } else { |
| 1408 __ BranchLinkPatchable( | 1408 __ BranchLinkPatchable( |
| 1409 *StubCode::UnoptimizedIdenticalWithNumberCheck_entry()); | 1409 *StubCode::UnoptimizedIdenticalWithNumberCheck_entry()); |
| 1410 } | 1410 } |
| 1411 if (token_pos != Scanner::kNoSourcePos) { | 1411 if (token_pos >= 0) { |
| 1412 AddCurrentDescriptor(RawPcDescriptors::kRuntimeCall, | 1412 AddCurrentDescriptor(RawPcDescriptors::kRuntimeCall, |
| 1413 Thread::kNoDeoptId, | 1413 Thread::kNoDeoptId, |
| 1414 token_pos); | 1414 token_pos); |
| 1415 } | 1415 } |
| 1416 // Stub returns result in flags (result of a cmp, we need Z computed). | 1416 // Stub returns result in flags (result of a cmp, we need Z computed). |
| 1417 __ Drop(1); // Discard constant. | 1417 __ Drop(1); // Discard constant. |
| 1418 __ Pop(reg); // Restore 'reg'. | 1418 __ Pop(reg); // Restore 'reg'. |
| 1419 } else { | 1419 } else { |
| 1420 __ CompareObject(reg, obj); | 1420 __ CompareObject(reg, obj); |
| 1421 } | 1421 } |
| 1422 return EQ; | 1422 return EQ; |
| 1423 } | 1423 } |
| 1424 | 1424 |
| 1425 | 1425 |
| 1426 Condition FlowGraphCompiler::EmitEqualityRegRegCompare(Register left, | 1426 Condition FlowGraphCompiler::EmitEqualityRegRegCompare(Register left, |
| 1427 Register right, | 1427 Register right, |
| 1428 bool needs_number_check, | 1428 bool needs_number_check, |
| 1429 intptr_t token_pos) { | 1429 intptr_t token_pos) { |
| 1430 if (needs_number_check) { | 1430 if (needs_number_check) { |
| 1431 __ Push(left); | 1431 __ Push(left); |
| 1432 __ Push(right); | 1432 __ Push(right); |
| 1433 if (is_optimizing()) { | 1433 if (is_optimizing()) { |
| 1434 __ BranchLinkPatchable( | 1434 __ BranchLinkPatchable( |
| 1435 *StubCode::OptimizedIdenticalWithNumberCheck_entry()); | 1435 *StubCode::OptimizedIdenticalWithNumberCheck_entry()); |
| 1436 } else { | 1436 } else { |
| 1437 __ BranchLinkPatchable( | 1437 __ BranchLinkPatchable( |
| 1438 *StubCode::UnoptimizedIdenticalWithNumberCheck_entry()); | 1438 *StubCode::UnoptimizedIdenticalWithNumberCheck_entry()); |
| 1439 } | 1439 } |
| 1440 if (token_pos != Scanner::kNoSourcePos) { | 1440 if (token_pos >= 0) { |
| 1441 AddCurrentDescriptor(RawPcDescriptors::kRuntimeCall, | 1441 AddCurrentDescriptor(RawPcDescriptors::kRuntimeCall, |
| 1442 Thread::kNoDeoptId, | 1442 Thread::kNoDeoptId, |
| 1443 token_pos); | 1443 token_pos); |
| 1444 } | 1444 } |
| 1445 // Stub returns result in flags (result of a cmp, we need Z computed). | 1445 // Stub returns result in flags (result of a cmp, we need Z computed). |
| 1446 __ Pop(right); | 1446 __ Pop(right); |
| 1447 __ Pop(left); | 1447 __ Pop(left); |
| 1448 } else { | 1448 } else { |
| 1449 __ cmp(left, Operand(right)); | 1449 __ cmp(left, Operand(right)); |
| 1450 } | 1450 } |
| (...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1933 DRegister dreg = EvenDRegisterOf(reg); | 1933 DRegister dreg = EvenDRegisterOf(reg); |
| 1934 __ vldrd(dreg, Address(SP, kDoubleSize, Address::PostIndex)); | 1934 __ vldrd(dreg, Address(SP, kDoubleSize, Address::PostIndex)); |
| 1935 } | 1935 } |
| 1936 | 1936 |
| 1937 | 1937 |
| 1938 #undef __ | 1938 #undef __ |
| 1939 | 1939 |
| 1940 } // namespace dart | 1940 } // namespace dart |
| 1941 | 1941 |
| 1942 #endif // defined TARGET_ARCH_ARM | 1942 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |