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

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

Issue 14847004: Turn the load field code stub into a hydrogen code stub. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 7 years, 7 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 Isolate* isolate, 67 Isolate* isolate,
68 CodeStubInterfaceDescriptor* descriptor) { 68 CodeStubInterfaceDescriptor* descriptor) {
69 static Register registers[] = { r1, r0 }; 69 static Register registers[] = { r1, r0 };
70 descriptor->register_param_count_ = 2; 70 descriptor->register_param_count_ = 2;
71 descriptor->register_params_ = registers; 71 descriptor->register_params_ = registers;
72 descriptor->deoptimization_handler_ = 72 descriptor->deoptimization_handler_ =
73 FUNCTION_ADDR(KeyedLoadIC_MissFromStubFailure); 73 FUNCTION_ADDR(KeyedLoadIC_MissFromStubFailure);
74 } 74 }
75 75
76 76
77 void LoadFieldStub::InitializeInterfaceDescriptor(
78 Isolate* isolate,
79 CodeStubInterfaceDescriptor* descriptor) {
80 static Register registers[] = { r0 };
81 descriptor->register_param_count_ = 1;
82 descriptor->register_params_ = registers;
83 descriptor->stack_parameter_count_ = NULL;
84 descriptor->deoptimization_handler_ = NULL;
85 }
86
87
88 void KeyedLoadFieldStub::InitializeInterfaceDescriptor(
89 Isolate* isolate,
90 CodeStubInterfaceDescriptor* descriptor) {
91 static Register registers[] = { r1 };
92 descriptor->register_param_count_ = 1;
93 descriptor->register_params_ = registers;
94 descriptor->stack_parameter_count_ = NULL;
95 descriptor->deoptimization_handler_ = NULL;
96 }
97
98
77 void KeyedStoreFastElementStub::InitializeInterfaceDescriptor( 99 void KeyedStoreFastElementStub::InitializeInterfaceDescriptor(
78 Isolate* isolate, 100 Isolate* isolate,
79 CodeStubInterfaceDescriptor* descriptor) { 101 CodeStubInterfaceDescriptor* descriptor) {
80 static Register registers[] = { r2, r1, r0 }; 102 static Register registers[] = { r2, r1, r0 };
81 descriptor->register_param_count_ = 3; 103 descriptor->register_param_count_ = 3;
82 descriptor->register_params_ = registers; 104 descriptor->register_params_ = registers;
83 descriptor->deoptimization_handler_ = 105 descriptor->deoptimization_handler_ =
84 FUNCTION_ADDR(KeyedStoreIC_MissFromStubFailure); 106 FUNCTION_ADDR(KeyedStoreIC_MissFromStubFailure);
85 } 107 }
86 108
(...skipping 3683 matching lines...) Expand 10 before | Expand all | Expand 10 after
3770 StubCompiler::TailCallBuiltin(masm, StubCompiler::MissBuiltin(kind())); 3792 StubCompiler::TailCallBuiltin(masm, StubCompiler::MissBuiltin(kind()));
3771 } 3793 }
3772 3794
3773 3795
3774 Register InstanceofStub::left() { return r0; } 3796 Register InstanceofStub::left() { return r0; }
3775 3797
3776 3798
3777 Register InstanceofStub::right() { return r1; } 3799 Register InstanceofStub::right() { return r1; }
3778 3800
3779 3801
3780 void LoadFieldStub::Generate(MacroAssembler* masm) {
3781 StubCompiler::DoGenerateFastPropertyLoad(masm, r0, reg_, inobject_, index_);
3782 __ Ret();
3783 }
3784
3785
3786 void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) { 3802 void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) {
3787 // The displacement is the offset of the last parameter (if any) 3803 // The displacement is the offset of the last parameter (if any)
3788 // relative to the frame pointer. 3804 // relative to the frame pointer.
3789 const int kDisplacement = 3805 const int kDisplacement =
3790 StandardFrameConstants::kCallerSPOffset - kPointerSize; 3806 StandardFrameConstants::kCallerSPOffset - kPointerSize;
3791 3807
3792 // Check that the key is a smi. 3808 // Check that the key is a smi.
3793 Label slow; 3809 Label slow;
3794 __ JumpIfNotSmi(r1, &slow); 3810 __ JumpIfNotSmi(r1, &slow);
3795 3811
(...skipping 3566 matching lines...) Expand 10 before | Expand all | Expand 10 after
7362 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET); 7378 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET);
7363 } 7379 }
7364 } 7380 }
7365 7381
7366 7382
7367 #undef __ 7383 #undef __
7368 7384
7369 } } // namespace v8::internal 7385 } } // namespace v8::internal
7370 7386
7371 #endif // V8_TARGET_ARCH_ARM 7387 #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