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

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

Issue 1355113002: [ic] Also collect known map for relational comparison. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address Jakob's comment. Created 5 years, 3 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/arm/code-stubs-arm.cc ('k') | src/code-stubs.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 #if V8_TARGET_ARCH_ARM64 5 #if V8_TARGET_ARCH_ARM64
6 6
7 #include "src/bootstrapper.h" 7 #include "src/bootstrapper.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/ic/handler-compiler.h" 10 #include "src/ic/handler-compiler.h"
(...skipping 3549 matching lines...) Expand 10 before | Expand all | Expand 10 after
3560 Register lhs_map = x11; 3560 Register lhs_map = x11;
3561 Register map = x12; 3561 Register map = x12;
3562 __ GetWeakValue(map, cell); 3562 __ GetWeakValue(map, cell);
3563 __ Ldr(rhs_map, FieldMemOperand(rhs, HeapObject::kMapOffset)); 3563 __ Ldr(rhs_map, FieldMemOperand(rhs, HeapObject::kMapOffset));
3564 __ Ldr(lhs_map, FieldMemOperand(lhs, HeapObject::kMapOffset)); 3564 __ Ldr(lhs_map, FieldMemOperand(lhs, HeapObject::kMapOffset));
3565 __ Cmp(rhs_map, map); 3565 __ Cmp(rhs_map, map);
3566 __ B(ne, &miss); 3566 __ B(ne, &miss);
3567 __ Cmp(lhs_map, map); 3567 __ Cmp(lhs_map, map);
3568 __ B(ne, &miss); 3568 __ B(ne, &miss);
3569 3569
3570 if (Token::IsEqualityOp(op())) {
3570 __ Sub(result, rhs, lhs); 3571 __ Sub(result, rhs, lhs);
3571 __ Ret(); 3572 __ Ret();
3573 } else if (is_strong(strength())) {
3574 __ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion, 0, 1);
3575 } else {
3576 Register ncr = x2;
3577 if (op() == Token::LT || op() == Token::LTE) {
3578 __ Mov(ncr, Smi::FromInt(GREATER));
3579 } else {
3580 __ Mov(ncr, Smi::FromInt(LESS));
3581 }
3582 __ Push(lhs, rhs, ncr);
3583 __ TailCallRuntime(Runtime::kCompare, 3, 1);
3584 }
3572 3585
3573 __ Bind(&miss); 3586 __ Bind(&miss);
3574 GenerateMiss(masm); 3587 GenerateMiss(masm);
3575 } 3588 }
3576 3589
3577 3590
3578 // This method handles the case where a compare stub had the wrong 3591 // This method handles the case where a compare stub had the wrong
3579 // implementation. It calls a miss handler, which re-writes the stub. All other 3592 // implementation. It calls a miss handler, which re-writes the stub. All other
3580 // CompareICStub::Generate* methods should fall back into this one if their 3593 // CompareICStub::Generate* methods should fall back into this one if their
3581 // operands were not the expected types. 3594 // operands were not the expected types.
(...skipping 2395 matching lines...) Expand 10 before | Expand all | Expand 10 after
5977 MemOperand(fp, 6 * kPointerSize), NULL); 5990 MemOperand(fp, 6 * kPointerSize), NULL);
5978 } 5991 }
5979 5992
5980 5993
5981 #undef __ 5994 #undef __
5982 5995
5983 } // namespace internal 5996 } // namespace internal
5984 } // namespace v8 5997 } // namespace v8
5985 5998
5986 #endif // V8_TARGET_ARCH_ARM64 5999 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698