| 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     CallInterfaceDescriptor* 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   } | 
|  | 374   { | 
|  | 375     CallInterfaceDescriptor* descriptor = | 
|  | 376         isolate->call_descriptor(Isolate::KeyedCall); | 
|  | 377     static Register registers[] = { rsi,  // context | 
|  | 378                                     rcx,  // key | 
|  | 379     }; | 
|  | 380     static Representation representations[] = { | 
|  | 381         Representation::Tagged(),     // context | 
|  | 382         Representation::Tagged(),     // key | 
|  | 383     }; | 
|  | 384     descriptor->register_param_count_ = 2; | 
|  | 385     descriptor->register_params_ = registers; | 
|  | 386     descriptor->param_representations_ = representations; | 
|  | 387   } | 
|  | 388   { | 
|  | 389     CallInterfaceDescriptor* descriptor = | 
|  | 390         isolate->call_descriptor(Isolate::NamedCall); | 
|  | 391     static Register registers[] = { rsi,  // context | 
|  | 392                                     rcx,  // name | 
|  | 393     }; | 
|  | 394     static Representation representations[] = { | 
|  | 395         Representation::Tagged(),     // context | 
|  | 396         Representation::Tagged(),     // name | 
|  | 397     }; | 
|  | 398     descriptor->register_param_count_ = 2; | 
|  | 399     descriptor->register_params_ = registers; | 
|  | 400     descriptor->param_representations_ = representations; | 
|  | 401   } | 
|  | 402 } | 
|  | 403 | 
|  | 404 | 
| 353 #define __ ACCESS_MASM(masm) | 405 #define __ ACCESS_MASM(masm) | 
| 354 | 406 | 
| 355 | 407 | 
| 356 void HydrogenCodeStub::GenerateLightweightMiss(MacroAssembler* masm) { | 408 void HydrogenCodeStub::GenerateLightweightMiss(MacroAssembler* masm) { | 
| 357   // Update the static counter each time a new code stub is generated. | 409   // Update the static counter each time a new code stub is generated. | 
| 358   Isolate* isolate = masm->isolate(); | 410   Isolate* isolate = masm->isolate(); | 
| 359   isolate->counters()->code_stubs()->Increment(); | 411   isolate->counters()->code_stubs()->Increment(); | 
| 360 | 412 | 
| 361   CodeStubInterfaceDescriptor* descriptor = GetInterfaceDescriptor(isolate); | 413   CodeStubInterfaceDescriptor* descriptor = GetInterfaceDescriptor(isolate); | 
| 362   int param_count = descriptor->register_param_count_; | 414   int param_count = descriptor->register_param_count_; | 
| (...skipping 5117 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 5480   __ bind(&fast_elements_case); | 5532   __ bind(&fast_elements_case); | 
| 5481   GenerateCase(masm, FAST_ELEMENTS); | 5533   GenerateCase(masm, FAST_ELEMENTS); | 
| 5482 } | 5534 } | 
| 5483 | 5535 | 
| 5484 | 5536 | 
| 5485 #undef __ | 5537 #undef __ | 
| 5486 | 5538 | 
| 5487 } }  // namespace v8::internal | 5539 } }  // namespace v8::internal | 
| 5488 | 5540 | 
| 5489 #endif  // V8_TARGET_ARCH_X64 | 5541 #endif  // V8_TARGET_ARCH_X64 | 
| OLD | NEW | 
|---|