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

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

Issue 28993003: Make stack_parameter_count a plain register. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Simplify Deoptimizer::SetPlatformCompiledStubRegisters. Created 7 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 | Annotate | Revision Log
« no previous file with comments | « src/deoptimizer.cc ('k') | src/ia32/deoptimizer-ia32.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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 int constant_stack_parameter_count) { 165 int constant_stack_parameter_count) {
166 // register state 166 // register state
167 // eax -- number of arguments 167 // eax -- number of arguments
168 // edi -- function 168 // edi -- function
169 // ebx -- type info cell with elements kind 169 // ebx -- type info cell with elements kind
170 static Register registers[] = { edi, ebx }; 170 static Register registers[] = { edi, ebx };
171 descriptor->register_param_count_ = 2; 171 descriptor->register_param_count_ = 2;
172 172
173 if (constant_stack_parameter_count != 0) { 173 if (constant_stack_parameter_count != 0) {
174 // stack param count needs (constructor pointer, and single argument) 174 // stack param count needs (constructor pointer, and single argument)
175 descriptor->stack_parameter_count_ = &eax; 175 descriptor->stack_parameter_count_ = eax;
176 } 176 }
177 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count; 177 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count;
178 descriptor->register_params_ = registers; 178 descriptor->register_params_ = registers;
179 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE; 179 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE;
180 descriptor->deoptimization_handler_ = 180 descriptor->deoptimization_handler_ =
181 Runtime::FunctionForId(Runtime::kArrayConstructor)->entry; 181 Runtime::FunctionForId(Runtime::kArrayConstructor)->entry;
182 } 182 }
183 183
184 184
185 static void InitializeInternalArrayConstructorDescriptor( 185 static void InitializeInternalArrayConstructorDescriptor(
186 Isolate* isolate, 186 Isolate* isolate,
187 CodeStubInterfaceDescriptor* descriptor, 187 CodeStubInterfaceDescriptor* descriptor,
188 int constant_stack_parameter_count) { 188 int constant_stack_parameter_count) {
189 // register state 189 // register state
190 // eax -- number of arguments 190 // eax -- number of arguments
191 // edi -- constructor function 191 // edi -- constructor function
192 static Register registers[] = { edi }; 192 static Register registers[] = { edi };
193 descriptor->register_param_count_ = 1; 193 descriptor->register_param_count_ = 1;
194 194
195 if (constant_stack_parameter_count != 0) { 195 if (constant_stack_parameter_count != 0) {
196 // stack param count needs (constructor pointer, and single argument) 196 // stack param count needs (constructor pointer, and single argument)
197 descriptor->stack_parameter_count_ = &eax; 197 descriptor->stack_parameter_count_ = eax;
198 } 198 }
199 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count; 199 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count;
200 descriptor->register_params_ = registers; 200 descriptor->register_params_ = registers;
201 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE; 201 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE;
202 descriptor->deoptimization_handler_ = 202 descriptor->deoptimization_handler_ =
203 Runtime::FunctionForId(Runtime::kInternalArrayConstructor)->entry; 203 Runtime::FunctionForId(Runtime::kInternalArrayConstructor)->entry;
204 } 204 }
205 205
206 206
207 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( 207 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor(
(...skipping 5814 matching lines...) Expand 10 before | Expand all | Expand 10 after
6022 __ bind(&fast_elements_case); 6022 __ bind(&fast_elements_case);
6023 GenerateCase(masm, FAST_ELEMENTS); 6023 GenerateCase(masm, FAST_ELEMENTS);
6024 } 6024 }
6025 6025
6026 6026
6027 #undef __ 6027 #undef __
6028 6028
6029 } } // namespace v8::internal 6029 } } // namespace v8::internal
6030 6030
6031 #endif // V8_TARGET_ARCH_IA32 6031 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/deoptimizer.cc ('k') | src/ia32/deoptimizer-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698