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

Side by Side Diff: src/x64/stub-cache-x64.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/ia32/stub-cache-ia32.cc ('k') | no next file » | 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 781 matching lines...) Expand 10 before | Expand all | Expand 10 after
792 // Leave the internal frame. 792 // Leave the internal frame.
793 } 793 }
794 794
795 void LoadWithInterceptor(MacroAssembler* masm, 795 void LoadWithInterceptor(MacroAssembler* masm,
796 Register receiver, 796 Register receiver,
797 Register holder, 797 Register holder,
798 Handle<JSObject> holder_obj, 798 Handle<JSObject> holder_obj,
799 Label* interceptor_succeeded) { 799 Label* interceptor_succeeded) {
800 { 800 {
801 FrameScope scope(masm, StackFrame::INTERNAL); 801 FrameScope scope(masm, StackFrame::INTERNAL);
802 __ push(holder); // Save the holder. 802 __ push(receiver);
803 __ push(name_); // Save the name. 803 __ push(holder);
804 __ push(name_);
804 805
805 CompileCallLoadPropertyWithInterceptor( 806 CompileCallLoadPropertyWithInterceptor(
806 masm, receiver, holder, name_, holder_obj, 807 masm, receiver, holder, name_, holder_obj,
807 IC::kLoadPropertyWithInterceptorOnly); 808 IC::kLoadPropertyWithInterceptorOnly);
808 809
809 __ pop(name_); // Restore the name. 810 __ pop(name_);
810 __ pop(holder); // Restore the holder. 811 __ pop(holder);
812 __ pop(receiver);
811 // Leave the internal frame. 813 // Leave the internal frame.
812 } 814 }
813 815
814 __ CompareRoot(rax, Heap::kNoInterceptorResultSentinelRootIndex); 816 __ CompareRoot(rax, Heap::kNoInterceptorResultSentinelRootIndex);
815 __ j(not_equal, interceptor_succeeded); 817 __ j(not_equal, interceptor_succeeded);
816 } 818 }
817 819
818 CallStubCompiler* stub_compiler_; 820 CallStubCompiler* stub_compiler_;
819 const ParameterCount& arguments_; 821 const ParameterCount& arguments_;
820 Register name_; 822 Register name_;
(...skipping 2087 matching lines...) Expand 10 before | Expand all | Expand 10 after
2908 // ----------------------------------- 2910 // -----------------------------------
2909 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); 2911 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
2910 } 2912 }
2911 2913
2912 2914
2913 #undef __ 2915 #undef __
2914 2916
2915 } } // namespace v8::internal 2917 } } // namespace v8::internal
2916 2918
2917 #endif // V8_TARGET_ARCH_X64 2919 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/ia32/stub-cache-ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698