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

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

Issue 753993003: Use weak cells in map checks in polymorphic ICs. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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
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 2834 matching lines...) Expand 10 before | Expand all | Expand 10 after
2845 if (dst.is(rax)) { 2845 if (dst.is(rax)) {
2846 AllowDeferredHandleDereference embedding_raw_address; 2846 AllowDeferredHandleDereference embedding_raw_address;
2847 load_rax(cell.location(), RelocInfo::CELL); 2847 load_rax(cell.location(), RelocInfo::CELL);
2848 } else { 2848 } else {
2849 Move(dst, cell, RelocInfo::CELL); 2849 Move(dst, cell, RelocInfo::CELL);
2850 movp(dst, Operand(dst, 0)); 2850 movp(dst, Operand(dst, 0));
2851 } 2851 }
2852 } 2852 }
2853 2853
2854 2854
2855 void MacroAssembler::CmpWeakValue(Register value, Register scratch,
2856 Handle<WeakCell> cell) {
2857 Move(scratch, cell, RelocInfo::EMBEDDED_OBJECT);
2858 cmpp(value, FieldOperand(scratch, WeakCell::kValueOffset));
2859 }
2860
2861
2855 void MacroAssembler::Drop(int stack_elements) { 2862 void MacroAssembler::Drop(int stack_elements) {
2856 if (stack_elements > 0) { 2863 if (stack_elements > 0) {
2857 addp(rsp, Immediate(stack_elements * kPointerSize)); 2864 addp(rsp, Immediate(stack_elements * kPointerSize));
2858 } 2865 }
2859 } 2866 }
2860 2867
2861 2868
2862 void MacroAssembler::DropUnderReturnAddress(int stack_elements, 2869 void MacroAssembler::DropUnderReturnAddress(int stack_elements,
2863 Register scratch) { 2870 Register scratch) {
2864 DCHECK(stack_elements > 0); 2871 DCHECK(stack_elements > 0);
(...skipping 2529 matching lines...) Expand 10 before | Expand all | Expand 10 after
5394 if (mag.shift > 0) sarl(rdx, Immediate(mag.shift)); 5401 if (mag.shift > 0) sarl(rdx, Immediate(mag.shift));
5395 movl(rax, dividend); 5402 movl(rax, dividend);
5396 shrl(rax, Immediate(31)); 5403 shrl(rax, Immediate(31));
5397 addl(rdx, rax); 5404 addl(rdx, rax);
5398 } 5405 }
5399 5406
5400 5407
5401 } } // namespace v8::internal 5408 } } // namespace v8::internal
5402 5409
5403 #endif // V8_TARGET_ARCH_X64 5410 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/heap/objects-visiting-inl.h ('K') | « src/x64/macro-assembler-x64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698