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

Side by Side Diff: src/x87/code-stubs-x87.cc

Issue 1353343002: X87: [runtime] Replace COMPARE/COMPARE_STRONG with proper Object::Compare. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_X87 5 #if V8_TARGET_ARCH_X87
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/bootstrapper.h" 8 #include "src/bootstrapper.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 1561 matching lines...) Expand 10 before | Expand all | Expand 10 after
1572 __ pop(ecx); 1572 __ pop(ecx);
1573 __ push(edx); 1573 __ push(edx);
1574 __ push(eax); 1574 __ push(eax);
1575 1575
1576 // Figure out which native to call and setup the arguments. 1576 // Figure out which native to call and setup the arguments.
1577 if (cc == equal) { 1577 if (cc == equal) {
1578 __ push(ecx); 1578 __ push(ecx);
1579 __ TailCallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals, 2, 1579 __ TailCallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals, 2,
1580 1); 1580 1);
1581 } else { 1581 } else {
1582 int native_context_index = is_strong(strength())
1583 ? Context::COMPARE_STRONG_BUILTIN_INDEX
1584 : Context::COMPARE_BUILTIN_INDEX;
1585 __ push(Immediate(Smi::FromInt(NegativeComparisonResult(cc)))); 1582 __ push(Immediate(Smi::FromInt(NegativeComparisonResult(cc))));
1586 1583
1587 // Restore return address on the stack. 1584 // Restore return address on the stack.
1588 __ push(ecx); 1585 __ push(ecx);
1589 1586
1590 // Call the native; it returns -1 (less), 0 (equal), or 1 (greater) 1587 // Call the native; it returns -1 (less), 0 (equal), or 1 (greater)
1591 // tagged as a small integer. 1588 // tagged as a small integer.
1592 __ InvokeBuiltin(native_context_index, JUMP_FUNCTION); 1589 __ TailCallRuntime(
1590 is_strong(strength()) ? Runtime::kCompare_Strong : Runtime::kCompare, 3,
1591 1);
1593 } 1592 }
1594 1593
1595 __ bind(&miss); 1594 __ bind(&miss);
1596 GenerateMiss(masm); 1595 GenerateMiss(masm);
1597 } 1596 }
1598 1597
1599 1598
1600 static void CallStubInRecordCallTarget(MacroAssembler* masm, CodeStub* stub, 1599 static void CallStubInRecordCallTarget(MacroAssembler* masm, CodeStub* stub,
1601 bool is_super) { 1600 bool is_super) {
1602 // eax : number of arguments to the construct function 1601 // eax : number of arguments to the construct function
(...skipping 3876 matching lines...) Expand 10 before | Expand all | Expand 10 after
5479 Operand(ebp, 7 * kPointerSize), NULL); 5478 Operand(ebp, 7 * kPointerSize), NULL);
5480 } 5479 }
5481 5480
5482 5481
5483 #undef __ 5482 #undef __
5484 5483
5485 } // namespace internal 5484 } // namespace internal
5486 } // namespace v8 5485 } // namespace v8
5487 5486
5488 #endif // V8_TARGET_ARCH_X87 5487 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698