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

Side by Side Diff: src/x87/code-stubs-x87.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/x64/code-stubs-x64.cc ('k') | test/mjsunit/es6/symbols.js » ('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_X87 7 #if V8_TARGET_ARCH_X87
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 1367 matching lines...) Expand 10 before | Expand all | Expand 10 after
1378 1378
1379 // Test for NaN. Compare heap numbers in a general way, 1379 // Test for NaN. Compare heap numbers in a general way,
1380 // to hanlde NaNs correctly. 1380 // to hanlde NaNs correctly.
1381 __ cmp(FieldOperand(edx, HeapObject::kMapOffset), 1381 __ cmp(FieldOperand(edx, HeapObject::kMapOffset),
1382 Immediate(isolate()->factory()->heap_number_map())); 1382 Immediate(isolate()->factory()->heap_number_map()));
1383 __ j(equal, &generic_heap_number_comparison, Label::kNear); 1383 __ j(equal, &generic_heap_number_comparison, Label::kNear);
1384 if (cc != equal) { 1384 if (cc != equal) {
1385 // Call runtime on identical JSObjects. Otherwise return equal. 1385 // Call runtime on identical JSObjects. Otherwise return equal.
1386 __ CmpObjectType(eax, FIRST_SPEC_OBJECT_TYPE, ecx); 1386 __ CmpObjectType(eax, FIRST_SPEC_OBJECT_TYPE, ecx);
1387 __ j(above_equal, &not_identical); 1387 __ j(above_equal, &not_identical);
1388 // Call runtime on identical symbols since we need to throw a TypeError.
1389 __ CmpObjectType(eax, SYMBOL_TYPE, ecx);
1390 __ j(equal, &not_identical);
1388 } 1391 }
1389 __ Move(eax, Immediate(Smi::FromInt(EQUAL))); 1392 __ Move(eax, Immediate(Smi::FromInt(EQUAL)));
1390 __ ret(0); 1393 __ ret(0);
1391 1394
1392 1395
1393 __ bind(&not_identical); 1396 __ bind(&not_identical);
1394 } 1397 }
1395 1398
1396 // Strict equality can quickly decide whether objects are equal. 1399 // Strict equality can quickly decide whether objects are equal.
1397 // Non-strict object equality is slower, so it is handled later in the stub. 1400 // Non-strict object equality is slower, so it is handled later in the stub.
(...skipping 3669 matching lines...) Expand 10 before | Expand all | Expand 10 after
5067 ApiParameterOperand(2), kStackSpace, nullptr, 5070 ApiParameterOperand(2), kStackSpace, nullptr,
5068 Operand(ebp, 7 * kPointerSize), NULL); 5071 Operand(ebp, 7 * kPointerSize), NULL);
5069 } 5072 }
5070 5073
5071 5074
5072 #undef __ 5075 #undef __
5073 5076
5074 } } // namespace v8::internal 5077 } } // namespace v8::internal
5075 5078
5076 #endif // V8_TARGET_ARCH_X87 5079 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | test/mjsunit/es6/symbols.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698