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

Side by Side Diff: runtime/vm/flow_graph_compiler_x64.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_X64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64.
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
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 1451 matching lines...) Expand 10 before | Expand all | Expand 10 after
1462 token_pos); 1462 token_pos);
1463 // Stub returns result in flags (result of a cmpl, we need ZF computed). 1463 // Stub returns result in flags (result of a cmpl, we need ZF computed).
1464 __ popq(right); 1464 __ popq(right);
1465 __ popq(left); 1465 __ popq(left);
1466 } else { 1466 } else {
1467 __ cmpl(left, right); 1467 __ cmpl(left, right);
1468 } 1468 }
1469 } 1469 }
1470 1470
1471 1471
1472 // Implement equality spec: if any of the arguments is null do identity check.
1473 // Fallthrough calls super equality.
1474 void FlowGraphCompiler::EmitSuperEqualityCallPrologue(Register result,
1475 Label* skip_call) {
1476 const Immediate& raw_null =
1477 Immediate(reinterpret_cast<intptr_t>(Object::null()));
1478 Label check_identity, fall_through;
1479 __ cmpq(Address(RSP, 0 * kWordSize), raw_null);
1480 __ j(EQUAL, &check_identity, Assembler::kNearJump);
1481 __ cmpq(Address(RSP, 1 * kWordSize), raw_null);
1482 __ j(NOT_EQUAL, &fall_through, Assembler::kNearJump);
1483
1484 __ Bind(&check_identity);
1485 __ popq(result);
1486 __ cmpq(result, Address(RSP, 0 * kWordSize));
1487 Label is_false;
1488 __ j(NOT_EQUAL, &is_false, Assembler::kNearJump);
1489 __ LoadObject(result, Bool::True());
1490 __ Drop(1);
1491 __ jmp(skip_call);
1492 __ Bind(&is_false);
1493 __ LoadObject(result, Bool::False());
1494 __ Drop(1);
1495 __ jmp(skip_call);
1496 __ Bind(&fall_through);
1497 }
1498
1499
1500 // This function must be in sync with FlowGraphCompiler::RecordSafepoint. 1472 // This function must be in sync with FlowGraphCompiler::RecordSafepoint.
1501 void FlowGraphCompiler::SaveLiveRegisters(LocationSummary* locs) { 1473 void FlowGraphCompiler::SaveLiveRegisters(LocationSummary* locs) {
1502 // TODO(vegorov): consider saving only caller save (volatile) registers. 1474 // TODO(vegorov): consider saving only caller save (volatile) registers.
1503 const intptr_t xmm_regs_count = locs->live_registers()->fpu_regs_count(); 1475 const intptr_t xmm_regs_count = locs->live_registers()->fpu_regs_count();
1504 if (xmm_regs_count > 0) { 1476 if (xmm_regs_count > 0) {
1505 __ subq(RSP, Immediate(xmm_regs_count * kFpuRegisterSize)); 1477 __ subq(RSP, Immediate(xmm_regs_count * kFpuRegisterSize));
1506 // Store XMM registers with the lowest register number at the lowest 1478 // Store XMM registers with the lowest register number at the lowest
1507 // address. 1479 // address.
1508 intptr_t offset = 0; 1480 intptr_t offset = 0;
1509 for (intptr_t reg_idx = 0; reg_idx < kNumberOfXmmRegisters; ++reg_idx) { 1481 for (intptr_t reg_idx = 0; reg_idx < kNumberOfXmmRegisters; ++reg_idx) {
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
1891 __ movups(reg, Address(RSP, 0)); 1863 __ movups(reg, Address(RSP, 0));
1892 __ addq(RSP, Immediate(kFpuRegisterSize)); 1864 __ addq(RSP, Immediate(kFpuRegisterSize));
1893 } 1865 }
1894 1866
1895 1867
1896 #undef __ 1868 #undef __
1897 1869
1898 } // namespace dart 1870 } // namespace dart
1899 1871
1900 #endif // defined TARGET_ARCH_X64 1872 #endif // defined TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698