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

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

Issue 1128143002: [es6] Fix symbol comparison on some architectures (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/mips/code-stubs-mips.cc ('k') | src/ppc/code-stubs-ppc.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 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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_MIPS64 7 #if V8_TARGET_ARCH_MIPS64
8 8
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 Register exp_mask_reg = t1; 280 Register exp_mask_reg = t1;
281 281
282 __ Branch(&not_identical, ne, a0, Operand(a1)); 282 __ Branch(&not_identical, ne, a0, Operand(a1));
283 283
284 __ li(exp_mask_reg, Operand(HeapNumber::kExponentMask)); 284 __ li(exp_mask_reg, Operand(HeapNumber::kExponentMask));
285 285
286 // Test for NaN. Sadly, we can't just compare to Factory::nan_value(), 286 // Test for NaN. Sadly, we can't just compare to Factory::nan_value(),
287 // so we do the second best thing - test it ourselves. 287 // so we do the second best thing - test it ourselves.
288 // They are both equal and they are not both Smis so both of them are not 288 // They are both equal and they are not both Smis so both of them are not
289 // Smis. If it's not a heap number, then return equal. 289 // Smis. If it's not a heap number, then return equal.
290 __ GetObjectType(a0, t0, t0);
290 if (cc == less || cc == greater) { 291 if (cc == less || cc == greater) {
291 __ GetObjectType(a0, t0, t0);
292 __ Branch(slow, greater, t0, Operand(FIRST_SPEC_OBJECT_TYPE)); 292 __ Branch(slow, greater, t0, Operand(FIRST_SPEC_OBJECT_TYPE));
293 __ Branch(slow, eq, t0, Operand(SYMBOL_TYPE)); 293 __ Branch(slow, eq, t0, Operand(SYMBOL_TYPE));
294 } else { 294 } else {
295 __ GetObjectType(a0, t0, t0);
296 __ Branch(&heap_number, eq, t0, Operand(HEAP_NUMBER_TYPE)); 295 __ Branch(&heap_number, eq, t0, Operand(HEAP_NUMBER_TYPE));
297 // Comparing JS objects with <=, >= is complicated. 296 // Comparing JS objects with <=, >= is complicated.
298 if (cc != eq) { 297 if (cc != eq) {
299 __ Branch(slow, greater, t0, Operand(FIRST_SPEC_OBJECT_TYPE)); 298 __ Branch(slow, greater, t0, Operand(FIRST_SPEC_OBJECT_TYPE));
299 __ Branch(slow, eq, t0, Operand(SYMBOL_TYPE));
300 // Normally here we fall through to return_equal, but undefined is 300 // Normally here we fall through to return_equal, but undefined is
301 // special: (undefined == undefined) == true, but 301 // special: (undefined == undefined) == true, but
302 // (undefined <= undefined) == false! See ECMAScript 11.8.5. 302 // (undefined <= undefined) == false! See ECMAScript 11.8.5.
303 if (cc == less_equal || cc == greater_equal) { 303 if (cc == less_equal || cc == greater_equal) {
304 __ Branch(&return_equal, ne, t0, Operand(ODDBALL_TYPE)); 304 __ Branch(&return_equal, ne, t0, Operand(ODDBALL_TYPE));
305 __ LoadRoot(a6, Heap::kUndefinedValueRootIndex); 305 __ LoadRoot(a6, Heap::kUndefinedValueRootIndex);
306 __ Branch(&return_equal, ne, a0, Operand(a6)); 306 __ Branch(&return_equal, ne, a0, Operand(a6));
307 DCHECK(is_int16(GREATER) && is_int16(LESS)); 307 DCHECK(is_int16(GREATER) && is_int16(LESS));
308 __ Ret(USE_DELAY_SLOT); 308 __ Ret(USE_DELAY_SLOT);
309 if (cc == le) { 309 if (cc == le) {
(...skipping 5232 matching lines...) Expand 10 before | Expand all | Expand 10 after
5542 kStackUnwindSpace, kInvalidStackOffset, 5542 kStackUnwindSpace, kInvalidStackOffset,
5543 MemOperand(fp, 6 * kPointerSize), NULL); 5543 MemOperand(fp, 6 * kPointerSize), NULL);
5544 } 5544 }
5545 5545
5546 5546
5547 #undef __ 5547 #undef __
5548 5548
5549 } } // namespace v8::internal 5549 } } // namespace v8::internal
5550 5550
5551 #endif // V8_TARGET_ARCH_MIPS64 5551 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | src/ppc/code-stubs-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698