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

Side by Side Diff: src/mips/code-stubs-mips.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/arm64/code-stubs-arm64.cc ('k') | src/mips64/code-stubs-mips64.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_MIPS 7 #if V8_TARGET_ARCH_MIPS
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 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 Register exp_mask_reg = t5; 284 Register exp_mask_reg = t5;
285 285
286 __ Branch(&not_identical, ne, a0, Operand(a1)); 286 __ Branch(&not_identical, ne, a0, Operand(a1));
287 287
288 __ li(exp_mask_reg, Operand(HeapNumber::kExponentMask)); 288 __ li(exp_mask_reg, Operand(HeapNumber::kExponentMask));
289 289
290 // Test for NaN. Sadly, we can't just compare to Factory::nan_value(), 290 // Test for NaN. Sadly, we can't just compare to Factory::nan_value(),
291 // so we do the second best thing - test it ourselves. 291 // so we do the second best thing - test it ourselves.
292 // They are both equal and they are not both Smis so both of them are not 292 // They are both equal and they are not both Smis so both of them are not
293 // Smis. If it's not a heap number, then return equal. 293 // Smis. If it's not a heap number, then return equal.
294 __ GetObjectType(a0, t4, t4);
294 if (cc == less || cc == greater) { 295 if (cc == less || cc == greater) {
295 __ GetObjectType(a0, t4, t4);
296 __ Branch(slow, greater, t4, Operand(FIRST_SPEC_OBJECT_TYPE)); 296 __ Branch(slow, greater, t4, Operand(FIRST_SPEC_OBJECT_TYPE));
297 __ Branch(slow, eq, t4, Operand(SYMBOL_TYPE)); 297 __ Branch(slow, eq, t4, Operand(SYMBOL_TYPE));
298 } else { 298 } else {
299 __ GetObjectType(a0, t4, t4);
300 __ Branch(&heap_number, eq, t4, Operand(HEAP_NUMBER_TYPE)); 299 __ Branch(&heap_number, eq, t4, Operand(HEAP_NUMBER_TYPE));
301 // Comparing JS objects with <=, >= is complicated. 300 // Comparing JS objects with <=, >= is complicated.
302 if (cc != eq) { 301 if (cc != eq) {
303 __ Branch(slow, greater, t4, Operand(FIRST_SPEC_OBJECT_TYPE)); 302 __ Branch(slow, greater, t4, Operand(FIRST_SPEC_OBJECT_TYPE));
303 __ Branch(slow, eq, t4, Operand(SYMBOL_TYPE));
304 // Normally here we fall through to return_equal, but undefined is 304 // Normally here we fall through to return_equal, but undefined is
305 // special: (undefined == undefined) == true, but 305 // special: (undefined == undefined) == true, but
306 // (undefined <= undefined) == false! See ECMAScript 11.8.5. 306 // (undefined <= undefined) == false! See ECMAScript 11.8.5.
307 if (cc == less_equal || cc == greater_equal) { 307 if (cc == less_equal || cc == greater_equal) {
308 __ Branch(&return_equal, ne, t4, Operand(ODDBALL_TYPE)); 308 __ Branch(&return_equal, ne, t4, Operand(ODDBALL_TYPE));
309 __ LoadRoot(t2, Heap::kUndefinedValueRootIndex); 309 __ LoadRoot(t2, Heap::kUndefinedValueRootIndex);
310 __ Branch(&return_equal, ne, a0, Operand(t2)); 310 __ Branch(&return_equal, ne, a0, Operand(t2));
311 DCHECK(is_int16(GREATER) && is_int16(LESS)); 311 DCHECK(is_int16(GREATER) && is_int16(LESS));
312 __ Ret(USE_DELAY_SLOT); 312 __ Ret(USE_DELAY_SLOT);
313 if (cc == le) { 313 if (cc == le) {
(...skipping 5185 matching lines...) Expand 10 before | Expand all | Expand 10 after
5499 kStackUnwindSpace, kInvalidStackOffset, 5499 kStackUnwindSpace, kInvalidStackOffset,
5500 MemOperand(fp, 6 * kPointerSize), NULL); 5500 MemOperand(fp, 6 * kPointerSize), NULL);
5501 } 5501 }
5502 5502
5503 5503
5504 #undef __ 5504 #undef __
5505 5505
5506 } } // namespace v8::internal 5506 } } // namespace v8::internal
5507 5507
5508 #endif // V8_TARGET_ARCH_MIPS 5508 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/arm64/code-stubs-arm64.cc ('k') | src/mips64/code-stubs-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698