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

Side by Side Diff: src/mips64/code-stubs-mips64.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/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 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 if (cc == less || cc == greater) { 290 if (cc == less || cc == greater) {
291 __ GetObjectType(a0, t0, t0); 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 __ GetObjectType(a0, t0, t0);
294 __ Branch(slow, eq, t0, Operand(SYMBOL_TYPE));
293 } else { 295 } else {
294 __ GetObjectType(a0, t0, t0); 296 __ GetObjectType(a0, t0, t0);
295 __ Branch(&heap_number, eq, t0, Operand(HEAP_NUMBER_TYPE)); 297 __ Branch(&heap_number, eq, t0, Operand(HEAP_NUMBER_TYPE));
296 // Comparing JS objects with <=, >= is complicated. 298 // Comparing JS objects with <=, >= is complicated.
297 if (cc != eq) { 299 if (cc != eq) {
298 __ Branch(slow, greater, t0, Operand(FIRST_SPEC_OBJECT_TYPE)); 300 __ Branch(slow, greater, t0, Operand(FIRST_SPEC_OBJECT_TYPE));
299 // Normally here we fall through to return_equal, but undefined is 301 // Normally here we fall through to return_equal, but undefined is
300 // special: (undefined == undefined) == true, but 302 // special: (undefined == undefined) == true, but
301 // (undefined <= undefined) == false! See ECMAScript 11.8.5. 303 // (undefined <= undefined) == false! See ECMAScript 11.8.5.
302 if (cc == less_equal || cc == greater_equal) { 304 if (cc == less_equal || cc == greater_equal) {
(...skipping 5234 matching lines...) Expand 10 before | Expand all | Expand 10 after
5537 kStackUnwindSpace, kInvalidStackOffset, 5539 kStackUnwindSpace, kInvalidStackOffset,
5538 MemOperand(fp, 6 * kPointerSize), NULL); 5540 MemOperand(fp, 6 * kPointerSize), NULL);
5539 } 5541 }
5540 5542
5541 5543
5542 #undef __ 5544 #undef __
5543 5545
5544 } } // namespace v8::internal 5546 } } // namespace v8::internal
5545 5547
5546 #endif // V8_TARGET_ARCH_MIPS64 5548 #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