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

Side by Side Diff: src/arm64/macro-assembler-arm64.cc

Issue 817873003: Use weak cell in monomorphic KeyedStore IC. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix mips Created 6 years 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/macro-assembler-arm64.h ('k') | src/ia32/macro-assembler-ia32.h » ('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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_ARM64 7 #if V8_TARGET_ARCH_ARM64
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/base/division-by-constant.h" 10 #include "src/base/division-by-constant.h"
(...skipping 3770 matching lines...) Expand 10 before | Expand all | Expand 10 after
3781 SmiCheckType smi_check_type) { 3781 SmiCheckType smi_check_type) {
3782 if (smi_check_type == DO_SMI_CHECK) { 3782 if (smi_check_type == DO_SMI_CHECK) {
3783 JumpIfSmi(obj_map, fail); 3783 JumpIfSmi(obj_map, fail);
3784 } 3784 }
3785 3785
3786 CompareMap(obj_map, map); 3786 CompareMap(obj_map, map);
3787 B(ne, fail); 3787 B(ne, fail);
3788 } 3788 }
3789 3789
3790 3790
3791 void MacroAssembler::DispatchMap(Register obj, 3791 void MacroAssembler::DispatchWeakMap(Register obj, Register scratch1,
3792 Register scratch, 3792 Register scratch2, Handle<WeakCell> cell,
3793 Handle<Map> map, 3793 Handle<Code> success,
3794 Handle<Code> success, 3794 SmiCheckType smi_check_type) {
3795 SmiCheckType smi_check_type) {
3796 Label fail; 3795 Label fail;
3797 if (smi_check_type == DO_SMI_CHECK) { 3796 if (smi_check_type == DO_SMI_CHECK) {
3798 JumpIfSmi(obj, &fail); 3797 JumpIfSmi(obj, &fail);
3799 } 3798 }
3800 Ldr(scratch, FieldMemOperand(obj, HeapObject::kMapOffset)); 3799 Ldr(scratch1, FieldMemOperand(obj, HeapObject::kMapOffset));
3801 Cmp(scratch, Operand(map)); 3800 CmpWeakValue(scratch1, cell, scratch2);
3802 B(ne, &fail); 3801 B(ne, &fail);
3803 Jump(success, RelocInfo::CODE_TARGET); 3802 Jump(success, RelocInfo::CODE_TARGET);
3804 Bind(&fail); 3803 Bind(&fail);
3805 } 3804 }
3806 3805
3807 3806
3808 void MacroAssembler::CmpWeakValue(Register value, Handle<WeakCell> cell, 3807 void MacroAssembler::CmpWeakValue(Register value, Handle<WeakCell> cell,
3809 Register scratch) { 3808 Register scratch) {
3810 Mov(scratch, Operand(cell)); 3809 Mov(scratch, Operand(cell));
3811 Ldr(scratch, FieldMemOperand(scratch, WeakCell::kValueOffset)); 3810 Ldr(scratch, FieldMemOperand(scratch, WeakCell::kValueOffset));
(...skipping 1582 matching lines...) Expand 10 before | Expand all | Expand 10 after
5394 } 5393 }
5395 } 5394 }
5396 5395
5397 5396
5398 #undef __ 5397 #undef __
5399 5398
5400 5399
5401 } } // namespace v8::internal 5400 } } // namespace v8::internal
5402 5401
5403 #endif // V8_TARGET_ARCH_ARM64 5402 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm64/macro-assembler-arm64.h ('k') | src/ia32/macro-assembler-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698