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

Side by Side Diff: src/arm/code-stubs-arm.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
« no previous file with comments | « no previous file | src/arm/macro-assembler-arm.h » ('j') | src/type-feedback-vector.cc » ('J')
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 #if V8_TARGET_ARCH_ARM 5 #if V8_TARGET_ARCH_ARM
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/bootstrapper.h" 8 #include "src/bootstrapper.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 2489 matching lines...) Expand 10 before | Expand all | Expand 10 after
2500 __ ldr(r4, FieldMemOperand(r1, JSFunction::kSharedFunctionInfoOffset)); 2500 __ ldr(r4, FieldMemOperand(r1, JSFunction::kSharedFunctionInfoOffset));
2501 __ ldr(r4, FieldMemOperand(r4, SharedFunctionInfo::kConstructStubOffset)); 2501 __ ldr(r4, FieldMemOperand(r4, SharedFunctionInfo::kConstructStubOffset));
2502 __ add(pc, r4, Operand(Code::kHeaderSize - kHeapObjectTag)); 2502 __ add(pc, r4, Operand(Code::kHeaderSize - kHeapObjectTag));
2503 2503
2504 __ bind(&non_function); 2504 __ bind(&non_function);
2505 __ mov(r3, r1); 2505 __ mov(r3, r1);
2506 __ Jump(isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET); 2506 __ Jump(isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET);
2507 } 2507 }
2508 2508
2509 2509
2510 static void EmitLoadTypeFeedbackVector(MacroAssembler* masm, Register vector) {
2511 __ ldr(vector, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
2512 __ ldr(vector, FieldMemOperand(vector,
2513 JSFunction::kSharedFunctionInfoOffset));
2514 __ ldr(vector, FieldMemOperand(vector,
2515 SharedFunctionInfo::kFeedbackVectorOffset));
2516 }
2517
2518
2519 void CallICStub::HandleArrayCase(MacroAssembler* masm, Label* miss) { 2510 void CallICStub::HandleArrayCase(MacroAssembler* masm, Label* miss) {
2520 // r1 - function 2511 // r1 - function
2521 // r3 - slot id 2512 // r3 - slot id
2522 // r2 - vector 2513 // r2 - vector
2523 // r4 - allocation site (loaded from vector[slot]) 2514 // r4 - allocation site (loaded from vector[slot])
2524 __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, r5); 2515 __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, r5);
2525 __ cmp(r1, r5); 2516 __ cmp(r1, r5);
2526 __ b(ne, miss); 2517 __ b(ne, miss);
2527 2518
2528 __ mov(r0, Operand(arg_count())); 2519 __ mov(r0, Operand(arg_count()));
(...skipping 1705 matching lines...) Expand 10 before | Expand all | Expand 10 after
4234 __ add(r1, r1, Operand(1)); 4225 __ add(r1, r1, Operand(1));
4235 } 4226 }
4236 masm->LeaveFrame(StackFrame::STUB_FAILURE_TRAMPOLINE); 4227 masm->LeaveFrame(StackFrame::STUB_FAILURE_TRAMPOLINE);
4237 __ mov(r1, Operand(r1, LSL, kPointerSizeLog2)); 4228 __ mov(r1, Operand(r1, LSL, kPointerSizeLog2));
4238 __ add(sp, sp, r1); 4229 __ add(sp, sp, r1);
4239 __ Ret(); 4230 __ Ret();
4240 } 4231 }
4241 4232
4242 4233
4243 void LoadICTrampolineStub::Generate(MacroAssembler* masm) { 4234 void LoadICTrampolineStub::Generate(MacroAssembler* masm) {
4244 EmitLoadTypeFeedbackVector(masm, LoadWithVectorDescriptor::VectorRegister()); 4235 __ EmitLoadTypeFeedbackVector(LoadWithVectorDescriptor::VectorRegister());
4245 LoadICStub stub(isolate(), state()); 4236 LoadICStub stub(isolate(), state());
4246 stub.GenerateForTrampoline(masm); 4237 stub.GenerateForTrampoline(masm);
4247 } 4238 }
4248 4239
4249 4240
4250 void KeyedLoadICTrampolineStub::Generate(MacroAssembler* masm) { 4241 void KeyedLoadICTrampolineStub::Generate(MacroAssembler* masm) {
4251 EmitLoadTypeFeedbackVector(masm, LoadWithVectorDescriptor::VectorRegister()); 4242 __ EmitLoadTypeFeedbackVector(LoadWithVectorDescriptor::VectorRegister());
4252 KeyedLoadICStub stub(isolate(), state()); 4243 KeyedLoadICStub stub(isolate(), state());
4253 stub.GenerateForTrampoline(masm); 4244 stub.GenerateForTrampoline(masm);
4254 } 4245 }
4255 4246
4256 4247
4257 void CallICTrampolineStub::Generate(MacroAssembler* masm) { 4248 void CallICTrampolineStub::Generate(MacroAssembler* masm) {
4258 EmitLoadTypeFeedbackVector(masm, r2); 4249 __ EmitLoadTypeFeedbackVector(r2);
4259 CallICStub stub(isolate(), state()); 4250 CallICStub stub(isolate(), state());
4260 __ Jump(stub.GetCode(), RelocInfo::CODE_TARGET); 4251 __ Jump(stub.GetCode(), RelocInfo::CODE_TARGET);
4261 } 4252 }
4262 4253
4263 4254
4264 void LoadICStub::Generate(MacroAssembler* masm) { GenerateImpl(masm, false); } 4255 void LoadICStub::Generate(MacroAssembler* masm) { GenerateImpl(masm, false); }
4265 4256
4266 4257
4267 void LoadICStub::GenerateForTrampoline(MacroAssembler* masm) { 4258 void LoadICStub::GenerateForTrampoline(MacroAssembler* masm) {
4268 GenerateImpl(masm, true); 4259 GenerateImpl(masm, true);
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
4465 __ bind(&miss); 4456 __ bind(&miss);
4466 KeyedLoadIC::GenerateMiss(masm); 4457 KeyedLoadIC::GenerateMiss(masm);
4467 4458
4468 __ bind(&load_smi_map); 4459 __ bind(&load_smi_map);
4469 __ LoadRoot(receiver_map, Heap::kHeapNumberMapRootIndex); 4460 __ LoadRoot(receiver_map, Heap::kHeapNumberMapRootIndex);
4470 __ jmp(&compare_map); 4461 __ jmp(&compare_map);
4471 } 4462 }
4472 4463
4473 4464
4474 void VectorStoreICTrampolineStub::Generate(MacroAssembler* masm) { 4465 void VectorStoreICTrampolineStub::Generate(MacroAssembler* masm) {
4475 EmitLoadTypeFeedbackVector(masm, VectorStoreICDescriptor::VectorRegister()); 4466 __ EmitLoadTypeFeedbackVector(VectorStoreICDescriptor::VectorRegister());
4476 VectorStoreICStub stub(isolate(), state()); 4467 VectorStoreICStub stub(isolate(), state());
4477 stub.GenerateForTrampoline(masm); 4468 stub.GenerateForTrampoline(masm);
4478 } 4469 }
4479 4470
4480 4471
4481 void VectorKeyedStoreICTrampolineStub::Generate(MacroAssembler* masm) { 4472 void VectorKeyedStoreICTrampolineStub::Generate(MacroAssembler* masm) {
4482 EmitLoadTypeFeedbackVector(masm, VectorStoreICDescriptor::VectorRegister()); 4473 __ EmitLoadTypeFeedbackVector(VectorStoreICDescriptor::VectorRegister());
4483 VectorKeyedStoreICStub stub(isolate(), state()); 4474 VectorKeyedStoreICStub stub(isolate(), state());
4484 stub.GenerateForTrampoline(masm); 4475 stub.GenerateForTrampoline(masm);
4485 } 4476 }
4486 4477
4487 4478
4488 void VectorStoreICStub::Generate(MacroAssembler* masm) { 4479 void VectorStoreICStub::Generate(MacroAssembler* masm) {
4489 GenerateImpl(masm, false); 4480 GenerateImpl(masm, false);
4490 } 4481 }
4491 4482
4492 4483
(...skipping 1049 matching lines...) Expand 10 before | Expand all | Expand 10 after
5542 MemOperand(fp, 6 * kPointerSize), NULL); 5533 MemOperand(fp, 6 * kPointerSize), NULL);
5543 } 5534 }
5544 5535
5545 5536
5546 #undef __ 5537 #undef __
5547 5538
5548 } // namespace internal 5539 } // namespace internal
5549 } // namespace v8 5540 } // namespace v8
5550 5541
5551 #endif // V8_TARGET_ARCH_ARM 5542 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm/macro-assembler-arm.h » ('j') | src/type-feedback-vector.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698