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

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

Issue 1125783002: [es6] When comparing two symbols we may need to throw a TypeError (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 | « src/mips64/code-stubs-mips64.cc ('k') | src/x64/code-stubs-x64.cc » ('j') | 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 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 __ cmp(r3, r4); 255 __ cmp(r3, r4);
256 __ bne(&not_identical); 256 __ bne(&not_identical);
257 257
258 // Test for NaN. Sadly, we can't just compare to Factory::nan_value(), 258 // Test for NaN. Sadly, we can't just compare to Factory::nan_value(),
259 // so we do the second best thing - test it ourselves. 259 // so we do the second best thing - test it ourselves.
260 // They are both equal and they are not both Smis so both of them are not 260 // They are both equal and they are not both Smis so both of them are not
261 // Smis. If it's not a heap number, then return equal. 261 // Smis. If it's not a heap number, then return equal.
262 if (cond == lt || cond == gt) { 262 if (cond == lt || cond == gt) {
263 __ CompareObjectType(r3, r7, r7, FIRST_SPEC_OBJECT_TYPE); 263 __ CompareObjectType(r3, r7, r7, FIRST_SPEC_OBJECT_TYPE);
264 __ bge(slow); 264 __ bge(slow);
265 __ CompareObjectType(r3, r7, r7, SYMBOL_TYPE);
266 __ beq(slow);
265 } else { 267 } else {
266 __ CompareObjectType(r3, r7, r7, HEAP_NUMBER_TYPE); 268 __ CompareObjectType(r3, r7, r7, HEAP_NUMBER_TYPE);
267 __ beq(&heap_number); 269 __ beq(&heap_number);
268 // Comparing JS objects with <=, >= is complicated. 270 // Comparing JS objects with <=, >= is complicated.
269 if (cond != eq) { 271 if (cond != eq) {
270 __ cmpi(r7, Operand(FIRST_SPEC_OBJECT_TYPE)); 272 __ cmpi(r7, Operand(FIRST_SPEC_OBJECT_TYPE));
271 __ bge(slow); 273 __ bge(slow);
272 // Normally here we fall through to return_equal, but undefined is 274 // Normally here we fall through to return_equal, but undefined is
273 // special: (undefined == undefined) == true, but 275 // special: (undefined == undefined) == true, but
274 // (undefined <= undefined) == false! See ECMAScript 11.8.5. 276 // (undefined <= undefined) == false! See ECMAScript 11.8.5.
(...skipping 5304 matching lines...) Expand 10 before | Expand all | Expand 10 after
5579 kStackUnwindSpace, NULL, 5581 kStackUnwindSpace, NULL,
5580 MemOperand(fp, 6 * kPointerSize), NULL); 5582 MemOperand(fp, 6 * kPointerSize), NULL);
5581 } 5583 }
5582 5584
5583 5585
5584 #undef __ 5586 #undef __
5585 } 5587 }
5586 } // namespace v8::internal 5588 } // namespace v8::internal
5587 5589
5588 #endif // V8_TARGET_ARCH_PPC 5590 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/mips64/code-stubs-mips64.cc ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698