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

Side by Side Diff: src/arm64/code-stubs-arm64.cc

Issue 1364373003: Full code shouldn't embed the type feedback vector. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Ports. Created 5 years, 2 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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_ARM64 5 #if V8_TARGET_ARCH_ARM64
6 6
7 #include "src/bootstrapper.h" 7 #include "src/bootstrapper.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/ic/handler-compiler.h" 10 #include "src/ic/handler-compiler.h"
(...skipping 2875 matching lines...) Expand 10 before | Expand all | Expand 10 after
2886 __ Ldr(x4, FieldMemOperand(x4, SharedFunctionInfo::kConstructStubOffset)); 2886 __ Ldr(x4, FieldMemOperand(x4, SharedFunctionInfo::kConstructStubOffset));
2887 __ Add(x4, x4, Code::kHeaderSize - kHeapObjectTag); 2887 __ Add(x4, x4, Code::kHeaderSize - kHeapObjectTag);
2888 __ Br(x4); 2888 __ Br(x4);
2889 2889
2890 __ Bind(&non_function); 2890 __ Bind(&non_function);
2891 __ Mov(x3, function); 2891 __ Mov(x3, function);
2892 __ Jump(isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET); 2892 __ Jump(isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET);
2893 } 2893 }
2894 2894
2895 2895
2896 static void EmitLoadTypeFeedbackVector(MacroAssembler* masm, Register vector) {
2897 __ Ldr(vector, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
2898 __ Ldr(vector, FieldMemOperand(vector,
2899 JSFunction::kSharedFunctionInfoOffset));
2900 __ Ldr(vector, FieldMemOperand(vector,
2901 SharedFunctionInfo::kFeedbackVectorOffset));
2902 }
2903
2904
2905 void CallICStub::HandleArrayCase(MacroAssembler* masm, Label* miss) { 2896 void CallICStub::HandleArrayCase(MacroAssembler* masm, Label* miss) {
2906 // x1 - function 2897 // x1 - function
2907 // x3 - slot id 2898 // x3 - slot id
2908 // x2 - vector 2899 // x2 - vector
2909 // x4 - allocation site (loaded from vector[slot]) 2900 // x4 - allocation site (loaded from vector[slot])
2910 Register function = x1; 2901 Register function = x1;
2911 Register feedback_vector = x2; 2902 Register feedback_vector = x2;
2912 Register index = x3; 2903 Register index = x3;
2913 Register allocation_site = x4; 2904 Register allocation_site = x4;
2914 Register scratch = x5; 2905 Register scratch = x5;
(...skipping 1455 matching lines...) Expand 10 before | Expand all | Expand 10 after
4370 __ Add(x1, x1, 1); 4361 __ Add(x1, x1, 1);
4371 } 4362 }
4372 masm->LeaveFrame(StackFrame::STUB_FAILURE_TRAMPOLINE); 4363 masm->LeaveFrame(StackFrame::STUB_FAILURE_TRAMPOLINE);
4373 __ Drop(x1); 4364 __ Drop(x1);
4374 // Return to IC Miss stub, continuation still on stack. 4365 // Return to IC Miss stub, continuation still on stack.
4375 __ Ret(); 4366 __ Ret();
4376 } 4367 }
4377 4368
4378 4369
4379 void LoadICTrampolineStub::Generate(MacroAssembler* masm) { 4370 void LoadICTrampolineStub::Generate(MacroAssembler* masm) {
4380 EmitLoadTypeFeedbackVector(masm, LoadWithVectorDescriptor::VectorRegister()); 4371 __ EmitLoadTypeFeedbackVector(LoadWithVectorDescriptor::VectorRegister());
4381 LoadICStub stub(isolate(), state()); 4372 LoadICStub stub(isolate(), state());
4382 stub.GenerateForTrampoline(masm); 4373 stub.GenerateForTrampoline(masm);
4383 } 4374 }
4384 4375
4385 4376
4386 void KeyedLoadICTrampolineStub::Generate(MacroAssembler* masm) { 4377 void KeyedLoadICTrampolineStub::Generate(MacroAssembler* masm) {
4387 EmitLoadTypeFeedbackVector(masm, LoadWithVectorDescriptor::VectorRegister()); 4378 __ EmitLoadTypeFeedbackVector(LoadWithVectorDescriptor::VectorRegister());
4388 KeyedLoadICStub stub(isolate(), state()); 4379 KeyedLoadICStub stub(isolate(), state());
4389 stub.GenerateForTrampoline(masm); 4380 stub.GenerateForTrampoline(masm);
4390 } 4381 }
4391 4382
4392 4383
4393 void CallICTrampolineStub::Generate(MacroAssembler* masm) { 4384 void CallICTrampolineStub::Generate(MacroAssembler* masm) {
4394 EmitLoadTypeFeedbackVector(masm, x2); 4385 __ EmitLoadTypeFeedbackVector(x2);
4395 CallICStub stub(isolate(), state()); 4386 CallICStub stub(isolate(), state());
4396 __ Jump(stub.GetCode(), RelocInfo::CODE_TARGET); 4387 __ Jump(stub.GetCode(), RelocInfo::CODE_TARGET);
4397 } 4388 }
4398 4389
4399 4390
4400 void LoadICStub::Generate(MacroAssembler* masm) { GenerateImpl(masm, false); } 4391 void LoadICStub::Generate(MacroAssembler* masm) { GenerateImpl(masm, false); }
4401 4392
4402 4393
4403 void LoadICStub::GenerateForTrampoline(MacroAssembler* masm) { 4394 void LoadICStub::GenerateForTrampoline(MacroAssembler* masm) {
4404 GenerateImpl(masm, true); 4395 GenerateImpl(masm, true);
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
4601 __ Bind(&miss); 4592 __ Bind(&miss);
4602 KeyedLoadIC::GenerateMiss(masm); 4593 KeyedLoadIC::GenerateMiss(masm);
4603 4594
4604 __ Bind(&load_smi_map); 4595 __ Bind(&load_smi_map);
4605 __ LoadRoot(receiver_map, Heap::kHeapNumberMapRootIndex); 4596 __ LoadRoot(receiver_map, Heap::kHeapNumberMapRootIndex);
4606 __ jmp(&compare_map); 4597 __ jmp(&compare_map);
4607 } 4598 }
4608 4599
4609 4600
4610 void VectorStoreICTrampolineStub::Generate(MacroAssembler* masm) { 4601 void VectorStoreICTrampolineStub::Generate(MacroAssembler* masm) {
4611 EmitLoadTypeFeedbackVector(masm, VectorStoreICDescriptor::VectorRegister()); 4602 __ EmitLoadTypeFeedbackVector(VectorStoreICDescriptor::VectorRegister());
4612 VectorStoreICStub stub(isolate(), state()); 4603 VectorStoreICStub stub(isolate(), state());
4613 stub.GenerateForTrampoline(masm); 4604 stub.GenerateForTrampoline(masm);
4614 } 4605 }
4615 4606
4616 4607
4617 void VectorKeyedStoreICTrampolineStub::Generate(MacroAssembler* masm) { 4608 void VectorKeyedStoreICTrampolineStub::Generate(MacroAssembler* masm) {
4618 EmitLoadTypeFeedbackVector(masm, VectorStoreICDescriptor::VectorRegister()); 4609 __ EmitLoadTypeFeedbackVector(VectorStoreICDescriptor::VectorRegister());
4619 VectorKeyedStoreICStub stub(isolate(), state()); 4610 VectorKeyedStoreICStub stub(isolate(), state());
4620 stub.GenerateForTrampoline(masm); 4611 stub.GenerateForTrampoline(masm);
4621 } 4612 }
4622 4613
4623 4614
4624 void VectorStoreICStub::Generate(MacroAssembler* masm) { 4615 void VectorStoreICStub::Generate(MacroAssembler* masm) {
4625 GenerateImpl(masm, false); 4616 GenerateImpl(masm, false);
4626 } 4617 }
4627 4618
4628 4619
(...skipping 1367 matching lines...) Expand 10 before | Expand all | Expand 10 after
5996 MemOperand(fp, 6 * kPointerSize), NULL); 5987 MemOperand(fp, 6 * kPointerSize), NULL);
5997 } 5988 }
5998 5989
5999 5990
6000 #undef __ 5991 #undef __
6001 5992
6002 } // namespace internal 5993 } // namespace internal
6003 } // namespace v8 5994 } // namespace v8
6004 5995
6005 #endif // V8_TARGET_ARCH_ARM64 5996 #endif // V8_TARGET_ARCH_ARM64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698