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

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

Issue 23627009: Remove inlining restriction of calls to the == operator. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 3 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
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_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 1442 matching lines...) Expand 10 before | Expand all | Expand 10 after
1453 token_pos); 1453 token_pos);
1454 // Stub returns result in flags (result of a cmpl, we need ZF computed). 1454 // Stub returns result in flags (result of a cmpl, we need ZF computed).
1455 __ Pop(right); 1455 __ Pop(right);
1456 __ Pop(left); 1456 __ Pop(left);
1457 } else { 1457 } else {
1458 __ cmp(left, ShifterOperand(right)); 1458 __ cmp(left, ShifterOperand(right));
1459 } 1459 }
1460 } 1460 }
1461 1461
1462 1462
1463 // Implement equality spec: if any of the arguments is null do identity check.
1464 // Fallthrough calls super equality.
1465 void FlowGraphCompiler::EmitSuperEqualityCallPrologue(Register result,
1466 Label* skip_call) {
1467 Label check_identity, fall_through;
1468 __ LoadImmediate(IP, reinterpret_cast<intptr_t>(Object::null()));
1469 __ ldr(result, Address(SP, 0 * kWordSize)); // Load right operand.
1470 __ cmp(result, ShifterOperand(IP)); // Is right null?
1471 __ ldr(result, Address(SP, 1 * kWordSize)); // Load left operand.
1472 __ b(&check_identity, EQ); // Branch if right (IP) is null; left in result.
1473 __ cmp(result, ShifterOperand(IP)); // Right is non-null; is left null?
1474 __ b(&fall_through, NE);
1475 // Right is non-null, left is null. We could return false, but we save code
1476 // by falling through with an IP different than null.
1477 __ mov(IP, ShifterOperand(0));
1478 __ Bind(&check_identity);
1479 __ cmp(result, ShifterOperand(IP));
1480 __ LoadObject(result, Bool::True(), EQ);
1481 __ LoadObject(result, Bool::False(), NE);
1482 __ Drop(2);
1483 __ b(skip_call);
1484 __ Bind(&fall_through);
1485 }
1486
1487
1488 void FlowGraphCompiler::SaveLiveRegisters(LocationSummary* locs) { 1463 void FlowGraphCompiler::SaveLiveRegisters(LocationSummary* locs) {
1489 // TODO(vegorov): consider saving only caller save (volatile) registers. 1464 // TODO(vegorov): consider saving only caller save (volatile) registers.
1490 const intptr_t fpu_regs_count = locs->live_registers()->fpu_regs_count(); 1465 const intptr_t fpu_regs_count = locs->live_registers()->fpu_regs_count();
1491 if (fpu_regs_count > 0) { 1466 if (fpu_regs_count > 0) {
1492 __ AddImmediate(SP, -(fpu_regs_count * kFpuRegisterSize)); 1467 __ AddImmediate(SP, -(fpu_regs_count * kFpuRegisterSize));
1493 // Store fpu registers with the lowest register number at the lowest 1468 // Store fpu registers with the lowest register number at the lowest
1494 // address. 1469 // address.
1495 intptr_t offset = 0; 1470 intptr_t offset = 0;
1496 for (intptr_t reg_idx = 0; reg_idx < kNumberOfFpuRegisters; ++reg_idx) { 1471 for (intptr_t reg_idx = 0; reg_idx < kNumberOfFpuRegisters; ++reg_idx) {
1497 QRegister fpu_reg = static_cast<QRegister>(reg_idx); 1472 QRegister fpu_reg = static_cast<QRegister>(reg_idx);
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
1901 DRegister dreg = EvenDRegisterOf(reg); 1876 DRegister dreg = EvenDRegisterOf(reg);
1902 __ vldrd(dreg, Address(SP, kDoubleSize, Address::PostIndex)); 1877 __ vldrd(dreg, Address(SP, kDoubleSize, Address::PostIndex));
1903 } 1878 }
1904 1879
1905 1880
1906 #undef __ 1881 #undef __
1907 1882
1908 } // namespace dart 1883 } // namespace dart
1909 1884
1910 #endif // defined TARGET_ARCH_ARM 1885 #endif // defined TARGET_ARCH_ARM
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698