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 721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
732 LoadWithInterceptor(masm, receiver, holder, interceptor_holder, | 732 LoadWithInterceptor(masm, receiver, holder, interceptor_holder, |
733 ®ular_invoke); | 733 ®ular_invoke); |
734 | 734 |
735 // Interceptor returned nothing for this property. Try to use cached | 735 // Interceptor returned nothing for this property. Try to use cached |
736 // constant function. | 736 // constant function. |
737 | 737 |
738 // Check that the maps from interceptor's holder to constant function's | 738 // Check that the maps from interceptor's holder to constant function's |
739 // holder haven't changed and thus we can use cached constant function. | 739 // holder haven't changed and thus we can use cached constant function. |
740 if (*interceptor_holder != lookup->holder()) { | 740 if (*interceptor_holder != lookup->holder()) { |
741 stub_compiler_->CheckPrototypes( | 741 stub_compiler_->CheckPrototypes( |
742 IC::CurrentTypeOf(interceptor_holder, masm->isolate()), receiver, | 742 IC::CurrentTypeOf(interceptor_holder, masm->isolate()), holder, |
743 handle(lookup->holder()), scratch1, scratch2, scratch3, | 743 handle(lookup->holder()), scratch1, scratch2, scratch3, |
744 name, depth2, miss); | 744 name, depth2, miss); |
745 } else { | 745 } else { |
746 // CheckPrototypes has a side effect of fetching a 'holder' | 746 // CheckPrototypes has a side effect of fetching a 'holder' |
747 // for API (object which is instanceof for the signature). It's | 747 // for API (object which is instanceof for the signature). It's |
748 // safe to omit it here, as if present, it should be fetched | 748 // safe to omit it here, as if present, it should be fetched |
749 // by the previous CheckPrototypes. | 749 // by the previous CheckPrototypes. |
750 ASSERT(depth2 == kInvalidProtoDepth); | 750 ASSERT(depth2 == kInvalidProtoDepth); |
751 } | 751 } |
752 | 752 |
753 // Invoke function. | 753 // Invoke function. |
754 if (can_do_fast_api_call) { | 754 if (can_do_fast_api_call) { |
755 GenerateFastApiCall(masm, optimization, arguments_.immediate()); | 755 GenerateFastApiCall(masm, optimization, arguments_.immediate()); |
756 } else { | 756 } else { |
757 Handle<JSFunction> fun = optimization.constant_function(); | 757 Handle<JSFunction> fun = optimization.constant_function(); |
758 stub_compiler_->GenerateJumpFunctionIgnoreReceiver(fun); | 758 stub_compiler_->GenerateJumpFunction(object, fun); |
759 } | 759 } |
760 | 760 |
761 // Deferred code for fast API call case---clean preallocated space. | 761 // Deferred code for fast API call case---clean preallocated space. |
762 if (can_do_fast_api_call) { | 762 if (can_do_fast_api_call) { |
763 __ bind(&miss_cleanup); | 763 __ bind(&miss_cleanup); |
764 FreeSpaceForFastApiCall(masm, scratch1); | 764 FreeSpaceForFastApiCall(masm, scratch1); |
765 __ jmp(miss_label); | 765 __ jmp(miss_label); |
766 } | 766 } |
767 | 767 |
768 // Invoke a regular function. | 768 // Invoke a regular function. |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
808 { | 808 { |
809 FrameScope scope(masm, StackFrame::INTERNAL); | 809 FrameScope scope(masm, StackFrame::INTERNAL); |
810 __ push(holder); // Save the holder. | 810 __ push(holder); // Save the holder. |
811 __ push(name_); // Save the name. | 811 __ push(name_); // Save the name. |
812 | 812 |
813 CompileCallLoadPropertyWithInterceptor( | 813 CompileCallLoadPropertyWithInterceptor( |
814 masm, receiver, holder, name_, holder_obj, | 814 masm, receiver, holder, name_, holder_obj, |
815 IC::kLoadPropertyWithInterceptorOnly); | 815 IC::kLoadPropertyWithInterceptorOnly); |
816 | 816 |
817 __ pop(name_); // Restore the name. | 817 __ pop(name_); // Restore the name. |
818 __ pop(receiver); // Restore the holder. | 818 __ pop(holder); // Restore the holder. |
819 // Leave the internal frame. | 819 // Leave the internal frame. |
820 } | 820 } |
821 | 821 |
822 __ cmp(eax, masm->isolate()->factory()->no_interceptor_result_sentinel()); | 822 __ cmp(eax, masm->isolate()->factory()->no_interceptor_result_sentinel()); |
823 __ j(not_equal, interceptor_succeeded); | 823 __ j(not_equal, interceptor_succeeded); |
824 } | 824 } |
825 | 825 |
826 CallStubCompiler* stub_compiler_; | 826 CallStubCompiler* stub_compiler_; |
827 const ParameterCount& arguments_; | 827 const ParameterCount& arguments_; |
828 Register name_; | 828 Register name_; |
(...skipping 2162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2991 // ----------------------------------- | 2991 // ----------------------------------- |
2992 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); | 2992 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); |
2993 } | 2993 } |
2994 | 2994 |
2995 | 2995 |
2996 #undef __ | 2996 #undef __ |
2997 | 2997 |
2998 } } // namespace v8::internal | 2998 } } // namespace v8::internal |
2999 | 2999 |
3000 #endif // V8_TARGET_ARCH_IA32 | 3000 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |