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 2655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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(transition.is_null() | 2669 return GetCode(transition.is_null() |
2670 ? Code::FIELD | 2670 ? Code::FIELD |
2671 : Code::MAP_TRANSITION, name); | 2671 : Code::MAP_TRANSITION, name); |
2672 } | 2672 } |
2673 | 2673 |
2674 | 2674 |
2675 Handle<Code> StoreStubCompiler::CompileStoreCallback( | 2675 Handle<Code> StoreStubCompiler::CompileStoreCallback( |
2676 Handle<JSObject> object, | 2676 Handle<String> name, |
2677 Handle<AccessorInfo> callback, | 2677 Handle<JSObject> receiver, |
2678 Handle<String> name) { | 2678 Handle<JSObject> holder, |
| 2679 Handle<AccessorInfo> callback) { |
2679 // ----------- S t a t e ------------- | 2680 // ----------- S t a t e ------------- |
2680 // -- r0 : value | 2681 // -- r0 : value |
2681 // -- r1 : receiver | 2682 // -- r1 : receiver |
2682 // -- r2 : name | 2683 // -- r2 : name |
2683 // -- lr : return address | 2684 // -- lr : return address |
2684 // ----------------------------------- | 2685 // ----------------------------------- |
2685 Label miss; | 2686 Label miss; |
| 2687 // Check that the maps haven't changed. |
| 2688 __ JumpIfSmi(r1, &miss); |
| 2689 CheckPrototypes(receiver, r1, holder, r3, r4, r5, name, &miss); |
2686 | 2690 |
2687 // Check that the map of the object hasn't changed. | 2691 // Stub never generated for non-global objects that require access checks. |
2688 __ CheckMap(r1, r3, Handle<Map>(object->map()), &miss, | 2692 ASSERT(holder->IsJSGlobalProxy() || !holder->IsAccessCheckNeeded()); |
2689 DO_SMI_CHECK, ALLOW_ELEMENT_TRANSITION_MAPS); | |
2690 | |
2691 // Perform global security token check if needed. | |
2692 if (object->IsJSGlobalProxy()) { | |
2693 __ CheckAccessGlobalProxy(r1, r3, &miss); | |
2694 } | |
2695 | |
2696 // Stub never generated for non-global objects that require access | |
2697 // checks. | |
2698 ASSERT(object->IsJSGlobalProxy() || !object->IsAccessCheckNeeded()); | |
2699 | 2693 |
2700 __ push(r1); // receiver | 2694 __ push(r1); // receiver |
2701 __ mov(ip, Operand(callback)); // callback info | 2695 __ mov(ip, Operand(callback)); // callback info |
2702 __ Push(ip, r2, r0); | 2696 __ Push(ip, r2, r0); |
2703 | 2697 |
2704 // Do tail-call to the runtime system. | 2698 // Do tail-call to the runtime system. |
2705 ExternalReference store_callback_property = | 2699 ExternalReference store_callback_property = |
2706 ExternalReference(IC_Utility(IC::kStoreCallbackProperty), | 2700 ExternalReference(IC_Utility(IC::kStoreCallbackProperty), |
2707 masm()->isolate()); | 2701 masm()->isolate()); |
2708 __ TailCallExternalReference(store_callback_property, 4, 1); | 2702 __ TailCallExternalReference(store_callback_property, 4, 1); |
(...skipping 2045 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4754 __ Jump(ic_slow, RelocInfo::CODE_TARGET); | 4748 __ Jump(ic_slow, RelocInfo::CODE_TARGET); |
4755 } | 4749 } |
4756 } | 4750 } |
4757 | 4751 |
4758 | 4752 |
4759 #undef __ | 4753 #undef __ |
4760 | 4754 |
4761 } } // namespace v8::internal | 4755 } } // namespace v8::internal |
4762 | 4756 |
4763 #endif // V8_TARGET_ARCH_ARM | 4757 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |