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

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

Issue 877243004: Load callback data from weak cell instead of embedding it in handler. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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 2648 matching lines...) Expand 10 before | Expand all | Expand 10 after
2659 } 2659 }
2660 2660
2661 2661
2662 void MacroAssembler::CmpWeakValue(Register value, Handle<WeakCell> cell, 2662 void MacroAssembler::CmpWeakValue(Register value, Handle<WeakCell> cell,
2663 Register scratch) { 2663 Register scratch) {
2664 Move(scratch, cell, RelocInfo::EMBEDDED_OBJECT); 2664 Move(scratch, cell, RelocInfo::EMBEDDED_OBJECT);
2665 cmpp(value, FieldOperand(scratch, WeakCell::kValueOffset)); 2665 cmpp(value, FieldOperand(scratch, WeakCell::kValueOffset));
2666 } 2666 }
2667 2667
2668 2668
2669 void MacroAssembler::GetWeakValue(Register value, Handle<WeakCell> cell) {
2670 Move(value, cell, RelocInfo::EMBEDDED_OBJECT);
2671 movp(value, FieldOperand(value, WeakCell::kValueOffset));
2672 }
2673
2674
2669 void MacroAssembler::LoadWeakValue(Register value, Handle<WeakCell> cell, 2675 void MacroAssembler::LoadWeakValue(Register value, Handle<WeakCell> cell,
2670 Label* miss) { 2676 Label* miss) {
2671 Move(value, cell, RelocInfo::EMBEDDED_OBJECT); 2677 GetWeakValue(value, cell);
2672 movp(value, FieldOperand(value, WeakCell::kValueOffset));
2673 JumpIfSmi(value, miss); 2678 JumpIfSmi(value, miss);
2674 } 2679 }
2675 2680
2676 2681
2677 void MacroAssembler::Drop(int stack_elements) { 2682 void MacroAssembler::Drop(int stack_elements) {
2678 if (stack_elements > 0) { 2683 if (stack_elements > 0) {
2679 addp(rsp, Immediate(stack_elements * kPointerSize)); 2684 addp(rsp, Immediate(stack_elements * kPointerSize));
2680 } 2685 }
2681 } 2686 }
2682 2687
(...skipping 2508 matching lines...) Expand 10 before | Expand all | Expand 10 after
5191 if (mag.shift > 0) sarl(rdx, Immediate(mag.shift)); 5196 if (mag.shift > 0) sarl(rdx, Immediate(mag.shift));
5192 movl(rax, dividend); 5197 movl(rax, dividend);
5193 shrl(rax, Immediate(31)); 5198 shrl(rax, Immediate(31));
5194 addl(rdx, rax); 5199 addl(rdx, rax);
5195 } 5200 }
5196 5201
5197 5202
5198 } } // namespace v8::internal 5203 } } // namespace v8::internal
5199 5204
5200 #endif // V8_TARGET_ARCH_X64 5205 #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