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

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

Issue 1128143002: [es6] Fix symbol comparison on some architectures (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); 256 __ cmp(r4, Operand(SYMBOL_TYPE));
257 __ b(eq, slow); 257 __ b(eq, slow);
258 } else { 258 } else {
259 __ CompareObjectType(r0, r4, r4, HEAP_NUMBER_TYPE); 259 __ CompareObjectType(r0, r4, r4, HEAP_NUMBER_TYPE);
260 __ b(eq, &heap_number); 260 __ b(eq, &heap_number);
261 // Comparing JS objects with <=, >= is complicated. 261 // Comparing JS objects with <=, >= is complicated.
262 if (cond != eq) { 262 if (cond != eq) {
263 __ cmp(r4, Operand(FIRST_SPEC_OBJECT_TYPE)); 263 __ cmp(r4, Operand(FIRST_SPEC_OBJECT_TYPE));
264 __ b(ge, slow); 264 __ b(ge, slow);
265 __ cmp(r4, Operand(SYMBOL_TYPE));
266 __ b(eq, slow);
265 // Normally here we fall through to return_equal, but undefined is 267 // Normally here we fall through to return_equal, but undefined is
266 // special: (undefined == undefined) == true, but 268 // special: (undefined == undefined) == true, but
267 // (undefined <= undefined) == false! See ECMAScript 11.8.5. 269 // (undefined <= undefined) == false! See ECMAScript 11.8.5.
268 if (cond == le || cond == ge) { 270 if (cond == le || cond == ge) {
269 __ cmp(r4, Operand(ODDBALL_TYPE)); 271 __ cmp(r4, Operand(ODDBALL_TYPE));
270 __ b(ne, &return_equal); 272 __ b(ne, &return_equal);
271 __ LoadRoot(r2, Heap::kUndefinedValueRootIndex); 273 __ LoadRoot(r2, Heap::kUndefinedValueRootIndex);
272 __ cmp(r0, r2); 274 __ cmp(r0, r2);
273 __ b(ne, &return_equal); 275 __ b(ne, &return_equal);
274 if (cond == le) { 276 if (cond == le) {
(...skipping 5015 matching lines...) Expand 10 before | Expand all | Expand 10 after
5290 kStackUnwindSpace, NULL, 5292 kStackUnwindSpace, NULL,
5291 MemOperand(fp, 6 * kPointerSize), NULL); 5293 MemOperand(fp, 6 * kPointerSize), NULL);
5292 } 5294 }
5293 5295
5294 5296
5295 #undef __ 5297 #undef __
5296 5298
5297 } } // namespace v8::internal 5299 } } // namespace v8::internal
5298 5300
5299 #endif // V8_TARGET_ARCH_ARM 5301 #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