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

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

Issue 16399007: Move runtime array constructor functions from builtins.cc to runtime.cc. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Comment updates Created 7 years, 6 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/builtins.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 12 matching lines...) Expand all
23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 27
28 #include "v8.h" 28 #include "v8.h"
29 29
30 #if defined(V8_TARGET_ARCH_ARM) 30 #if defined(V8_TARGET_ARCH_ARM)
31 31
32 #include "bootstrapper.h" 32 #include "bootstrapper.h"
33 #include "builtins-decls.h"
34 #include "code-stubs.h" 33 #include "code-stubs.h"
35 #include "regexp-macro-assembler.h" 34 #include "regexp-macro-assembler.h"
36 #include "stub-cache.h" 35 #include "stub-cache.h"
37 36
38 namespace v8 { 37 namespace v8 {
39 namespace internal { 38 namespace internal {
40 39
41 40
42 void FastCloneShallowArrayStub::InitializeInterfaceDescriptor( 41 void FastCloneShallowArrayStub::InitializeInterfaceDescriptor(
43 Isolate* isolate, 42 Isolate* isolate,
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 static Register registers[] = { r1, r2 }; 138 static Register registers[] = { r1, r2 };
140 descriptor->register_param_count_ = 2; 139 descriptor->register_param_count_ = 2;
141 if (constant_stack_parameter_count != 0) { 140 if (constant_stack_parameter_count != 0) {
142 // stack param count needs (constructor pointer, and single argument) 141 // stack param count needs (constructor pointer, and single argument)
143 descriptor->stack_parameter_count_ = &r0; 142 descriptor->stack_parameter_count_ = &r0;
144 } 143 }
145 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count; 144 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count;
146 descriptor->register_params_ = registers; 145 descriptor->register_params_ = registers;
147 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE; 146 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE;
148 descriptor->deoptimization_handler_ = 147 descriptor->deoptimization_handler_ =
149 FUNCTION_ADDR(ArrayConstructor_StubFailure); 148 Runtime::FunctionForId(Runtime::kArrayConstructor)->entry;
150 } 149 }
151 150
152 151
153 static void InitializeInternalArrayConstructorDescriptor( 152 static void InitializeInternalArrayConstructorDescriptor(
154 Isolate* isolate, 153 Isolate* isolate,
155 CodeStubInterfaceDescriptor* descriptor, 154 CodeStubInterfaceDescriptor* descriptor,
156 int constant_stack_parameter_count) { 155 int constant_stack_parameter_count) {
157 // register state 156 // register state
158 // r0 -- number of arguments 157 // r0 -- number of arguments
159 // r1 -- constructor function 158 // r1 -- constructor function
160 static Register registers[] = { r1 }; 159 static Register registers[] = { r1 };
161 descriptor->register_param_count_ = 1; 160 descriptor->register_param_count_ = 1;
162 161
163 if (constant_stack_parameter_count != 0) { 162 if (constant_stack_parameter_count != 0) {
164 // stack param count needs (constructor pointer, and single argument) 163 // stack param count needs (constructor pointer, and single argument)
165 descriptor->stack_parameter_count_ = &r0; 164 descriptor->stack_parameter_count_ = &r0;
166 } 165 }
167 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count; 166 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count;
168 descriptor->register_params_ = registers; 167 descriptor->register_params_ = registers;
169 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE; 168 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE;
170 descriptor->deoptimization_handler_ = 169 descriptor->deoptimization_handler_ =
171 FUNCTION_ADDR(InternalArrayConstructor_StubFailure); 170 Runtime::FunctionForId(Runtime::kInternalArrayConstructor)->entry;
172 } 171 }
173 172
174 173
175 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( 174 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor(
176 Isolate* isolate, 175 Isolate* isolate,
177 CodeStubInterfaceDescriptor* descriptor) { 176 CodeStubInterfaceDescriptor* descriptor) {
178 InitializeArrayConstructorDescriptor(isolate, descriptor, 0); 177 InitializeArrayConstructorDescriptor(isolate, descriptor, 0);
179 } 178 }
180 179
181 180
(...skipping 7325 matching lines...) Expand 10 before | Expand all | Expand 10 after
7507 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET); 7506 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET);
7508 } 7507 }
7509 } 7508 }
7510 7509
7511 7510
7512 #undef __ 7511 #undef __
7513 7512
7514 } } // namespace v8::internal 7513 } } // namespace v8::internal
7515 7514
7516 #endif // V8_TARGET_ARCH_ARM 7515 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/builtins.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698