| 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 2653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2664 __ bind(&miss); | 2664 __ bind(&miss); |
| 2665 Handle<Code> ic = masm()->isolate()->builtins()->StoreIC_Miss(); | 2665 Handle<Code> ic = masm()->isolate()->builtins()->StoreIC_Miss(); |
| 2666 __ Jump(ic, RelocInfo::CODE_TARGET); | 2666 __ Jump(ic, RelocInfo::CODE_TARGET); |
| 2667 | 2667 |
| 2668 // Return the generated code. | 2668 // Return the generated code. |
| 2669 return GetCode(Code::CALLBACKS, name); | 2669 return GetCode(Code::CALLBACKS, name); |
| 2670 } | 2670 } |
| 2671 | 2671 |
| 2672 | 2672 |
| 2673 Handle<Code> StoreStubCompiler::CompileStoreViaSetter( | 2673 Handle<Code> StoreStubCompiler::CompileStoreViaSetter( |
| 2674 Handle<String> name, |
| 2674 Handle<JSObject> receiver, | 2675 Handle<JSObject> receiver, |
| 2675 Handle<JSFunction> setter, | 2676 Handle<JSObject> holder, |
| 2676 Handle<String> name) { | 2677 Handle<JSFunction> setter) { |
| 2677 // ----------- S t a t e ------------- | 2678 // ----------- S t a t e ------------- |
| 2678 // -- r0 : value | 2679 // -- r0 : value |
| 2679 // -- r1 : receiver | 2680 // -- r1 : receiver |
| 2680 // -- r2 : name | 2681 // -- r2 : name |
| 2681 // -- lr : return address | 2682 // -- lr : return address |
| 2682 // ----------------------------------- | 2683 // ----------------------------------- |
| 2683 Label miss; | 2684 Label miss; |
| 2684 | 2685 |
| 2685 // Check that the map of the object hasn't changed. | 2686 // Check that the maps haven't changed. |
| 2686 __ CheckMap(r1, r3, Handle<Map>(receiver->map()), &miss, DO_SMI_CHECK, | 2687 __ JumpIfSmi(r1, &miss); |
| 2687 ALLOW_ELEMENT_TRANSITION_MAPS); | 2688 CheckPrototypes(receiver, r1, holder, r3, r4, r5, name, &miss); |
| 2688 | 2689 |
| 2689 { | 2690 { |
| 2690 FrameScope scope(masm(), StackFrame::INTERNAL); | 2691 FrameScope scope(masm(), StackFrame::INTERNAL); |
| 2691 | 2692 |
| 2692 // Save value register, so we can restore it later. | 2693 // Save value register, so we can restore it later. |
| 2693 __ push(r0); | 2694 __ push(r0); |
| 2694 | 2695 |
| 2695 // Call the JavaScript getter with the receiver and the value on the stack. | 2696 // Call the JavaScript setter with the receiver and the value on the stack. |
| 2696 __ Push(r1, r0); | 2697 __ Push(r1, r0); |
| 2697 ParameterCount actual(1); | 2698 ParameterCount actual(1); |
| 2698 __ InvokeFunction(setter, actual, CALL_FUNCTION, NullCallWrapper(), | 2699 __ InvokeFunction(setter, actual, CALL_FUNCTION, NullCallWrapper(), |
| 2699 CALL_AS_METHOD); | 2700 CALL_AS_METHOD); |
| 2700 | 2701 |
| 2701 // We have to return the passed value, not the return value of the setter. | 2702 // We have to return the passed value, not the return value of the setter. |
| 2702 __ pop(r0); | 2703 __ pop(r0); |
| 2703 | 2704 |
| 2704 // Restore context register. | 2705 // Restore context register. |
| 2705 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 2706 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
| (...skipping 1973 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4679 __ Jump(ic_slow, RelocInfo::CODE_TARGET); | 4680 __ Jump(ic_slow, RelocInfo::CODE_TARGET); |
| 4680 } | 4681 } |
| 4681 } | 4682 } |
| 4682 | 4683 |
| 4683 | 4684 |
| 4684 #undef __ | 4685 #undef __ |
| 4685 | 4686 |
| 4686 } } // namespace v8::internal | 4687 } } // namespace v8::internal |
| 4687 | 4688 |
| 4688 #endif // V8_TARGET_ARCH_ARM | 4689 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |