| 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 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 632 argc + kFastApiCallArguments + 1, | 632 argc + kFastApiCallArguments + 1, |
| 633 return_value_operand, | 633 return_value_operand, |
| 634 restore_context ? &context_restore_operand : NULL); | 634 restore_context ? &context_restore_operand : NULL); |
| 635 } | 635 } |
| 636 | 636 |
| 637 | 637 |
| 638 class CallInterceptorCompiler BASE_EMBEDDED { | 638 class CallInterceptorCompiler BASE_EMBEDDED { |
| 639 public: | 639 public: |
| 640 CallInterceptorCompiler(CallStubCompiler* stub_compiler, | 640 CallInterceptorCompiler(CallStubCompiler* stub_compiler, |
| 641 const ParameterCount& arguments, | 641 const ParameterCount& arguments, |
| 642 Register name, | 642 Register name) |
| 643 ExtraICState extra_ic_state) | |
| 644 : stub_compiler_(stub_compiler), | 643 : stub_compiler_(stub_compiler), |
| 645 arguments_(arguments), | 644 arguments_(arguments), |
| 646 name_(name), | 645 name_(name) {} |
| 647 extra_ic_state_(extra_ic_state) {} | |
| 648 | 646 |
| 649 void Compile(MacroAssembler* masm, | 647 void Compile(MacroAssembler* masm, |
| 650 Handle<JSObject> object, | 648 Handle<JSObject> object, |
| 651 Handle<JSObject> holder, | 649 Handle<JSObject> holder, |
| 652 Handle<Name> name, | 650 Handle<Name> name, |
| 653 LookupResult* lookup, | 651 LookupResult* lookup, |
| 654 Register receiver, | 652 Register receiver, |
| 655 Register scratch1, | 653 Register scratch1, |
| 656 Register scratch2, | 654 Register scratch2, |
| 657 Register scratch3, | 655 Register scratch3, |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 813 // Leave the internal frame. | 811 // Leave the internal frame. |
| 814 } | 812 } |
| 815 | 813 |
| 816 __ CompareRoot(rax, Heap::kNoInterceptorResultSentinelRootIndex); | 814 __ CompareRoot(rax, Heap::kNoInterceptorResultSentinelRootIndex); |
| 817 __ j(not_equal, interceptor_succeeded); | 815 __ j(not_equal, interceptor_succeeded); |
| 818 } | 816 } |
| 819 | 817 |
| 820 CallStubCompiler* stub_compiler_; | 818 CallStubCompiler* stub_compiler_; |
| 821 const ParameterCount& arguments_; | 819 const ParameterCount& arguments_; |
| 822 Register name_; | 820 Register name_; |
| 823 ExtraICState extra_ic_state_; | |
| 824 }; | 821 }; |
| 825 | 822 |
| 826 | 823 |
| 827 void StoreStubCompiler::GenerateRestoreName(MacroAssembler* masm, | 824 void StoreStubCompiler::GenerateRestoreName(MacroAssembler* masm, |
| 828 Label* label, | 825 Label* label, |
| 829 Handle<Name> name) { | 826 Handle<Name> name) { |
| 830 if (!label->is_unused()) { | 827 if (!label->is_unused()) { |
| 831 __ bind(label); | 828 __ bind(label); |
| 832 __ Move(this->name(), name); | 829 __ Move(this->name(), name); |
| 833 } | 830 } |
| (...skipping 1656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2490 Label miss; | 2487 Label miss; |
| 2491 GenerateNameCheck(name, &miss); | 2488 GenerateNameCheck(name, &miss); |
| 2492 | 2489 |
| 2493 LookupResult lookup(isolate()); | 2490 LookupResult lookup(isolate()); |
| 2494 LookupPostInterceptor(holder, name, &lookup); | 2491 LookupPostInterceptor(holder, name, &lookup); |
| 2495 | 2492 |
| 2496 // Get the receiver from the stack. | 2493 // Get the receiver from the stack. |
| 2497 StackArgumentsAccessor args(rsp, arguments()); | 2494 StackArgumentsAccessor args(rsp, arguments()); |
| 2498 __ movq(rdx, args.GetReceiverOperand()); | 2495 __ movq(rdx, args.GetReceiverOperand()); |
| 2499 | 2496 |
| 2500 CallInterceptorCompiler compiler(this, arguments(), rcx, extra_state()); | 2497 CallInterceptorCompiler compiler(this, arguments(), rcx); |
| 2501 compiler.Compile(masm(), object, holder, name, &lookup, rdx, rbx, rdi, rax, | 2498 compiler.Compile(masm(), object, holder, name, &lookup, rdx, rbx, rdi, rax, |
| 2502 &miss); | 2499 &miss); |
| 2503 | 2500 |
| 2504 // Restore receiver. | 2501 // Restore receiver. |
| 2505 __ movq(rdx, args.GetReceiverOperand()); | 2502 __ movq(rdx, args.GetReceiverOperand()); |
| 2506 | 2503 |
| 2507 GenerateJumpFunction(object, rax, &miss); | 2504 GenerateJumpFunction(object, rax, &miss); |
| 2508 | 2505 |
| 2509 HandlerFrontendFooter(&miss); | 2506 HandlerFrontendFooter(&miss); |
| 2510 | 2507 |
| (...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2911 // ----------------------------------- | 2908 // ----------------------------------- |
| 2912 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); | 2909 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); |
| 2913 } | 2910 } |
| 2914 | 2911 |
| 2915 | 2912 |
| 2916 #undef __ | 2913 #undef __ |
| 2917 | 2914 |
| 2918 } } // namespace v8::internal | 2915 } } // namespace v8::internal |
| 2919 | 2916 |
| 2920 #endif // V8_TARGET_ARCH_X64 | 2917 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |