OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 Isolate* isolate, | 343 Isolate* isolate, |
344 CodeStubInterfaceDescriptor* descriptor) { | 344 CodeStubInterfaceDescriptor* descriptor) { |
345 static Register registers[] = { rdx, rax }; | 345 static Register registers[] = { rdx, rax }; |
346 descriptor->register_param_count_ = 2; | 346 descriptor->register_param_count_ = 2; |
347 descriptor->register_params_ = registers; | 347 descriptor->register_params_ = registers; |
348 descriptor->deoptimization_handler_ = | 348 descriptor->deoptimization_handler_ = |
349 Runtime::FunctionForId(Runtime::kStringAdd)->entry; | 349 Runtime::FunctionForId(Runtime::kStringAdd)->entry; |
350 } | 350 } |
351 | 351 |
352 | 352 |
| 353 void CallDescriptors::InitializeForIsolate(Isolate* isolate) { |
| 354 { |
| 355 CodeStubInterfaceDescriptor* descriptor = |
| 356 isolate->call_descriptor(Isolate::ArgumentAdaptorCall); |
| 357 static Register registers[] = { rdi, // JSFunction |
| 358 rsi, // context |
| 359 rcx, // call kind |
| 360 rax, // actual number of arguments |
| 361 rbx, // expected number of arguments |
| 362 }; |
| 363 static Representation representations[] = { |
| 364 Representation::Tagged(), // JSFunction |
| 365 Representation::Tagged(), // context |
| 366 Representation::Smi(), // call kind |
| 367 Representation::Integer32(), // actual number of arguments |
| 368 Representation::Integer32(), // expected number of arguments |
| 369 }; |
| 370 descriptor->register_param_count_ = 5; |
| 371 descriptor->register_params_ = registers; |
| 372 descriptor->param_representations_ = representations; |
| 373 descriptor->deoptimization_handler_ = NULL; |
| 374 } |
| 375 { |
| 376 CodeStubInterfaceDescriptor* descriptor = |
| 377 isolate->call_descriptor(Isolate::KeyedCall); |
| 378 static Register registers[] = { rsi, // context |
| 379 rcx, // key |
| 380 }; |
| 381 static Representation representations[] = { |
| 382 Representation::Tagged(), // context |
| 383 Representation::Tagged(), // key |
| 384 }; |
| 385 descriptor->register_param_count_ = 2; |
| 386 descriptor->register_params_ = registers; |
| 387 descriptor->param_representations_ = representations; |
| 388 descriptor->deoptimization_handler_ = NULL; |
| 389 } |
| 390 { |
| 391 CodeStubInterfaceDescriptor* descriptor = |
| 392 isolate->call_descriptor(Isolate::NamedCall); |
| 393 static Register registers[] = { rsi, // context |
| 394 rcx, // name |
| 395 }; |
| 396 static Representation representations[] = { |
| 397 Representation::Tagged(), // context |
| 398 Representation::Tagged(), // name |
| 399 }; |
| 400 descriptor->register_param_count_ = 2; |
| 401 descriptor->register_params_ = registers; |
| 402 descriptor->param_representations_ = representations; |
| 403 descriptor->deoptimization_handler_ = NULL; |
| 404 } |
| 405 } |
| 406 |
| 407 |
353 #define __ ACCESS_MASM(masm) | 408 #define __ ACCESS_MASM(masm) |
354 | 409 |
355 | 410 |
356 void HydrogenCodeStub::GenerateLightweightMiss(MacroAssembler* masm) { | 411 void HydrogenCodeStub::GenerateLightweightMiss(MacroAssembler* masm) { |
357 // Update the static counter each time a new code stub is generated. | 412 // Update the static counter each time a new code stub is generated. |
358 Isolate* isolate = masm->isolate(); | 413 Isolate* isolate = masm->isolate(); |
359 isolate->counters()->code_stubs()->Increment(); | 414 isolate->counters()->code_stubs()->Increment(); |
360 | 415 |
361 CodeStubInterfaceDescriptor* descriptor = GetInterfaceDescriptor(isolate); | 416 CodeStubInterfaceDescriptor* descriptor = GetInterfaceDescriptor(isolate); |
362 int param_count = descriptor->register_param_count_; | 417 int param_count = descriptor->register_param_count_; |
(...skipping 5328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5691 __ bind(&fast_elements_case); | 5746 __ bind(&fast_elements_case); |
5692 GenerateCase(masm, FAST_ELEMENTS); | 5747 GenerateCase(masm, FAST_ELEMENTS); |
5693 } | 5748 } |
5694 | 5749 |
5695 | 5750 |
5696 #undef __ | 5751 #undef __ |
5697 | 5752 |
5698 } } // namespace v8::internal | 5753 } } // namespace v8::internal |
5699 | 5754 |
5700 #endif // V8_TARGET_ARCH_X64 | 5755 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |