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

Side by Side Diff: src/mips/code-stubs-mips.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 | « no previous file | 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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 if (cc == less || cc == greater) { 294 if (cc == less || cc == greater) {
295 __ GetObjectType(a0, t4, t4); 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 __ GetObjectType(a0, t4, t4);
298 __ Branch(slow, eq, t4, Operand(SYMBOL_TYPE)); 297 __ Branch(slow, eq, t4, Operand(SYMBOL_TYPE));
299 } else { 298 } else {
300 __ GetObjectType(a0, t4, t4); 299 __ GetObjectType(a0, t4, t4);
301 __ Branch(&heap_number, eq, t4, Operand(HEAP_NUMBER_TYPE)); 300 __ Branch(&heap_number, eq, t4, Operand(HEAP_NUMBER_TYPE));
302 // Comparing JS objects with <=, >= is complicated. 301 // Comparing JS objects with <=, >= is complicated.
303 if (cc != eq) { 302 if (cc != eq) {
304 __ Branch(slow, greater, t4, Operand(FIRST_SPEC_OBJECT_TYPE)); 303 __ Branch(slow, greater, t4, Operand(FIRST_SPEC_OBJECT_TYPE));
305 // Normally here we fall through to return_equal, but undefined is 304 // Normally here we fall through to return_equal, but undefined is
306 // special: (undefined == undefined) == true, but 305 // special: (undefined == undefined) == true, but
307 // (undefined <= undefined) == false! See ECMAScript 11.8.5. 306 // (undefined <= undefined) == false! See ECMAScript 11.8.5.
(...skipping 5364 matching lines...) Expand 10 before | Expand all | Expand 10 after
5672 kStackUnwindSpace, kInvalidStackOffset, 5671 kStackUnwindSpace, kInvalidStackOffset,
5673 MemOperand(fp, 6 * kPointerSize), NULL); 5672 MemOperand(fp, 6 * kPointerSize), NULL);
5674 } 5673 }
5675 5674
5676 5675
5677 #undef __ 5676 #undef __
5678 5677
5679 } } // namespace v8::internal 5678 } } // namespace v8::internal
5680 5679
5681 #endif // V8_TARGET_ARCH_MIPS 5680 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « no previous file | src/mips64/code-stubs-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698