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 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 Isolate* isolate, | 354 Isolate* isolate, |
355 CodeStubInterfaceDescriptor* descriptor) { | 355 CodeStubInterfaceDescriptor* descriptor) { |
356 static Register registers[] = { rdx, rax }; | 356 static Register registers[] = { rdx, rax }; |
357 descriptor->register_param_count_ = 2; | 357 descriptor->register_param_count_ = 2; |
358 descriptor->register_params_ = registers; | 358 descriptor->register_params_ = registers; |
359 descriptor->deoptimization_handler_ = | 359 descriptor->deoptimization_handler_ = |
360 Runtime::FunctionForId(Runtime::kStringAdd)->entry; | 360 Runtime::FunctionForId(Runtime::kStringAdd)->entry; |
361 } | 361 } |
362 | 362 |
363 | 363 |
| 364 void CallDescriptors::InitializeForIsolate(Isolate* isolate) { |
| 365 { |
| 366 CallInterfaceDescriptor* descriptor = |
| 367 isolate->call_descriptor(Isolate::ArgumentAdaptorCall); |
| 368 static Register registers[] = { rdi, // JSFunction |
| 369 rsi, // context |
| 370 rax, // actual number of arguments |
| 371 rbx, // expected number of arguments |
| 372 }; |
| 373 static Representation representations[] = { |
| 374 Representation::Tagged(), // JSFunction |
| 375 Representation::Tagged(), // context |
| 376 Representation::Integer32(), // actual number of arguments |
| 377 Representation::Integer32(), // expected number of arguments |
| 378 }; |
| 379 descriptor->register_param_count_ = 4; |
| 380 descriptor->register_params_ = registers; |
| 381 descriptor->param_representations_ = representations; |
| 382 } |
| 383 { |
| 384 CallInterfaceDescriptor* descriptor = |
| 385 isolate->call_descriptor(Isolate::KeyedCall); |
| 386 static Register registers[] = { rsi, // context |
| 387 rcx, // key |
| 388 }; |
| 389 static Representation representations[] = { |
| 390 Representation::Tagged(), // context |
| 391 Representation::Tagged(), // key |
| 392 }; |
| 393 descriptor->register_param_count_ = 2; |
| 394 descriptor->register_params_ = registers; |
| 395 descriptor->param_representations_ = representations; |
| 396 } |
| 397 { |
| 398 CallInterfaceDescriptor* descriptor = |
| 399 isolate->call_descriptor(Isolate::NamedCall); |
| 400 static Register registers[] = { rsi, // context |
| 401 rcx, // name |
| 402 }; |
| 403 static Representation representations[] = { |
| 404 Representation::Tagged(), // context |
| 405 Representation::Tagged(), // name |
| 406 }; |
| 407 descriptor->register_param_count_ = 2; |
| 408 descriptor->register_params_ = registers; |
| 409 descriptor->param_representations_ = representations; |
| 410 } |
| 411 } |
| 412 |
| 413 |
364 #define __ ACCESS_MASM(masm) | 414 #define __ ACCESS_MASM(masm) |
365 | 415 |
366 | 416 |
367 void HydrogenCodeStub::GenerateLightweightMiss(MacroAssembler* masm) { | 417 void HydrogenCodeStub::GenerateLightweightMiss(MacroAssembler* masm) { |
368 // Update the static counter each time a new code stub is generated. | 418 // Update the static counter each time a new code stub is generated. |
369 Isolate* isolate = masm->isolate(); | 419 Isolate* isolate = masm->isolate(); |
370 isolate->counters()->code_stubs()->Increment(); | 420 isolate->counters()->code_stubs()->Increment(); |
371 | 421 |
372 CodeStubInterfaceDescriptor* descriptor = GetInterfaceDescriptor(isolate); | 422 CodeStubInterfaceDescriptor* descriptor = GetInterfaceDescriptor(isolate); |
373 int param_count = descriptor->register_param_count_; | 423 int param_count = descriptor->register_param_count_; |
(...skipping 5103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5477 __ bind(&fast_elements_case); | 5527 __ bind(&fast_elements_case); |
5478 GenerateCase(masm, FAST_ELEMENTS); | 5528 GenerateCase(masm, FAST_ELEMENTS); |
5479 } | 5529 } |
5480 | 5530 |
5481 | 5531 |
5482 #undef __ | 5532 #undef __ |
5483 | 5533 |
5484 } } // namespace v8::internal | 5534 } } // namespace v8::internal |
5485 | 5535 |
5486 #endif // V8_TARGET_ARCH_X64 | 5536 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |