OLD | NEW |
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 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 Isolate* isolate, | 255 Isolate* isolate, |
256 CodeStubInterfaceDescriptor* descriptor) { | 256 CodeStubInterfaceDescriptor* descriptor) { |
257 static Register registers[] = { edx, ecx, eax }; | 257 static Register registers[] = { edx, ecx, eax }; |
258 descriptor->register_param_count_ = 3; | 258 descriptor->register_param_count_ = 3; |
259 descriptor->register_params_ = registers; | 259 descriptor->register_params_ = registers; |
260 descriptor->deoptimization_handler_ = | 260 descriptor->deoptimization_handler_ = |
261 FUNCTION_ADDR(StoreIC_MissFromStubFailure); | 261 FUNCTION_ADDR(StoreIC_MissFromStubFailure); |
262 } | 262 } |
263 | 263 |
264 | 264 |
| 265 void ElementsTransitionAndStoreStub::InitializeInterfaceDescriptor( |
| 266 Isolate* isolate, |
| 267 CodeStubInterfaceDescriptor* descriptor) { |
| 268 static Register registers[] = { eax, ebx, ecx, edx }; |
| 269 descriptor->register_param_count_ = 4; |
| 270 descriptor->register_params_ = registers; |
| 271 switch (strict_mode_) { |
| 272 case kNonStrictMode: |
| 273 descriptor->deoptimization_handler_ = Runtime::FunctionForId( |
| 274 Runtime::kElementsTransitionAndStoreNonStrict)->entry; |
| 275 break; |
| 276 |
| 277 case kStrictMode: |
| 278 descriptor->deoptimization_handler_ = Runtime::FunctionForId( |
| 279 Runtime::kElementsTransitionAndStoreStrict)->entry; |
| 280 break; |
| 281 } |
| 282 } |
| 283 |
| 284 |
265 #define __ ACCESS_MASM(masm) | 285 #define __ ACCESS_MASM(masm) |
266 | 286 |
267 | 287 |
268 void HydrogenCodeStub::GenerateLightweightMiss(MacroAssembler* masm) { | 288 void HydrogenCodeStub::GenerateLightweightMiss(MacroAssembler* masm) { |
269 // Update the static counter each time a new code stub is generated. | 289 // Update the static counter each time a new code stub is generated. |
270 Isolate* isolate = masm->isolate(); | 290 Isolate* isolate = masm->isolate(); |
271 isolate->counters()->code_stubs()->Increment(); | 291 isolate->counters()->code_stubs()->Increment(); |
272 | 292 |
273 CodeStubInterfaceDescriptor* descriptor = GetInterfaceDescriptor(isolate); | 293 CodeStubInterfaceDescriptor* descriptor = GetInterfaceDescriptor(isolate); |
274 int param_count = descriptor->register_param_count_; | 294 int param_count = descriptor->register_param_count_; |
(...skipping 7479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7754 __ bind(&fast_elements_case); | 7774 __ bind(&fast_elements_case); |
7755 GenerateCase(masm, FAST_ELEMENTS); | 7775 GenerateCase(masm, FAST_ELEMENTS); |
7756 } | 7776 } |
7757 | 7777 |
7758 | 7778 |
7759 #undef __ | 7779 #undef __ |
7760 | 7780 |
7761 } } // namespace v8::internal | 7781 } } // namespace v8::internal |
7762 | 7782 |
7763 #endif // V8_TARGET_ARCH_IA32 | 7783 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |