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

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

Issue 2770003002: Set the current context to the function's context when entering to LAP. (Closed)
Patch Set: . Created 3 years, 9 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
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 #if V8_TARGET_ARCH_X64 5 #if V8_TARGET_ARCH_X64
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/base/division-by-constant.h" 8 #include "src/base/division-by-constant.h"
9 #include "src/base/utils/random-number-generator.h" 9 #include "src/base/utils/random-number-generator.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 4015 matching lines...) Expand 10 before | Expand all | Expand 10 after
4026 4026
4027 Condition MacroAssembler::IsObjectNameType(Register heap_object, 4027 Condition MacroAssembler::IsObjectNameType(Register heap_object,
4028 Register map, 4028 Register map,
4029 Register instance_type) { 4029 Register instance_type) {
4030 movp(map, FieldOperand(heap_object, HeapObject::kMapOffset)); 4030 movp(map, FieldOperand(heap_object, HeapObject::kMapOffset));
4031 movzxbl(instance_type, FieldOperand(map, Map::kInstanceTypeOffset)); 4031 movzxbl(instance_type, FieldOperand(map, Map::kInstanceTypeOffset));
4032 cmpb(instance_type, Immediate(static_cast<uint8_t>(LAST_NAME_TYPE))); 4032 cmpb(instance_type, Immediate(static_cast<uint8_t>(LAST_NAME_TYPE)));
4033 return below_equal; 4033 return below_equal;
4034 } 4034 }
4035 4035
4036 void MacroAssembler::GetMapConstructor(Register result, Register map,
4037 Register temp) {
4038 Label done, loop;
4039 movp(result, FieldOperand(map, Map::kConstructorOrBackPointerOffset));
4040 bind(&loop);
4041 JumpIfSmi(result, &done, Label::kNear);
4042 CmpObjectType(result, MAP_TYPE, temp);
4043 j(not_equal, &done, Label::kNear);
4044 movp(result, FieldOperand(result, Map::kConstructorOrBackPointerOffset));
4045 jmp(&loop);
4046 bind(&done);
4047 }
4036 4048
4037 void MacroAssembler::SetCounter(StatsCounter* counter, int value) { 4049 void MacroAssembler::SetCounter(StatsCounter* counter, int value) {
4038 if (FLAG_native_code_counters && counter->Enabled()) { 4050 if (FLAG_native_code_counters && counter->Enabled()) {
4039 Operand counter_operand = ExternalOperand(ExternalReference(counter)); 4051 Operand counter_operand = ExternalOperand(ExternalReference(counter));
4040 movl(counter_operand, Immediate(value)); 4052 movl(counter_operand, Immediate(value));
4041 } 4053 }
4042 } 4054 }
4043 4055
4044 4056
4045 void MacroAssembler::IncrementCounter(StatsCounter* counter, int value) { 4057 void MacroAssembler::IncrementCounter(StatsCounter* counter, int value) {
(...skipping 1234 matching lines...) Expand 10 before | Expand all | Expand 10 after
5280 movl(rax, dividend); 5292 movl(rax, dividend);
5281 shrl(rax, Immediate(31)); 5293 shrl(rax, Immediate(31));
5282 addl(rdx, rax); 5294 addl(rdx, rax);
5283 } 5295 }
5284 5296
5285 5297
5286 } // namespace internal 5298 } // namespace internal
5287 } // namespace v8 5299 } // namespace v8
5288 5300
5289 #endif // V8_TARGET_ARCH_X64 5301 #endif // V8_TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698