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

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

Issue 10735003: Handle accessors on the prototype chain in StoreICs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Added a unit test. Created 8 years, 5 months 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/ic.cc ('k') | src/stub-cache.h » ('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 2657 matching lines...) Expand 10 before | Expand all | Expand 10 after
2668 __ bind(&miss); 2668 __ bind(&miss);
2669 Handle<Code> ic = masm()->isolate()->builtins()->StoreIC_Miss(); 2669 Handle<Code> ic = masm()->isolate()->builtins()->StoreIC_Miss();
2670 __ Jump(ic, RelocInfo::CODE_TARGET); 2670 __ Jump(ic, RelocInfo::CODE_TARGET);
2671 2671
2672 // Return the generated code. 2672 // Return the generated code.
2673 return GetCode(Code::CALLBACKS, name); 2673 return GetCode(Code::CALLBACKS, name);
2674 } 2674 }
2675 2675
2676 2676
2677 Handle<Code> StoreStubCompiler::CompileStoreViaSetter( 2677 Handle<Code> StoreStubCompiler::CompileStoreViaSetter(
2678 Handle<String> name,
2678 Handle<JSObject> receiver, 2679 Handle<JSObject> receiver,
2679 Handle<JSFunction> setter, 2680 Handle<JSObject> holder,
2680 Handle<String> name) { 2681 Handle<JSFunction> setter) {
2681 // ----------- S t a t e ------------- 2682 // ----------- S t a t e -------------
2682 // -- a0 : value 2683 // -- a0 : value
2683 // -- a1 : receiver 2684 // -- a1 : receiver
2684 // -- a2 : name 2685 // -- a2 : name
2685 // -- ra : return address 2686 // -- ra : return address
2686 // ----------------------------------- 2687 // -----------------------------------
2687 Label miss; 2688 Label miss;
2688 2689
2689 // Check that the map of the object hasn't changed. 2690 // Check that the maps haven't changed.
2690 __ CheckMap(a1, a3, Handle<Map>(receiver->map()), &miss, DO_SMI_CHECK, 2691 __ JumpIfSmi(a1, &miss);
2691 ALLOW_ELEMENT_TRANSITION_MAPS); 2692 CheckPrototypes(receiver, a1, holder, a3, t0, t1, name, &miss);
2692 2693
2693 { 2694 {
2694 FrameScope scope(masm(), StackFrame::INTERNAL); 2695 FrameScope scope(masm(), StackFrame::INTERNAL);
2695 2696
2696 // Save value register, so we can restore it later. 2697 // Save value register, so we can restore it later.
2697 __ push(a0); 2698 __ push(a0);
2698 2699
2699 // Call the JavaScript getter with the receiver and the value on the stack. 2700 // Call the JavaScript setter with the receiver and the value on the stack.
2700 __ push(a1); 2701 __ push(a1);
2701 __ push(a0); 2702 __ push(a0);
2702 ParameterCount actual(1); 2703 ParameterCount actual(1);
2703 __ InvokeFunction(setter, actual, CALL_FUNCTION, NullCallWrapper(), 2704 __ InvokeFunction(setter, actual, CALL_FUNCTION, NullCallWrapper(),
2704 CALL_AS_METHOD); 2705 CALL_AS_METHOD);
2705 2706
2706 // We have to return the passed value, not the return value of the setter. 2707 // We have to return the passed value, not the return value of the setter.
2707 __ pop(v0); 2708 __ pop(v0);
2708 2709
2709 // Restore context register. 2710 // Restore context register.
(...skipping 2031 matching lines...) Expand 10 before | Expand all | Expand 10 after
4741 __ Jump(ic_slow, RelocInfo::CODE_TARGET); 4742 __ Jump(ic_slow, RelocInfo::CODE_TARGET);
4742 } 4743 }
4743 } 4744 }
4744 4745
4745 4746
4746 #undef __ 4747 #undef __
4747 4748
4748 } } // namespace v8::internal 4749 } } // namespace v8::internal
4749 4750
4750 #endif // V8_TARGET_ARCH_MIPS 4751 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ic.cc ('k') | src/stub-cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698