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

Side by Side Diff: src/ia32/code-stubs-ia32.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/arm64/code-stubs-arm64.cc ('k') | src/mips/code-stubs-mips.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_IA32 7 #if V8_TARGET_ARCH_IA32
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 1692 matching lines...) Expand 10 before | Expand all | Expand 10 after
1703 1703
1704 // Test for NaN. Compare heap numbers in a general way, 1704 // Test for NaN. Compare heap numbers in a general way,
1705 // to hanlde NaNs correctly. 1705 // to hanlde NaNs correctly.
1706 __ cmp(FieldOperand(edx, HeapObject::kMapOffset), 1706 __ cmp(FieldOperand(edx, HeapObject::kMapOffset),
1707 Immediate(isolate()->factory()->heap_number_map())); 1707 Immediate(isolate()->factory()->heap_number_map()));
1708 __ j(equal, &generic_heap_number_comparison, Label::kNear); 1708 __ j(equal, &generic_heap_number_comparison, Label::kNear);
1709 if (cc != equal) { 1709 if (cc != equal) {
1710 // Call runtime on identical JSObjects. Otherwise return equal. 1710 // Call runtime on identical JSObjects. Otherwise return equal.
1711 __ CmpObjectType(eax, FIRST_SPEC_OBJECT_TYPE, ecx); 1711 __ CmpObjectType(eax, FIRST_SPEC_OBJECT_TYPE, ecx);
1712 __ j(above_equal, &not_identical); 1712 __ j(above_equal, &not_identical);
1713 // Call runtime on identical symbols since we need to throw a TypeError.
1714 __ CmpObjectType(eax, SYMBOL_TYPE, ecx);
1715 __ j(equal, &not_identical);
1713 } 1716 }
1714 __ Move(eax, Immediate(Smi::FromInt(EQUAL))); 1717 __ Move(eax, Immediate(Smi::FromInt(EQUAL)));
1715 __ ret(0); 1718 __ ret(0);
1716 1719
1717 1720
1718 __ bind(&not_identical); 1721 __ bind(&not_identical);
1719 } 1722 }
1720 1723
1721 // Strict equality can quickly decide whether objects are equal. 1724 // Strict equality can quickly decide whether objects are equal.
1722 // Non-strict object equality is slower, so it is handled later in the stub. 1725 // Non-strict object equality is slower, so it is handled later in the stub.
(...skipping 3684 matching lines...) Expand 10 before | Expand all | Expand 10 after
5407 ApiParameterOperand(2), kStackSpace, nullptr, 5410 ApiParameterOperand(2), kStackSpace, nullptr,
5408 Operand(ebp, 7 * kPointerSize), NULL); 5411 Operand(ebp, 7 * kPointerSize), NULL);
5409 } 5412 }
5410 5413
5411 5414
5412 #undef __ 5415 #undef __
5413 5416
5414 } } // namespace v8::internal 5417 } } // namespace v8::internal
5415 5418
5416 #endif // V8_TARGET_ARCH_IA32 5419 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/arm64/code-stubs-arm64.cc ('k') | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698