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

Side by Side Diff: src/x64/macro-assembler-x64.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 5 years, 12 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/x64/macro-assembler-x64.h ('k') | src/x87/macro-assembler-x87.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 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_X64 7 #if V8_TARGET_ARCH_X64
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 3612 matching lines...) Expand 10 before | Expand all | Expand 10 after
3623 3623
3624 3624
3625 void MacroAssembler::EnumLength(Register dst, Register map) { 3625 void MacroAssembler::EnumLength(Register dst, Register map) {
3626 STATIC_ASSERT(Map::EnumLengthBits::kShift == 0); 3626 STATIC_ASSERT(Map::EnumLengthBits::kShift == 0);
3627 movl(dst, FieldOperand(map, Map::kBitField3Offset)); 3627 movl(dst, FieldOperand(map, Map::kBitField3Offset));
3628 andl(dst, Immediate(Map::EnumLengthBits::kMask)); 3628 andl(dst, Immediate(Map::EnumLengthBits::kMask));
3629 Integer32ToSmi(dst, dst); 3629 Integer32ToSmi(dst, dst);
3630 } 3630 }
3631 3631
3632 3632
3633 void MacroAssembler::DispatchMap(Register obj, 3633 void MacroAssembler::DispatchWeakMap(Register obj, Register scratch1,
3634 Register unused, 3634 Register scratch2, Handle<WeakCell> cell,
3635 Handle<Map> map, 3635 Handle<Code> success,
3636 Handle<Code> success, 3636 SmiCheckType smi_check_type) {
3637 SmiCheckType smi_check_type) {
3638 Label fail; 3637 Label fail;
3639 if (smi_check_type == DO_SMI_CHECK) { 3638 if (smi_check_type == DO_SMI_CHECK) {
3640 JumpIfSmi(obj, &fail); 3639 JumpIfSmi(obj, &fail);
3641 } 3640 }
3642 Cmp(FieldOperand(obj, HeapObject::kMapOffset), map); 3641 movq(scratch1, FieldOperand(obj, HeapObject::kMapOffset));
3642 CmpWeakValue(scratch1, cell, scratch2);
3643 j(equal, success, RelocInfo::CODE_TARGET); 3643 j(equal, success, RelocInfo::CODE_TARGET);
3644
3645 bind(&fail); 3644 bind(&fail);
3646 } 3645 }
3647 3646
3648 3647
3649 void MacroAssembler::AssertNumber(Register object) { 3648 void MacroAssembler::AssertNumber(Register object) {
3650 if (emit_debug_code()) { 3649 if (emit_debug_code()) {
3651 Label ok; 3650 Label ok;
3652 Condition is_smi = CheckSmi(object); 3651 Condition is_smi = CheckSmi(object);
3653 j(is_smi, &ok, Label::kNear); 3652 j(is_smi, &ok, Label::kNear);
3654 Cmp(FieldOperand(object, HeapObject::kMapOffset), 3653 Cmp(FieldOperand(object, HeapObject::kMapOffset),
(...skipping 1742 matching lines...) Expand 10 before | Expand all | Expand 10 after
5397 if (mag.shift > 0) sarl(rdx, Immediate(mag.shift)); 5396 if (mag.shift > 0) sarl(rdx, Immediate(mag.shift));
5398 movl(rax, dividend); 5397 movl(rax, dividend);
5399 shrl(rax, Immediate(31)); 5398 shrl(rax, Immediate(31));
5400 addl(rdx, rax); 5399 addl(rdx, rax);
5401 } 5400 }
5402 5401
5403 5402
5404 } } // namespace v8::internal 5403 } } // namespace v8::internal
5405 5404
5406 #endif // V8_TARGET_ARCH_X64 5405 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | src/x87/macro-assembler-x87.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698