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

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

Issue 12781004: Refactoring Store ICs. A first step towards polymorphic store ICs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: space nits Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/arm/stub-cache-arm.cc » ('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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 4495 matching lines...) Expand 10 before | Expand all | Expand 10 after
4506 // -- r2 : name 4506 // -- r2 : name
4507 // -- lr : return address 4507 // -- lr : return address
4508 // -- r0 : receiver 4508 // -- r0 : receiver
4509 // -- sp[0] : receiver 4509 // -- sp[0] : receiver
4510 // ----------------------------------- 4510 // -----------------------------------
4511 receiver = r0; 4511 receiver = r0;
4512 } 4512 }
4513 4513
4514 StubCompiler::GenerateLoadArrayLength(masm, receiver, r3, &miss); 4514 StubCompiler::GenerateLoadArrayLength(masm, receiver, r3, &miss);
4515 __ bind(&miss); 4515 __ bind(&miss);
4516 StubCompiler::GenerateLoadMiss(masm, kind()); 4516 StubCompiler::TailCallBuiltin(masm, StubCompiler::MissBuiltin(kind()));
4517 } 4517 }
4518 4518
4519 4519
4520 void FunctionPrototypeStub::Generate(MacroAssembler* masm) { 4520 void FunctionPrototypeStub::Generate(MacroAssembler* masm) {
4521 Label miss; 4521 Label miss;
4522 Register receiver; 4522 Register receiver;
4523 if (kind() == Code::KEYED_LOAD_IC) { 4523 if (kind() == Code::KEYED_LOAD_IC) {
4524 // ----------- S t a t e ------------- 4524 // ----------- S t a t e -------------
4525 // -- lr : return address 4525 // -- lr : return address
4526 // -- r0 : key 4526 // -- r0 : key
4527 // -- r1 : receiver 4527 // -- r1 : receiver
4528 // ----------------------------------- 4528 // -----------------------------------
4529 __ cmp(r0, Operand(masm->isolate()->factory()->prototype_string())); 4529 __ cmp(r0, Operand(masm->isolate()->factory()->prototype_string()));
4530 __ b(ne, &miss); 4530 __ b(ne, &miss);
4531 receiver = r1; 4531 receiver = r1;
4532 } else { 4532 } else {
4533 ASSERT(kind() == Code::LOAD_IC); 4533 ASSERT(kind() == Code::LOAD_IC);
4534 // ----------- S t a t e ------------- 4534 // ----------- S t a t e -------------
4535 // -- r2 : name 4535 // -- r2 : name
4536 // -- lr : return address 4536 // -- lr : return address
4537 // -- r0 : receiver 4537 // -- r0 : receiver
4538 // -- sp[0] : receiver 4538 // -- sp[0] : receiver
4539 // ----------------------------------- 4539 // -----------------------------------
4540 receiver = r0; 4540 receiver = r0;
4541 } 4541 }
4542 4542
4543 StubCompiler::GenerateLoadFunctionPrototype(masm, receiver, r3, r4, &miss); 4543 StubCompiler::GenerateLoadFunctionPrototype(masm, receiver, r3, r4, &miss);
4544 __ bind(&miss); 4544 __ bind(&miss);
4545 StubCompiler::GenerateLoadMiss(masm, kind()); 4545 StubCompiler::TailCallBuiltin(masm, StubCompiler::MissBuiltin(kind()));
4546 } 4546 }
4547 4547
4548 4548
4549 void StringLengthStub::Generate(MacroAssembler* masm) { 4549 void StringLengthStub::Generate(MacroAssembler* masm) {
4550 Label miss; 4550 Label miss;
4551 Register receiver; 4551 Register receiver;
4552 if (kind() == Code::KEYED_LOAD_IC) { 4552 if (kind() == Code::KEYED_LOAD_IC) {
4553 // ----------- S t a t e ------------- 4553 // ----------- S t a t e -------------
4554 // -- lr : return address 4554 // -- lr : return address
4555 // -- r0 : key 4555 // -- r0 : key
(...skipping 10 matching lines...) Expand all
4566 // -- r0 : receiver 4566 // -- r0 : receiver
4567 // -- sp[0] : receiver 4567 // -- sp[0] : receiver
4568 // ----------------------------------- 4568 // -----------------------------------
4569 receiver = r0; 4569 receiver = r0;
4570 } 4570 }
4571 4571
4572 StubCompiler::GenerateLoadStringLength(masm, receiver, r3, r4, &miss, 4572 StubCompiler::GenerateLoadStringLength(masm, receiver, r3, r4, &miss,
4573 support_wrapper_); 4573 support_wrapper_);
4574 4574
4575 __ bind(&miss); 4575 __ bind(&miss);
4576 StubCompiler::GenerateLoadMiss(masm, kind()); 4576 StubCompiler::TailCallBuiltin(masm, StubCompiler::MissBuiltin(kind()));
4577 } 4577 }
4578 4578
4579 4579
4580 void StoreArrayLengthStub::Generate(MacroAssembler* masm) { 4580 void StoreArrayLengthStub::Generate(MacroAssembler* masm) {
4581 // This accepts as a receiver anything JSArray::SetElementsLength accepts 4581 // This accepts as a receiver anything JSArray::SetElementsLength accepts
4582 // (currently anything except for external arrays which means anything with 4582 // (currently anything except for external arrays which means anything with
4583 // elements of FixedArray type). Value must be a number, but only smis are 4583 // elements of FixedArray type). Value must be a number, but only smis are
4584 // accepted as the most common case. 4584 // accepted as the most common case.
4585 Label miss; 4585 Label miss;
4586 4586
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
4636 4636
4637 // Prepare tail call to StoreIC_ArrayLength. 4637 // Prepare tail call to StoreIC_ArrayLength.
4638 __ Push(receiver, value); 4638 __ Push(receiver, value);
4639 4639
4640 ExternalReference ref = 4640 ExternalReference ref =
4641 ExternalReference(IC_Utility(IC::kStoreIC_ArrayLength), masm->isolate()); 4641 ExternalReference(IC_Utility(IC::kStoreIC_ArrayLength), masm->isolate());
4642 __ TailCallExternalReference(ref, 2, 1); 4642 __ TailCallExternalReference(ref, 2, 1);
4643 4643
4644 __ bind(&miss); 4644 __ bind(&miss);
4645 4645
4646 StubCompiler::GenerateStoreMiss(masm, kind()); 4646 StubCompiler::TailCallBuiltin(masm, StubCompiler::MissBuiltin(kind()));
4647 } 4647 }
4648 4648
4649 4649
4650 Register InstanceofStub::left() { return r0; } 4650 Register InstanceofStub::left() { return r0; }
4651 4651
4652 4652
4653 Register InstanceofStub::right() { return r1; } 4653 Register InstanceofStub::right() { return r1; }
4654 4654
4655 4655
4656 void LoadFieldStub::Generate(MacroAssembler* masm) { 4656 void LoadFieldStub::Generate(MacroAssembler* masm) {
(...skipping 3405 matching lines...) Expand 10 before | Expand all | Expand 10 after
8062 8062
8063 __ Pop(lr, r5, r1); 8063 __ Pop(lr, r5, r1);
8064 __ Ret(); 8064 __ Ret();
8065 } 8065 }
8066 8066
8067 #undef __ 8067 #undef __
8068 8068
8069 } } // namespace v8::internal 8069 } } // namespace v8::internal
8070 8070
8071 #endif // V8_TARGET_ARCH_ARM 8071 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm/stub-cache-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698