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

Side by Side Diff: src/ia32/macro-assembler-ia32.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/ia32/macro-assembler-ia32.h ('k') | src/ic/ic-compiler.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_IA32 7 #if V8_TARGET_ARCH_IA32
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 722 matching lines...) Expand 10 before | Expand all | Expand 10 after
733 SmiCheckType smi_check_type) { 733 SmiCheckType smi_check_type) {
734 if (smi_check_type == DO_SMI_CHECK) { 734 if (smi_check_type == DO_SMI_CHECK) {
735 JumpIfSmi(obj, fail); 735 JumpIfSmi(obj, fail);
736 } 736 }
737 737
738 CompareMap(obj, map); 738 CompareMap(obj, map);
739 j(not_equal, fail); 739 j(not_equal, fail);
740 } 740 }
741 741
742 742
743 void MacroAssembler::DispatchMap(Register obj, 743 void MacroAssembler::DispatchWeakMap(Register obj, Register scratch1,
744 Register unused, 744 Register scratch2, Handle<WeakCell> cell,
745 Handle<Map> map, 745 Handle<Code> success,
746 Handle<Code> success, 746 SmiCheckType smi_check_type) {
747 SmiCheckType smi_check_type) {
748 Label fail; 747 Label fail;
749 if (smi_check_type == DO_SMI_CHECK) { 748 if (smi_check_type == DO_SMI_CHECK) {
750 JumpIfSmi(obj, &fail); 749 JumpIfSmi(obj, &fail);
751 } 750 }
752 cmp(FieldOperand(obj, HeapObject::kMapOffset), Immediate(map)); 751 mov(scratch1, FieldOperand(obj, HeapObject::kMapOffset));
752 CmpWeakValue(scratch1, cell, scratch2);
753 j(equal, success); 753 j(equal, success);
754 754
755 bind(&fail); 755 bind(&fail);
756 } 756 }
757 757
758 758
759 Condition MacroAssembler::IsObjectStringType(Register heap_object, 759 Condition MacroAssembler::IsObjectStringType(Register heap_object,
760 Register map, 760 Register map,
761 Register instance_type) { 761 Register instance_type) {
762 mov(map, FieldOperand(heap_object, HeapObject::kMapOffset)); 762 mov(map, FieldOperand(heap_object, HeapObject::kMapOffset));
(...skipping 2687 matching lines...) Expand 10 before | Expand all | Expand 10 after
3450 if (mag.shift > 0) sar(edx, mag.shift); 3450 if (mag.shift > 0) sar(edx, mag.shift);
3451 mov(eax, dividend); 3451 mov(eax, dividend);
3452 shr(eax, 31); 3452 shr(eax, 31);
3453 add(edx, eax); 3453 add(edx, eax);
3454 } 3454 }
3455 3455
3456 3456
3457 } } // namespace v8::internal 3457 } } // namespace v8::internal
3458 3458
3459 #endif // V8_TARGET_ARCH_IA32 3459 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/macro-assembler-ia32.h ('k') | src/ic/ic-compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698