Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(487)

Side by Side Diff: src/ia32/stub-cache-ia32.cc

Issue 108803006: Properly restore the receiver after the interceptor call. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/arm/stub-cache-arm.cc ('k') | src/x64/stub-cache-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 789 matching lines...) Expand 10 before | Expand all | Expand 10 after
800 // Leave the internal frame. 800 // Leave the internal frame.
801 } 801 }
802 802
803 void LoadWithInterceptor(MacroAssembler* masm, 803 void LoadWithInterceptor(MacroAssembler* masm,
804 Register receiver, 804 Register receiver,
805 Register holder, 805 Register holder,
806 Handle<JSObject> holder_obj, 806 Handle<JSObject> holder_obj,
807 Label* interceptor_succeeded) { 807 Label* interceptor_succeeded) {
808 { 808 {
809 FrameScope scope(masm, StackFrame::INTERNAL); 809 FrameScope scope(masm, StackFrame::INTERNAL);
810 __ push(holder); // Save the holder. 810 __ push(receiver);
811 __ push(name_); // Save the name. 811 __ push(holder);
812 __ push(name_);
812 813
813 CompileCallLoadPropertyWithInterceptor( 814 CompileCallLoadPropertyWithInterceptor(
814 masm, receiver, holder, name_, holder_obj, 815 masm, receiver, holder, name_, holder_obj,
815 IC::kLoadPropertyWithInterceptorOnly); 816 IC::kLoadPropertyWithInterceptorOnly);
816 817
817 __ pop(name_); // Restore the name. 818 __ pop(name_);
818 __ pop(holder); // Restore the holder. 819 __ pop(holder);
820 __ pop(receiver);
819 // Leave the internal frame. 821 // Leave the internal frame.
820 } 822 }
821 823
822 __ cmp(eax, masm->isolate()->factory()->no_interceptor_result_sentinel()); 824 __ cmp(eax, masm->isolate()->factory()->no_interceptor_result_sentinel());
823 __ j(not_equal, interceptor_succeeded); 825 __ j(not_equal, interceptor_succeeded);
824 } 826 }
825 827
826 CallStubCompiler* stub_compiler_; 828 CallStubCompiler* stub_compiler_;
827 const ParameterCount& arguments_; 829 const ParameterCount& arguments_;
828 Register name_; 830 Register name_;
(...skipping 2162 matching lines...) Expand 10 before | Expand all | Expand 10 after
2991 // ----------------------------------- 2993 // -----------------------------------
2992 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); 2994 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
2993 } 2995 }
2994 2996
2995 2997
2996 #undef __ 2998 #undef __
2997 2999
2998 } } // namespace v8::internal 3000 } } // namespace v8::internal
2999 3001
3000 #endif // V8_TARGET_ARCH_IA32 3002 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/arm/stub-cache-arm.cc ('k') | src/x64/stub-cache-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698