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

Side by Side Diff: src/arm/code-stubs-arm.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 | « no previous file | src/arm64/code-stubs-arm64.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_ARM 7 #if V8_TARGET_ARCH_ARM
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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 __ cmp(r0, r1); 246 __ cmp(r0, r1);
247 __ b(ne, &not_identical); 247 __ b(ne, &not_identical);
248 248
249 // Test for NaN. Sadly, we can't just compare to Factory::nan_value(), 249 // Test for NaN. Sadly, we can't just compare to Factory::nan_value(),
250 // so we do the second best thing - test it ourselves. 250 // so we do the second best thing - test it ourselves.
251 // They are both equal and they are not both Smis so both of them are not 251 // They are both equal and they are not both Smis so both of them are not
252 // Smis. If it's not a heap number, then return equal. 252 // Smis. If it's not a heap number, then return equal.
253 if (cond == lt || cond == gt) { 253 if (cond == lt || cond == gt) {
254 __ CompareObjectType(r0, r4, r4, FIRST_SPEC_OBJECT_TYPE); 254 __ CompareObjectType(r0, r4, r4, FIRST_SPEC_OBJECT_TYPE);
255 __ b(ge, slow); 255 __ b(ge, slow);
256 __ CompareObjectType(r0, r4, r4, SYMBOL_TYPE);
257 __ b(eq, slow);
256 } else { 258 } else {
257 __ CompareObjectType(r0, r4, r4, HEAP_NUMBER_TYPE); 259 __ CompareObjectType(r0, r4, r4, HEAP_NUMBER_TYPE);
258 __ b(eq, &heap_number); 260 __ b(eq, &heap_number);
259 // Comparing JS objects with <=, >= is complicated. 261 // Comparing JS objects with <=, >= is complicated.
260 if (cond != eq) { 262 if (cond != eq) {
261 __ cmp(r4, Operand(FIRST_SPEC_OBJECT_TYPE)); 263 __ cmp(r4, Operand(FIRST_SPEC_OBJECT_TYPE));
262 __ b(ge, slow); 264 __ b(ge, slow);
263 // Normally here we fall through to return_equal, but undefined is 265 // Normally here we fall through to return_equal, but undefined is
264 // special: (undefined == undefined) == true, but 266 // special: (undefined == undefined) == true, but
265 // (undefined <= undefined) == false! See ECMAScript 11.8.5. 267 // (undefined <= undefined) == false! See ECMAScript 11.8.5.
(...skipping 5017 matching lines...) Expand 10 before | Expand all | Expand 10 after
5283 kStackUnwindSpace, NULL, 5285 kStackUnwindSpace, NULL,
5284 MemOperand(fp, 6 * kPointerSize), NULL); 5286 MemOperand(fp, 6 * kPointerSize), NULL);
5285 } 5287 }
5286 5288
5287 5289
5288 #undef __ 5290 #undef __
5289 5291
5290 } } // namespace v8::internal 5292 } } // namespace v8::internal
5291 5293
5292 #endif // V8_TARGET_ARCH_ARM 5294 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm64/code-stubs-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698