| 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 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 463 GenerateFastApiCallBody(masm, | 463 GenerateFastApiCallBody(masm, |
| 464 optimization, | 464 optimization, |
| 465 argc, | 465 argc, |
| 466 receiver, | 466 receiver, |
| 467 true); | 467 true); |
| 468 } | 468 } |
| 469 | 469 |
| 470 | 470 |
| 471 class CallInterceptorCompiler BASE_EMBEDDED { | 471 class CallInterceptorCompiler BASE_EMBEDDED { |
| 472 public: | 472 public: |
| 473 CallInterceptorCompiler(CallStubCompiler* stub_compiler, | 473 CallInterceptorCompiler(CallStubCompiler* stub_compiler, Register name) |
| 474 const ParameterCount& arguments, | |
| 475 Register name) | |
| 476 : stub_compiler_(stub_compiler), | 474 : stub_compiler_(stub_compiler), |
| 477 arguments_(arguments), | |
| 478 name_(name) {} | 475 name_(name) {} |
| 479 | 476 |
| 480 void Compile(MacroAssembler* masm, | 477 void Compile(MacroAssembler* masm, |
| 481 Handle<JSObject> object, | 478 Handle<JSObject> object, |
| 482 Handle<JSObject> holder, | 479 Handle<JSObject> holder, |
| 483 Handle<Name> name, | 480 Handle<Name> name, |
| 484 LookupResult* lookup, | 481 LookupResult* lookup, |
| 485 Register receiver, | 482 Register receiver, |
| 486 Register scratch1, | 483 Register scratch1, |
| 487 Register scratch2, | 484 Register scratch2, |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 602 __ pop(holder); | 599 __ pop(holder); |
| 603 __ pop(receiver); | 600 __ pop(receiver); |
| 604 // Leave the internal frame. | 601 // Leave the internal frame. |
| 605 } | 602 } |
| 606 | 603 |
| 607 __ CompareRoot(rax, Heap::kNoInterceptorResultSentinelRootIndex); | 604 __ CompareRoot(rax, Heap::kNoInterceptorResultSentinelRootIndex); |
| 608 __ j(not_equal, interceptor_succeeded); | 605 __ j(not_equal, interceptor_succeeded); |
| 609 } | 606 } |
| 610 | 607 |
| 611 CallStubCompiler* stub_compiler_; | 608 CallStubCompiler* stub_compiler_; |
| 612 const ParameterCount& arguments_; | |
| 613 Register name_; | 609 Register name_; |
| 614 }; | 610 }; |
| 615 | 611 |
| 616 | 612 |
| 617 void StoreStubCompiler::GenerateRestoreName(MacroAssembler* masm, | 613 void StoreStubCompiler::GenerateRestoreName(MacroAssembler* masm, |
| 618 Label* label, | 614 Label* label, |
| 619 Handle<Name> name) { | 615 Handle<Name> name) { |
| 620 if (!label->is_unused()) { | 616 if (!label->is_unused()) { |
| 621 __ bind(label); | 617 __ bind(label); |
| 622 __ Move(this->name(), name); | 618 __ Move(this->name(), name); |
| (...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1458 Label miss; | 1454 Label miss; |
| 1459 GenerateNameCheck(name, &miss); | 1455 GenerateNameCheck(name, &miss); |
| 1460 | 1456 |
| 1461 LookupResult lookup(isolate()); | 1457 LookupResult lookup(isolate()); |
| 1462 LookupPostInterceptor(holder, name, &lookup); | 1458 LookupPostInterceptor(holder, name, &lookup); |
| 1463 | 1459 |
| 1464 // Get the receiver from the stack. | 1460 // Get the receiver from the stack. |
| 1465 StackArgumentsAccessor args(rsp, arguments()); | 1461 StackArgumentsAccessor args(rsp, arguments()); |
| 1466 __ movp(rdx, args.GetReceiverOperand()); | 1462 __ movp(rdx, args.GetReceiverOperand()); |
| 1467 | 1463 |
| 1468 CallInterceptorCompiler compiler(this, arguments(), rcx); | 1464 CallInterceptorCompiler compiler(this, rcx); |
| 1469 compiler.Compile(masm(), object, holder, name, &lookup, rdx, rbx, rdi, rax, | 1465 compiler.Compile(masm(), object, holder, name, &lookup, rdx, rbx, rdi, rax, |
| 1470 &miss); | 1466 &miss); |
| 1471 | 1467 |
| 1472 // Restore receiver. | 1468 // Restore receiver. |
| 1473 __ movp(rdx, args.GetReceiverOperand()); | 1469 __ movp(rdx, args.GetReceiverOperand()); |
| 1474 | 1470 |
| 1475 GenerateJumpFunction(object, rax, &miss); | 1471 GenerateJumpFunction(object, rax, &miss); |
| 1476 | 1472 |
| 1477 HandlerFrontendFooter(&miss); | 1473 HandlerFrontendFooter(&miss); |
| 1478 | 1474 |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1858 // ----------------------------------- | 1854 // ----------------------------------- |
| 1859 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); | 1855 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); |
| 1860 } | 1856 } |
| 1861 | 1857 |
| 1862 | 1858 |
| 1863 #undef __ | 1859 #undef __ |
| 1864 | 1860 |
| 1865 } } // namespace v8::internal | 1861 } } // namespace v8::internal |
| 1866 | 1862 |
| 1867 #endif // V8_TARGET_ARCH_X64 | 1863 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |