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 2658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2669 __ Jump(ic, RelocInfo::CODE_TARGET); | 2669 __ Jump(ic, RelocInfo::CODE_TARGET); |
2670 | 2670 |
2671 // Return the generated code. | 2671 // Return the generated code. |
2672 return GetCode(transition.is_null() | 2672 return GetCode(transition.is_null() |
2673 ? Code::FIELD | 2673 ? Code::FIELD |
2674 : Code::MAP_TRANSITION, name); | 2674 : Code::MAP_TRANSITION, name); |
2675 } | 2675 } |
2676 | 2676 |
2677 | 2677 |
2678 Handle<Code> StoreStubCompiler::CompileStoreCallback( | 2678 Handle<Code> StoreStubCompiler::CompileStoreCallback( |
2679 Handle<JSObject> object, | 2679 Handle<String> name, |
2680 Handle<AccessorInfo> callback, | 2680 Handle<JSObject> receiver, |
2681 Handle<String> name) { | 2681 Handle<JSObject> holder, |
| 2682 Handle<AccessorInfo> callback) { |
2682 // ----------- S t a t e ------------- | 2683 // ----------- S t a t e ------------- |
2683 // -- a0 : value | 2684 // -- a0 : value |
2684 // -- a1 : receiver | 2685 // -- a1 : receiver |
2685 // -- a2 : name | 2686 // -- a2 : name |
2686 // -- ra : return address | 2687 // -- ra : return address |
2687 // ----------------------------------- | 2688 // ----------------------------------- |
2688 Label miss; | 2689 Label miss; |
2689 | 2690 // Check that the maps haven't changed. |
2690 // Check that the map of the object hasn't changed. | 2691 __ JumpIfSmi(a1, &miss, a3); |
2691 __ CheckMap(a1, a3, Handle<Map>(object->map()), &miss, | 2692 CheckPrototypes(receiver, a1, holder, a3, t0, t1, name, &miss); |
2692 DO_SMI_CHECK, ALLOW_ELEMENT_TRANSITION_MAPS); | |
2693 | |
2694 // Perform global security token check if needed. | |
2695 if (object->IsJSGlobalProxy()) { | |
2696 __ CheckAccessGlobalProxy(a1, a3, &miss); | |
2697 } | |
2698 | 2693 |
2699 // Stub never generated for non-global objects that require access | 2694 // Stub never generated for non-global objects that require access |
2700 // checks. | 2695 // checks. |
2701 ASSERT(object->IsJSGlobalProxy() || !object->IsAccessCheckNeeded()); | 2696 ASSERT(holder->IsJSGlobalProxy() || !holder->IsAccessCheckNeeded()); |
2702 | 2697 |
2703 __ push(a1); // Receiver. | 2698 __ push(a1); // Receiver. |
2704 __ li(a3, Operand(callback)); // Callback info. | 2699 __ li(a3, Operand(callback)); // Callback info. |
2705 __ Push(a3, a2, a0); | 2700 __ Push(a3, a2, a0); |
2706 | 2701 |
2707 // Do tail-call to the runtime system. | 2702 // Do tail-call to the runtime system. |
2708 ExternalReference store_callback_property = | 2703 ExternalReference store_callback_property = |
2709 ExternalReference(IC_Utility(IC::kStoreCallbackProperty), | 2704 ExternalReference(IC_Utility(IC::kStoreCallbackProperty), |
2710 masm()->isolate()); | 2705 masm()->isolate()); |
2711 __ TailCallExternalReference(store_callback_property, 4, 1); | 2706 __ TailCallExternalReference(store_callback_property, 4, 1); |
(...skipping 2103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4815 __ Jump(ic_slow, RelocInfo::CODE_TARGET); | 4810 __ Jump(ic_slow, RelocInfo::CODE_TARGET); |
4816 } | 4811 } |
4817 } | 4812 } |
4818 | 4813 |
4819 | 4814 |
4820 #undef __ | 4815 #undef __ |
4821 | 4816 |
4822 } } // namespace v8::internal | 4817 } } // namespace v8::internal |
4823 | 4818 |
4824 #endif // V8_TARGET_ARCH_MIPS | 4819 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |