| 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 713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 724 LoadWithInterceptor(masm, receiver, holder, interceptor_holder, | 724 LoadWithInterceptor(masm, receiver, holder, interceptor_holder, |
| 725 ®ular_invoke); | 725 ®ular_invoke); |
| 726 | 726 |
| 727 // Interceptor returned nothing for this property. Try to use cached | 727 // Interceptor returned nothing for this property. Try to use cached |
| 728 // constant function. | 728 // constant function. |
| 729 | 729 |
| 730 // Check that the maps from interceptor's holder to constant function's | 730 // Check that the maps from interceptor's holder to constant function's |
| 731 // holder haven't changed and thus we can use cached constant function. | 731 // holder haven't changed and thus we can use cached constant function. |
| 732 if (*interceptor_holder != lookup->holder()) { | 732 if (*interceptor_holder != lookup->holder()) { |
| 733 stub_compiler_->CheckPrototypes( | 733 stub_compiler_->CheckPrototypes( |
| 734 IC::CurrentTypeOf(interceptor_holder, masm->isolate()), receiver, | 734 IC::CurrentTypeOf(interceptor_holder, masm->isolate()), holder, |
| 735 handle(lookup->holder()), scratch1, scratch2, scratch3, | 735 handle(lookup->holder()), scratch1, scratch2, scratch3, |
| 736 name, depth2, miss); | 736 name, depth2, miss); |
| 737 } else { | 737 } else { |
| 738 // CheckPrototypes has a side effect of fetching a 'holder' | 738 // CheckPrototypes has a side effect of fetching a 'holder' |
| 739 // for API (object which is instanceof for the signature). It's | 739 // for API (object which is instanceof for the signature). It's |
| 740 // safe to omit it here, as if present, it should be fetched | 740 // safe to omit it here, as if present, it should be fetched |
| 741 // by the previous CheckPrototypes. | 741 // by the previous CheckPrototypes. |
| 742 ASSERT(depth2 == kInvalidProtoDepth); | 742 ASSERT(depth2 == kInvalidProtoDepth); |
| 743 } | 743 } |
| 744 | 744 |
| 745 // Invoke function. | 745 // Invoke function. |
| 746 if (can_do_fast_api_call) { | 746 if (can_do_fast_api_call) { |
| 747 GenerateFastApiCall(masm, optimization, arguments_.immediate()); | 747 GenerateFastApiCall(masm, optimization, arguments_.immediate()); |
| 748 } else { | 748 } else { |
| 749 Handle<JSFunction> fun = optimization.constant_function(); | 749 Handle<JSFunction> fun = optimization.constant_function(); |
| 750 stub_compiler_->GenerateJumpFunctionIgnoreReceiver(fun); | 750 stub_compiler_->GenerateJumpFunction(object, fun); |
| 751 } | 751 } |
| 752 | 752 |
| 753 // Deferred code for fast API call case---clean preallocated space. | 753 // Deferred code for fast API call case---clean preallocated space. |
| 754 if (can_do_fast_api_call) { | 754 if (can_do_fast_api_call) { |
| 755 __ bind(&miss_cleanup); | 755 __ bind(&miss_cleanup); |
| 756 FreeSpaceForFastApiCall(masm, scratch1); | 756 FreeSpaceForFastApiCall(masm, scratch1); |
| 757 __ jmp(miss_label); | 757 __ jmp(miss_label); |
| 758 } | 758 } |
| 759 | 759 |
| 760 // Invoke a regular function. | 760 // Invoke a regular function. |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 800 { | 800 { |
| 801 FrameScope scope(masm, StackFrame::INTERNAL); | 801 FrameScope scope(masm, StackFrame::INTERNAL); |
| 802 __ push(holder); // Save the holder. | 802 __ push(holder); // Save the holder. |
| 803 __ push(name_); // Save the name. | 803 __ push(name_); // Save the name. |
| 804 | 804 |
| 805 CompileCallLoadPropertyWithInterceptor( | 805 CompileCallLoadPropertyWithInterceptor( |
| 806 masm, receiver, holder, name_, holder_obj, | 806 masm, receiver, holder, name_, holder_obj, |
| 807 IC::kLoadPropertyWithInterceptorOnly); | 807 IC::kLoadPropertyWithInterceptorOnly); |
| 808 | 808 |
| 809 __ pop(name_); // Restore the name. | 809 __ pop(name_); // Restore the name. |
| 810 __ pop(receiver); // Restore the holder. | 810 __ pop(holder); // Restore the holder. |
| 811 // Leave the internal frame. | 811 // Leave the internal frame. |
| 812 } | 812 } |
| 813 | 813 |
| 814 __ CompareRoot(rax, Heap::kNoInterceptorResultSentinelRootIndex); | 814 __ CompareRoot(rax, Heap::kNoInterceptorResultSentinelRootIndex); |
| 815 __ j(not_equal, interceptor_succeeded); | 815 __ j(not_equal, interceptor_succeeded); |
| 816 } | 816 } |
| 817 | 817 |
| 818 CallStubCompiler* stub_compiler_; | 818 CallStubCompiler* stub_compiler_; |
| 819 const ParameterCount& arguments_; | 819 const ParameterCount& arguments_; |
| 820 Register name_; | 820 Register name_; |
| (...skipping 2087 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2908 // ----------------------------------- | 2908 // ----------------------------------- |
| 2909 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); | 2909 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); |
| 2910 } | 2910 } |
| 2911 | 2911 |
| 2912 | 2912 |
| 2913 #undef __ | 2913 #undef __ |
| 2914 | 2914 |
| 2915 } } // namespace v8::internal | 2915 } } // namespace v8::internal |
| 2916 | 2916 |
| 2917 #endif // V8_TARGET_ARCH_X64 | 2917 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |