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

Side by Side Diff: runtime/vm/flow_graph_compiler_mips.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_MIPS. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS.
6 #if defined(TARGET_ARCH_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
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 1499 matching lines...) Expand 10 before | Expand all | Expand 10 after
1510 __ lw(right, Address(SP, 0 * kWordSize)); 1510 __ lw(right, Address(SP, 0 * kWordSize));
1511 __ lw(left, Address(SP, 1 * kWordSize)); 1511 __ lw(left, Address(SP, 1 * kWordSize));
1512 __ addiu(SP, SP, Immediate(2 * kWordSize)); 1512 __ addiu(SP, SP, Immediate(2 * kWordSize));
1513 } else { 1513 } else {
1514 __ slt(CMPRES1, left, right); 1514 __ slt(CMPRES1, left, right);
1515 __ slt(CMPRES2, right, left); 1515 __ slt(CMPRES2, right, left);
1516 } 1516 }
1517 } 1517 }
1518 1518
1519 1519
1520 // Implement equality spec: if any of the arguments is null do identity check.
1521 // Fallthrough calls super equality.
1522 void FlowGraphCompiler::EmitSuperEqualityCallPrologue(Register result,
1523 Label* skip_call) {
1524 Label check_identity, is_false, fall_through;
1525 __ TraceSimMsg("SuperEqualityCallPrologue");
1526 __ lw(result, Address(SP, 0 * kWordSize)); // Load right operand.
1527 __ lw(CMPRES1, Address(SP, 1 * kWordSize)); // Load left operand.
1528 __ LoadImmediate(TMP, reinterpret_cast<int32_t>(Object::null()));
1529 __ beq(result, TMP, &check_identity); // Is right null?
1530 __ LoadImmediate(TMP, reinterpret_cast<int32_t>(Object::null()));
1531 __ bne(TMP, CMPRES1, &fall_through); // If right is non-null, check left.
1532
1533 __ Bind(&check_identity);
1534 __ bne(result, CMPRES1, &is_false);
1535 __ LoadObject(result, Bool::True());
1536 __ Drop(2);
1537 __ b(skip_call);
1538 __ Bind(&is_false);
1539 __ LoadObject(result, Bool::False());
1540 __ Drop(2);
1541 __ b(skip_call);
1542 __ Bind(&fall_through);
1543 }
1544
1545
1546 void FlowGraphCompiler::SaveLiveRegisters(LocationSummary* locs) { 1520 void FlowGraphCompiler::SaveLiveRegisters(LocationSummary* locs) {
1547 __ TraceSimMsg("SaveLiveRegisters"); 1521 __ TraceSimMsg("SaveLiveRegisters");
1548 // TODO(vegorov): consider saving only caller save (volatile) registers. 1522 // TODO(vegorov): consider saving only caller save (volatile) registers.
1549 const intptr_t fpu_regs_count= locs->live_registers()->fpu_regs_count(); 1523 const intptr_t fpu_regs_count= locs->live_registers()->fpu_regs_count();
1550 if (fpu_regs_count > 0) { 1524 if (fpu_regs_count > 0) {
1551 __ AddImmediate(SP, -(fpu_regs_count * kFpuRegisterSize)); 1525 __ AddImmediate(SP, -(fpu_regs_count * kFpuRegisterSize));
1552 // Store fpu registers with the lowest register number at the lowest 1526 // Store fpu registers with the lowest register number at the lowest
1553 // address. 1527 // address.
1554 intptr_t offset = 0; 1528 intptr_t offset = 0;
1555 for (intptr_t reg_idx = 0; reg_idx < kNumberOfFpuRegisters; ++reg_idx) { 1529 for (intptr_t reg_idx = 0; reg_idx < kNumberOfFpuRegisters; ++reg_idx) {
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
1997 __ AddImmediate(SP, kDoubleSize); 1971 __ AddImmediate(SP, kDoubleSize);
1998 } 1972 }
1999 1973
2000 1974
2001 #undef __ 1975 #undef __
2002 1976
2003 1977
2004 } // namespace dart 1978 } // namespace dart
2005 1979
2006 #endif // defined TARGET_ARCH_MIPS 1980 #endif // defined TARGET_ARCH_MIPS
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698