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 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 Isolate* isolate, | 346 Isolate* isolate, |
347 CodeStubInterfaceDescriptor* descriptor) { | 347 CodeStubInterfaceDescriptor* descriptor) { |
348 static Register registers[] = { edx, eax }; | 348 static Register registers[] = { edx, eax }; |
349 descriptor->register_param_count_ = 2; | 349 descriptor->register_param_count_ = 2; |
350 descriptor->register_params_ = registers; | 350 descriptor->register_params_ = registers; |
351 descriptor->deoptimization_handler_ = | 351 descriptor->deoptimization_handler_ = |
352 Runtime::FunctionForId(Runtime::kStringAdd)->entry; | 352 Runtime::FunctionForId(Runtime::kStringAdd)->entry; |
353 } | 353 } |
354 | 354 |
355 | 355 |
| 356 void CallDescriptors::InitializeForIsolate(Isolate* isolate) { |
| 357 { |
| 358 CodeStubInterfaceDescriptor* descriptor = |
| 359 isolate->call_descriptor(Isolate::ArgumentAdaptorCall); |
| 360 static Register registers[] = { edi, // JSFunction |
| 361 esi, // context |
| 362 ecx, // call kind |
| 363 eax, // actual number of arguments |
| 364 ebx, // expected number of arguments |
| 365 }; |
| 366 static Representation representations[] = { |
| 367 Representation::Tagged(), // JSFunction |
| 368 Representation::Tagged(), // context |
| 369 Representation::Smi(), // call kind |
| 370 Representation::Integer32(), // actual number of arguments |
| 371 Representation::Integer32(), // expected number of arguments |
| 372 }; |
| 373 descriptor->register_param_count_ = 5; |
| 374 descriptor->register_params_ = registers; |
| 375 descriptor->param_representations_ = representations; |
| 376 descriptor->deoptimization_handler_ = NULL; |
| 377 } |
| 378 { |
| 379 CodeStubInterfaceDescriptor* descriptor = |
| 380 isolate->call_descriptor(Isolate::KeyedCall); |
| 381 static Register registers[] = { esi, // context |
| 382 ecx, // key |
| 383 }; |
| 384 static Representation representations[] = { |
| 385 Representation::Tagged(), // context |
| 386 Representation::Tagged(), // key |
| 387 }; |
| 388 descriptor->register_param_count_ = 2; |
| 389 descriptor->register_params_ = registers; |
| 390 descriptor->param_representations_ = representations; |
| 391 descriptor->deoptimization_handler_ = NULL; |
| 392 } |
| 393 { |
| 394 CodeStubInterfaceDescriptor* descriptor = |
| 395 isolate->call_descriptor(Isolate::NamedCall); |
| 396 static Register registers[] = { esi, // context |
| 397 ecx, // name |
| 398 }; |
| 399 static Representation representations[] = { |
| 400 Representation::Tagged(), // context |
| 401 Representation::Tagged(), // name |
| 402 }; |
| 403 descriptor->register_param_count_ = 2; |
| 404 descriptor->register_params_ = registers; |
| 405 descriptor->param_representations_ = representations; |
| 406 descriptor->deoptimization_handler_ = NULL; |
| 407 } |
| 408 } |
| 409 |
| 410 |
356 #define __ ACCESS_MASM(masm) | 411 #define __ ACCESS_MASM(masm) |
357 | 412 |
358 | 413 |
359 void HydrogenCodeStub::GenerateLightweightMiss(MacroAssembler* masm) { | 414 void HydrogenCodeStub::GenerateLightweightMiss(MacroAssembler* masm) { |
360 // Update the static counter each time a new code stub is generated. | 415 // Update the static counter each time a new code stub is generated. |
361 Isolate* isolate = masm->isolate(); | 416 Isolate* isolate = masm->isolate(); |
362 isolate->counters()->code_stubs()->Increment(); | 417 isolate->counters()->code_stubs()->Increment(); |
363 | 418 |
364 CodeStubInterfaceDescriptor* descriptor = GetInterfaceDescriptor(isolate); | 419 CodeStubInterfaceDescriptor* descriptor = GetInterfaceDescriptor(isolate); |
365 int param_count = descriptor->register_param_count_; | 420 int param_count = descriptor->register_param_count_; |
(...skipping 5527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5893 __ bind(&fast_elements_case); | 5948 __ bind(&fast_elements_case); |
5894 GenerateCase(masm, FAST_ELEMENTS); | 5949 GenerateCase(masm, FAST_ELEMENTS); |
5895 } | 5950 } |
5896 | 5951 |
5897 | 5952 |
5898 #undef __ | 5953 #undef __ |
5899 | 5954 |
5900 } } // namespace v8::internal | 5955 } } // namespace v8::internal |
5901 | 5956 |
5902 #endif // V8_TARGET_ARCH_IA32 | 5957 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |