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

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

Issue 1130603004: PPC: Fix '[strong] Disallow implicit conversions for comparison' (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_PPC 7 #if V8_TARGET_ARCH_PPC
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after
587 __ SmiUntag(r3); 587 __ SmiUntag(r3);
588 __ sub(r3, r4, r3); 588 __ sub(r3, r4, r3);
589 __ Ret(); 589 __ Ret();
590 __ bind(&not_two_smis); 590 __ bind(&not_two_smis);
591 591
592 // NOTICE! This code is only reached after a smi-fast-case check, so 592 // NOTICE! This code is only reached after a smi-fast-case check, so
593 // it is certain that at least one operand isn't a smi. 593 // it is certain that at least one operand isn't a smi.
594 594
595 // Handle the case where the objects are identical. Either returns the answer 595 // Handle the case where the objects are identical. Either returns the answer
596 // or goes to slow. Only falls through if the objects were not identical. 596 // or goes to slow. Only falls through if the objects were not identical.
597 EmitIdenticalObjectComparison(masm, &slow, cc); 597 EmitIdenticalObjectComparison(masm, &slow, cc, strong());
598 598
599 // If either is a Smi (we know that not both are), then they can only 599 // If either is a Smi (we know that not both are), then they can only
600 // be strictly equal if the other is a HeapNumber. 600 // be strictly equal if the other is a HeapNumber.
601 STATIC_ASSERT(kSmiTag == 0); 601 STATIC_ASSERT(kSmiTag == 0);
602 DCHECK_EQ(static_cast<Smi*>(0), Smi::FromInt(0)); 602 DCHECK_EQ(static_cast<Smi*>(0), Smi::FromInt(0));
603 __ and_(r5, lhs, rhs); 603 __ and_(r5, lhs, rhs);
604 __ JumpIfNotSmi(r5, &not_smis); 604 __ JumpIfNotSmi(r5, &not_smis);
605 // One operand is a smi. EmitSmiNonsmiComparison generates code that can: 605 // One operand is a smi. EmitSmiNonsmiComparison generates code that can:
606 // 1) Return the answer. 606 // 1) Return the answer.
607 // 2) Go to slow. 607 // 2) Go to slow.
(...skipping 4999 matching lines...) Expand 10 before | Expand all | Expand 10 after
5607 kStackUnwindSpace, NULL, 5607 kStackUnwindSpace, NULL,
5608 MemOperand(fp, 6 * kPointerSize), NULL); 5608 MemOperand(fp, 6 * kPointerSize), NULL);
5609 } 5609 }
5610 5610
5611 5611
5612 #undef __ 5612 #undef __
5613 } 5613 }
5614 } // namespace v8::internal 5614 } // namespace v8::internal
5615 5615
5616 #endif // V8_TARGET_ARCH_PPC 5616 #endif // V8_TARGET_ARCH_PPC
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