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

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

Issue 1124863004: MIPS: Improve '[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') | 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 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 __ Branch(slow, eq, t0, Operand(SYMBOL_TYPE));
295 } else { 294 } else {
296 __ GetObjectType(a0, t0, t0); 295 __ GetObjectType(a0, t0, t0);
297 __ Branch(&heap_number, eq, t0, Operand(HEAP_NUMBER_TYPE)); 296 __ Branch(&heap_number, eq, t0, Operand(HEAP_NUMBER_TYPE));
298 // Comparing JS objects with <=, >= is complicated. 297 // Comparing JS objects with <=, >= is complicated.
299 if (cc != eq) { 298 if (cc != eq) {
300 __ Branch(slow, greater, t0, Operand(FIRST_SPEC_OBJECT_TYPE)); 299 __ Branch(slow, greater, t0, Operand(FIRST_SPEC_OBJECT_TYPE));
301 // Normally here we fall through to return_equal, but undefined is 300 // Normally here we fall through to return_equal, but undefined is
302 // special: (undefined == undefined) == true, but 301 // special: (undefined == undefined) == true, but
303 // (undefined <= undefined) == false! See ECMAScript 11.8.5. 302 // (undefined <= undefined) == false! See ECMAScript 11.8.5.
(...skipping 5411 matching lines...) Expand 10 before | Expand all | Expand 10 after
5715 kStackUnwindSpace, kInvalidStackOffset, 5714 kStackUnwindSpace, kInvalidStackOffset,
5716 MemOperand(fp, 6 * kPointerSize), NULL); 5715 MemOperand(fp, 6 * kPointerSize), NULL);
5717 } 5716 }
5718 5717
5719 5718
5720 #undef __ 5719 #undef __
5721 5720
5722 } } // namespace v8::internal 5721 } } // namespace v8::internal
5723 5722
5724 #endif // V8_TARGET_ARCH_MIPS64 5723 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698